|
@@ -154,13 +154,13 @@
|
|
|
@click="addNewPipe(scope.row)"
|
|
|
>新增顶管工程
|
|
|
</el-button>
|
|
|
- <el-button
|
|
|
+<!-- <el-button
|
|
|
type="text"
|
|
|
icon="el-icon-edit"
|
|
|
size="mini"
|
|
|
@click="viewSource(scope.row)"
|
|
|
>历史
|
|
|
- </el-button>
|
|
|
+ </el-button>-->
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -415,16 +415,38 @@
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer" style="margin-top: 20%;">
|
|
|
- <!-- <el-button :loading="buttonLoading" type="primary" @click="submitForm">确定</el-button> -->
|
|
|
- <el-button :loading="buttonLoading" type="primary" @click="toNodeDetail">填写节点信息</el-button>
|
|
|
+ <el-button :loading="buttonLoading" type="primary" @click="submitForm">提交</el-button>
|
|
|
+<!-- <el-button :loading="buttonLoading" type="primary" @click="openNode">填写节点信息</el-button>-->
|
|
|
+<!-- <el-button :loading="buttonLoading" type="primary" @click="toNodeDetail">填写节点信息</el-button>-->
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
<!-- 节点信息dialog -->
|
|
|
- <enginee-node
|
|
|
+<!-- <el-dialog :visible="openNodeForm" :rules="nodesRule" title="节点信息" append-to-body customClass="appendElNodeDialog" width="70% !important">
|
|
|
+ <el-form ref="nodeForm" :model="zEngineeringInfoBo" :rules="nodeRules" label-width="200px">
|
|
|
+ <el-form-item label="施工时间" prop="constructTime">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="zEngineeringInfoBo.constructTime"
|
|
|
+ value-format="yyyy-MM-dd hh:mm:ss"
|
|
|
+ type="datetime"
|
|
|
+ placeholder="请选择施工时间">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="照片" prop="zEngiineeringPhotoBoList" style="width: 100%;">
|
|
|
+ <ObsImageUpload ref="obsImageUpload" :limit="9999" :fileType="['png', 'jpg', 'jpeg']" :value="zEngineeringInfoBo.zEngiineeringPhotoBoList"
|
|
|
+ @input="getUrl"></ObsImageUpload>
|
|
|
+ </el-form-item>
|
|
|
+ <div style="display: flex;margin-top: 3%;">
|
|
|
+ <div style="width: 80%;"></div>
|
|
|
+ <el-button :loading="buttonLoading" type="primary" @click="submitForm">提交</el-button>
|
|
|
+ <el-button @click="nodeCancel">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </el-form>
|
|
|
+ </el-dialog>-->
|
|
|
+<!-- <enginee-node
|
|
|
ref="childNode"
|
|
|
@closeToSucceed="closeToSucceed"
|
|
|
- />
|
|
|
+ />-->
|
|
|
<EngineePipe ref="enginPipe"/>
|
|
|
<ConstructionDetails
|
|
|
ref="ConstructionDetails"
|
|
@@ -437,7 +459,7 @@
|
|
|
import {
|
|
|
listEngineeringDangerous,
|
|
|
getEngineeringDangerous,
|
|
|
- delEngineeringDangerous, queryEngineeringDangerous,
|
|
|
+ delEngineeringDangerous, queryEngineeringDangerous, updateEngineeringDangerous, addEngineeringDangerous,
|
|
|
} from "@/api/zdsz/engineeringDangerous";
|
|
|
import EngineeNode from "@/components/EngineeNode/index";
|
|
|
import data from "@/views/system/dict/data.vue";
|
|
@@ -446,6 +468,7 @@ import ConstructionDetails from "@/components/ConstructionDetails/index.vue";
|
|
|
import {validPhoneMobile, checkPositiveDecimal} from "@/api/rules";
|
|
|
|
|
|
|
|
|
+
|
|
|
export default {
|
|
|
name: "EngineeringDangerous",
|
|
|
computed: {
|
|
@@ -458,6 +481,9 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ //备用
|
|
|
+ // openNodeForm:false,
|
|
|
+ //备用
|
|
|
currentCollapses: [],
|
|
|
nodeType: "危险作业工程",
|
|
|
nodeDetailVisible: false,
|
|
@@ -704,6 +730,16 @@ export default {
|
|
|
],
|
|
|
|
|
|
},
|
|
|
+ //备用
|
|
|
+ /* nodesRule:{
|
|
|
+ zEngiineeringPhotoBoList: [
|
|
|
+ {required: true, message: "图片不能为空", trigger: 'blur'}
|
|
|
+ ],
|
|
|
+ constructTime: [
|
|
|
+ {required: true, message: "施工时间不能为空", trigger: 'blur'}
|
|
|
+ ],
|
|
|
+ },*/
|
|
|
+ //备用
|
|
|
currentType: null, // 组件类型 put修改 add新增
|
|
|
};
|
|
|
},
|
|
@@ -711,6 +747,92 @@ export default {
|
|
|
this.getList();
|
|
|
},
|
|
|
methods: {
|
|
|
+ submitForm() {
|
|
|
+ this.$refs["form"].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ this.buttonLoading = true;
|
|
|
+ if (this.form.id != null) {
|
|
|
+ this.form.files = this.$refs.obsFileUpload.fileList
|
|
|
+ updateEngineeringDangerous(this.form).then(response => {
|
|
|
+ this.$modal.msgSuccess("修改成功");
|
|
|
+ this.open = false;
|
|
|
+ this.getList();
|
|
|
+ }).finally(() => {
|
|
|
+ this.buttonLoading = false;
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.form.files = this.$refs.obsFileUpload.fileList
|
|
|
+ addEngineeringDangerous(this.form).then(response => {
|
|
|
+ this.$modal.msgSuccess("新增成功");
|
|
|
+ this.open = false;
|
|
|
+ this.getList();
|
|
|
+ }).finally(() => {
|
|
|
+ this.buttonLoading = false;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //备用
|
|
|
+ /* openNode(){
|
|
|
+ this.$refs["form"].validate(valid => {
|
|
|
+ if (valid){
|
|
|
+ this.openNodeForm=true
|
|
|
+ console.log(this.form.id)
|
|
|
+ if (this.form.id !== undefined){
|
|
|
+ getEngineeringDangerous(this.form.id).then((res)=>{
|
|
|
+ console.log(res.data)
|
|
|
+ this.zEngineeringInfoBo = res.data.zEngineeringNodeBoList[0].zEngineeringInfoBoList[0]
|
|
|
+ this.nodeType = res.data.zEngineeringNodeBoList[0].type
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+ },
|
|
|
+ nodeCancel(){
|
|
|
+ this.resetNodeForm()
|
|
|
+ this.openNodeForm = false
|
|
|
+ },
|
|
|
+ resetNodeForm(){
|
|
|
+ this.$refs['nodeForm'].resetFields()
|
|
|
+ this.resetForm("nodeForm");
|
|
|
+ },
|
|
|
+
|
|
|
+ submitForm() {
|
|
|
+ this.$refs["nodeForm"].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ if (this.form.id == null) {
|
|
|
+ this.form.zEngineeringNodeBo = {}
|
|
|
+ this.form.zEngineeringNodeBo.zEngineeringInfoBo = this.zEngineeringInfoBo
|
|
|
+ this.form.zEngineeringNodeBo.type = this.nodeType
|
|
|
+ this.form.files = this.$refs.obsFileUpload.fileList
|
|
|
+ this.form.zEngineeringNodeBo.zEngineeringInfoBo.zEngineeringMaterialBo = []
|
|
|
+ console.log(this.form)
|
|
|
+ addEngineeringDangerous(this.form).then(res => {
|
|
|
+ this.$modal.msgSuccess("新增成功");
|
|
|
+ this.open = false;
|
|
|
+ this.openNodeForm = false
|
|
|
+ this.getList();
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ // 危险修改
|
|
|
+ this.form.zEngineeringNodeBo = {}
|
|
|
+ this.form.zEngineeringNodeBo.zEngineeringInfoBo = this.zEngineeringInfoBo
|
|
|
+ this.form.zEngineeringNodeBo.type = this.nodeType
|
|
|
+ this.form.files = this.$refs.obsFileUpload.fileList
|
|
|
+ this.form.zEngineeringNodeBo.zEngineeringInfoBo.zEngineeringMaterialBo = []
|
|
|
+ updateEngineeringDangerous(this.form).then(res => {
|
|
|
+ this.$modal.msgSuccess("修改成功");
|
|
|
+ this.open = false;
|
|
|
+ this.openNodeForm = false
|
|
|
+ this.getList();
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },*/
|
|
|
+ //备用
|
|
|
viewSource(e) {
|
|
|
this.currentId = e.id
|
|
|
this.$refs.ConstructionDetails.open(_, "危险作业工程")
|
|
@@ -739,12 +861,6 @@ export default {
|
|
|
this.$refs.childNode.open(this.form, 37, [{name: "危险作业工程"}])
|
|
|
return
|
|
|
}
|
|
|
- // 加工 enginClassification 工程节点
|
|
|
- // const parts = this.value[1].split('_');
|
|
|
- // let result = parts.slice(2).join('_');
|
|
|
- // this.queryParams.zEngineeringNodeBo.type = this.enginClassification
|
|
|
- // this.queryParams.enginClassification = result
|
|
|
- // console.log(this.queryParams)
|
|
|
if (this.currentType === 'add') {
|
|
|
this.form.files = this.$refs.obsFileUpload.fileList
|
|
|
this.$refs.childNode.open(this.form, 3, [{name: "危险作业工程"}])
|