|
@@ -735,7 +735,9 @@
|
|
|
>取消</el-button
|
|
>取消</el-button
|
|
|
>
|
|
>
|
|
|
</div>
|
|
</div>
|
|
|
- <!-- 添加或编辑业务库物防建设对话框 -->
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
<DialogCom
|
|
<DialogCom
|
|
|
:title="Businesstitle"
|
|
:title="Businesstitle"
|
|
|
:visible.sync="Businessopen"
|
|
:visible.sync="Businessopen"
|
|
@@ -820,7 +822,7 @@
|
|
|
<el-button @click="Businesscancel">取 消</el-button>
|
|
<el-button @click="Businesscancel">取 消</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</DialogCom>
|
|
</DialogCom>
|
|
|
- <!-- 添加或编辑银行物防建设对话框 -->
|
|
|
|
|
|
|
+
|
|
|
<DialogCom
|
|
<DialogCom
|
|
|
:title="Banktitle"
|
|
:title="Banktitle"
|
|
|
:visible.sync="Bankopen"
|
|
:visible.sync="Bankopen"
|
|
@@ -987,7 +989,7 @@
|
|
|
<el-button @click="orgcancel">取 消</el-button>
|
|
<el-button @click="orgcancel">取 消</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</DialogCom>
|
|
</DialogCom>
|
|
|
- <!-- 添加或编辑离行物防建设对话框 -->
|
|
|
|
|
|
|
+
|
|
|
<DialogCom
|
|
<DialogCom
|
|
|
:title="detachedtitle"
|
|
:title="detachedtitle"
|
|
|
:visible.sync="detachedopen"
|
|
:visible.sync="detachedopen"
|
|
@@ -996,7 +998,7 @@
|
|
|
>
|
|
>
|
|
|
<el-form
|
|
<el-form
|
|
|
ref="detachedform"
|
|
ref="detachedform"
|
|
|
- :model="detachedform"
|
|
|
|
|
|
|
+ :model="formData"
|
|
|
label-width="80px"
|
|
label-width="80px"
|
|
|
:rules="rules"
|
|
:rules="rules"
|
|
|
>
|
|
>
|
|
@@ -1005,7 +1007,7 @@
|
|
|
<el-select
|
|
<el-select
|
|
|
prop="planType"
|
|
prop="planType"
|
|
|
label="标准"
|
|
label="标准"
|
|
|
- v-model="detachedform.standard"
|
|
|
|
|
|
|
+ v-model="formData.standard"
|
|
|
placeholder="请选择标准"
|
|
placeholder="请选择标准"
|
|
|
clearable
|
|
clearable
|
|
|
>
|
|
>
|
|
@@ -1020,7 +1022,7 @@
|
|
|
<el-form-item label="达标日期" prop="dateOfCompliance">
|
|
<el-form-item label="达标日期" prop="dateOfCompliance">
|
|
|
<el-date-picker
|
|
<el-date-picker
|
|
|
clearable
|
|
clearable
|
|
|
- v-model="detachedform.dateOfCompliance"
|
|
|
|
|
|
|
+ v-model="formData.dateOfCompliance"
|
|
|
type="date"
|
|
type="date"
|
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
placeholder="请选择达标日期"
|
|
placeholder="请选择达标日期"
|
|
@@ -1033,16 +1035,17 @@
|
|
|
placeholder="请输入证书佐证"
|
|
placeholder="请输入证书佐证"
|
|
|
/> -->
|
|
/> -->
|
|
|
<el-switch
|
|
<el-switch
|
|
|
- v-model="detachedform.certificateEvidence"
|
|
|
|
|
|
|
+ v-model="certificate"
|
|
|
active-text
|
|
active-text
|
|
|
:active-value="1"
|
|
:active-value="1"
|
|
|
:inactive-value="0"
|
|
:inactive-value="0"
|
|
|
></el-switch>
|
|
></el-switch>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item
|
|
<el-form-item
|
|
|
- v-if="detachedform.certificateEvidence"
|
|
|
|
|
|
|
+ v-if="certificate"
|
|
|
label="证书"
|
|
label="证书"
|
|
|
- prop="certificate"
|
|
|
|
|
|
|
+ required
|
|
|
|
|
+ prop="certificateImgs"
|
|
|
>
|
|
>
|
|
|
<!-- <el-input
|
|
<!-- <el-input
|
|
|
v-if="false"
|
|
v-if="false"
|
|
@@ -1052,15 +1055,14 @@
|
|
|
<div
|
|
<div
|
|
|
class="image-container"
|
|
class="image-container"
|
|
|
style="margin-left: 20px"
|
|
style="margin-left: 20px"
|
|
|
- v-if="detachedform.certificateEvidence"
|
|
|
|
|
|
|
+ v-if="certificate"
|
|
|
>
|
|
>
|
|
|
- <p style="font-size: 12px; color: #999">上传证书</p>
|
|
|
|
|
- <image-upload
|
|
|
|
|
|
|
+<!-- <p style="font-size: 12px; color: #999">上传证书</p>-->
|
|
|
|
|
+ <img-upload
|
|
|
:limit="5"
|
|
:limit="5"
|
|
|
:fileSize="2"
|
|
:fileSize="2"
|
|
|
- :value="detachedform.certificate"
|
|
|
|
|
- @input="uploaddetachedSuccess"
|
|
|
|
|
- ></image-upload>
|
|
|
|
|
|
|
+ v-model="formData.certificateImgs"
|
|
|
|
|
+ ></img-upload>
|
|
|
</div>
|
|
</div>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item v-if="false" label="佐证" prop="evidence">
|
|
<el-form-item v-if="false" label="佐证" prop="evidence">
|
|
@@ -1083,6 +1085,7 @@ import uploadpng from "@/assets/images/upload.png";
|
|
|
import uplpng from "@/assets/images/upl.png";
|
|
import uplpng from "@/assets/images/upl.png";
|
|
|
import request from "@/utils/request";
|
|
import request from "@/utils/request";
|
|
|
import { statusOptions, getLabel } from "./../../commonOption";
|
|
import { statusOptions, getLabel } from "./../../commonOption";
|
|
|
|
|
+import ImgUpload from "@/components/ImgsUpload";
|
|
|
import {
|
|
import {
|
|
|
listExtend,
|
|
listExtend,
|
|
|
getExtend,
|
|
getExtend,
|
|
@@ -1111,6 +1114,7 @@ import {
|
|
|
} from "@/api/system/OrgPhysicalDefenseConstruction";
|
|
} from "@/api/system/OrgPhysicalDefenseConstruction";
|
|
|
import { selectCityInfoVoList } from "@/api/core/weather";
|
|
import { selectCityInfoVoList } from "@/api/core/weather";
|
|
|
import TreeNodeDialogVue from "../../tool/build/TreeNodeDialog.vue";
|
|
import TreeNodeDialogVue from "../../tool/build/TreeNodeDialog.vue";
|
|
|
|
|
+import {formatDate} from "@/utils";
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
dicts: [
|
|
dicts: [
|
|
@@ -1128,10 +1132,27 @@ export default {
|
|
|
"property_situation",
|
|
"property_situation",
|
|
|
],
|
|
],
|
|
|
props: [],
|
|
props: [],
|
|
|
- components: {},
|
|
|
|
|
|
|
+ components: {ImgUpload},
|
|
|
data() {
|
|
data() {
|
|
|
|
|
+ let formatRule = function(rule, value, callback) {
|
|
|
|
|
+ console.log(value,'value')
|
|
|
|
|
+ if (!value.length) {
|
|
|
|
|
+ callback(new Error("证书为必填项"));
|
|
|
|
|
+ } else {
|
|
|
|
|
+ callback();
|
|
|
|
|
+ }
|
|
|
|
|
+ };
|
|
|
return {
|
|
return {
|
|
|
|
|
+ //证书佐证
|
|
|
|
|
+ certificate:false,
|
|
|
reqmsg: false,
|
|
reqmsg: false,
|
|
|
|
|
+ formData:{
|
|
|
|
|
+ standard:null,
|
|
|
|
|
+ dateOfCompliance:null,
|
|
|
|
|
+ certificateEvidence:null,
|
|
|
|
|
+ certificate:null, //回显时使用
|
|
|
|
|
+ certificateImgs:[], //实际获取到的图片地址
|
|
|
|
|
+ },
|
|
|
//表单验证
|
|
//表单验证
|
|
|
rules: {
|
|
rules: {
|
|
|
standard: [{ required: true, message: "请输入标准", trigger: "blur" }],
|
|
standard: [{ required: true, message: "请输入标准", trigger: "blur" }],
|
|
@@ -1142,9 +1163,9 @@ export default {
|
|
|
trigger: "blur",
|
|
trigger: "blur",
|
|
|
},
|
|
},
|
|
|
],
|
|
],
|
|
|
- // certificate: [
|
|
|
|
|
- // { validator: this.isreq, message: "请选择图片", trigger: "blur" },
|
|
|
|
|
- // ],
|
|
|
|
|
|
|
+ certificateImgs: [
|
|
|
|
|
+ { validator: formatRule, message: "请选择图片", trigger: "blur" },
|
|
|
|
|
+ ],
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
//基础信息key
|
|
//基础信息key
|
|
@@ -1318,13 +1339,6 @@ export default {
|
|
|
},
|
|
},
|
|
|
mounted() {},
|
|
mounted() {},
|
|
|
methods: {
|
|
methods: {
|
|
|
- isreq(rule, value, callback) {
|
|
|
|
|
- if (this.reqmsg) {
|
|
|
|
|
- callback(new Error("证书为必填项"));
|
|
|
|
|
- } else {
|
|
|
|
|
- callback();
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
// getImgUrl(fileList) {
|
|
// getImgUrl(fileList) {
|
|
|
// let matchResult = fileList.match(/\/statics(.*)/);
|
|
// let matchResult = fileList.match(/\/statics(.*)/);
|
|
|
// if (matchResult) {
|
|
// if (matchResult) {
|
|
@@ -1365,7 +1379,7 @@ export default {
|
|
|
this.orgimgs.push(img);
|
|
this.orgimgs.push(img);
|
|
|
},
|
|
},
|
|
|
uploaddetachedSuccess(img) {
|
|
uploaddetachedSuccess(img) {
|
|
|
- this.detachedimgs.push(img);
|
|
|
|
|
|
|
+ this.formData.certificateImgs.push(img);
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
handleInput() {
|
|
handleInput() {
|
|
@@ -1539,7 +1553,7 @@ export default {
|
|
|
if(this.Businessimgs.length>1){
|
|
if(this.Businessimgs.length>1){
|
|
|
this.Businessform.certificate= this.Businessimgs[this.Businessimgs.length - 1].toString(",");
|
|
this.Businessform.certificate= this.Businessimgs[this.Businessimgs.length - 1].toString(",");
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
this.$refs.Businessform.validate((valid) => {
|
|
this.$refs.Businessform.validate((valid) => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
// 表单验证通过,提交数据或执行其他操作
|
|
// 表单验证通过,提交数据或执行其他操作
|
|
@@ -1643,7 +1657,7 @@ export default {
|
|
|
this.Bankform.certificate= this.Bankimgs[this.Bankimgs.length - 1].toString(",");
|
|
this.Bankform.certificate= this.Bankimgs[this.Bankimgs.length - 1].toString(",");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
this.$refs.Bankform.validate((valid) => {
|
|
this.$refs.Bankform.validate((valid) => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
// 表单验证通过,提交数据或执行其他操作
|
|
// 表单验证通过,提交数据或执行其他操作
|
|
@@ -1740,17 +1754,16 @@ export default {
|
|
|
},
|
|
},
|
|
|
/** 提交按钮 */
|
|
/** 提交按钮 */
|
|
|
submitdetachedForm() {
|
|
submitdetachedForm() {
|
|
|
- if(this.detachedimgs.length>1){
|
|
|
|
|
- this.detachedform.certificate= this.detachedimgs[this.detachedimgs.length - 1].toString(",");
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+ // if(this.detachedimgs.length>1){
|
|
|
|
|
+ // this.detachedform.certificate= this.detachedimgs[this.detachedimgs.length - 1].toString(",");
|
|
|
|
|
+ // }
|
|
|
|
|
+ //
|
|
|
this.$refs.detachedform.validate((valid) => {
|
|
this.$refs.detachedform.validate((valid) => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
// 表单验证通过,提交数据或执行其他操作
|
|
// 表单验证通过,提交数据或执行其他操作
|
|
|
this.detachedform.orgId = this.$route.params.id;
|
|
this.detachedform.orgId = this.$route.params.id;
|
|
|
this.detachedform.type = 4;
|
|
this.detachedform.type = 4;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
if (this.detachedform.id != null) {
|
|
if (this.detachedform.id != null) {
|
|
|
updateOrgPhysicalDefenseConstruction(this.detachedform).then(
|
|
updateOrgPhysicalDefenseConstruction(this.detachedform).then(
|
|
|
(response) => {
|
|
(response) => {
|
|
@@ -1845,13 +1858,13 @@ export default {
|
|
|
if(this.orgimgs.length>1){
|
|
if(this.orgimgs.length>1){
|
|
|
this.orgform.certificate= this.orgimgs[this.orgimgs.length - 1].toString(",");
|
|
this.orgform.certificate= this.orgimgs[this.orgimgs.length - 1].toString(",");
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
this.$refs.orgform.validate((valid) => {
|
|
this.$refs.orgform.validate((valid) => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
// 表单验证通过,提交数据或执行其他操作
|
|
// 表单验证通过,提交数据或执行其他操作
|
|
|
this.orgform.orgId = this.$route.params.id;
|
|
this.orgform.orgId = this.$route.params.id;
|
|
|
this.orgform.type = 1;
|
|
this.orgform.type = 1;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
if (this.orgform.id != null) {
|
|
if (this.orgform.id != null) {
|
|
|
updateOrgPhysicalDefenseConstruction(this.orgform).then(
|
|
updateOrgPhysicalDefenseConstruction(this.orgform).then(
|
|
|
(response) => {
|
|
(response) => {
|