main
laozt 1 year ago
parent d2d51c6ea1
commit b84ee37001

@ -252,7 +252,7 @@ export default {
deptId: null, deptId: null,
district: null, district: null,
plannedYear: null, plannedYear: null,
isPoint: 1, isPoint: null,
enterpriseName: null, enterpriseName: null,
lawSort: null, lawSort: null,
lawAreas: null, lawAreas: null,

@ -252,7 +252,7 @@ export default {
deptId: null, deptId: null,
district: null, district: null,
plannedYear: null, plannedYear: null,
isPoint: 2, isPoint: null,
enterpriseName: null, enterpriseName: null,
lawSort: null, lawSort: null,
lawAreas: null, lawAreas: null,

@ -156,22 +156,32 @@ export default {
methods: { methods: {
onSubmit() { onSubmit() {
let ids = []; let ids = [];
let isSubmit = true;
this.enterpriseList.map((item) => { this.enterpriseList.map((item) => {
ids.push(item.id); ids.push(item.id);
console.log(item.id, item.plannedMonth);
if (item.plannedMonth == "") {
this.$modal.msgError(`请填写月份后,提交数据!`);
isSubmit = false;
}
}); });
updateIdList(ids.join(",")).then((response) => { if (isSubmit) {
this.$modal.msgSuccess("提交成功"); updateIdList(ids.join(",")).then((response) => {
this.$emit("closeDialogtabs"); this.$modal.msgSuccess("提交成功");
this.getList(); this.$emit("closeDialogtabs");
}); this.getList();
});
}
}, },
// //
editMonth(row) { editMonth(row) {
let _this = this; let _this = this;
let plannedMonth = this.$moment(new Date()).format("MM");
this.$prompt("请输入月份", "编辑", { this.$prompt("请输入月份", "编辑", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
inputValue: row.plannedMonth, inputValue: row.plannedMonth ? row.plannedMonth :plannedMonth,
inputPlaceholder: "请输入1到12的数字", inputPlaceholder: "请输入1到12的数字",
inputPattern: /^(1[0-2]|[1-9])$/, inputPattern: /^(1[0-2]|[1-9])$/,
inputErrorMessage: "格式不正确", inputErrorMessage: "格式不正确",

@ -15,7 +15,7 @@
:show-all-levels="false" :show-all-levels="false"
:disabled="isNoneDivision" :disabled="isNoneDivision"
:props="props" :props="props"
@change="getData" @change="onChange"
v-if="isShow" v-if="isShow"
></el-cascader> ></el-cascader>
<el-input v-model="text" placeholder="" :disabled="!isShow" v-else /> <el-input v-model="text" placeholder="" :disabled="!isShow" v-else />
@ -103,24 +103,28 @@ export default {
// console.log(JSON.stringify(this.compartment)); // console.log(JSON.stringify(this.compartment));
this.$emit("quhuadizhi", this.compartment); this.$emit("quhuadizhi", this.compartment);
}, },
getData(e) { onChange(e) {
if (!this.none) { console.log(e);
if (e.length == 1) { console.log(e[e.length - 1]);
this.$emit("quhua", e[0].slice(0, 7)); this.$emit("quhua",e[e.length - 1]);
} else if (e.length == 2 && e[0] == e[1]) { this.$emit("change",e[e.length - 1]);
this.$emit("quhua", e[0].slice(0, 7)); // if (!this.none) {
} else { // if (e.length == 1) {
this.$emit("quhua", e[1].slice(0, 10)); // this.$emit("quhua", e[0].slice(0, 7));
} // } else if (e.length == 2 && e[0] == e[1]) {
} else { // this.$emit("quhua", e[0].slice(0, 7));
if (e.length == 1) { // } else {
this.$emit("quhua", e[0]); // this.$emit("quhua", e[1].slice(0, 10));
} else if (e.length == 2 && e[0] == e[1]) { // }
this.$emit("quhua", e[0]); // } else {
} else { // if (e.length == 1) {
this.$emit("quhua", e[1]); // this.$emit("quhua", e[0]);
} // } else if (e.length == 2 && e[0] == e[1]) {
} // this.$emit("quhua", e[0]);
// } else {
// this.$emit("quhua", e[1]);
// }
// }
}, },
}, },
}; };

@ -51,10 +51,10 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="行政区划" prop="district"> <el-form-item label="行政区划" prop="district">
<executive @quhua="quhua" @quhuadizhi="quhuadizhi" ref="executive" /> <executive @change="onChange" @quhuadizhi="quhuadizhi" ref="executive" />
</el-form-item> </el-form-item>
<el-form-item label="执法层级" prop="lawHierarchy"> <el-form-item label="执法层级" prop="lawHierarchy">
<!-- <el-select <el-select
v-model="queryParams.lawHierarchy" v-model="queryParams.lawHierarchy"
placeholder="请选择执法层级" placeholder="请选择执法层级"
filterable filterable
@ -66,7 +66,7 @@
:value="item.value" :value="item.value"
> >
</el-option> </el-option>
</el-select> --> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="是否省重点" prop="isPoint"> <el-form-item label="是否省重点" prop="isPoint">
<el-radio-group v-model="queryParams.isPoint"> <el-radio-group v-model="queryParams.isPoint">
@ -313,7 +313,8 @@ export default {
}, },
methods: { methods: {
// //
quhua(e) { onChange(e) {
console.log(1,e);
this.queryParams.district = e; this.queryParams.district = e;
}, },
multipleChange(e) { multipleChange(e) {

Loading…
Cancel
Save