|
|
@@ -20,13 +20,13 @@
|
|
|
<el-input type="textarea" :rows="3" v-model="formData.name" placeholder="请输入履职内容" maxlength="255"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="履职区域" prop="areaId">
|
|
|
- <el-select style="width: 100%;" v-model="formData.areaId" placeholder="请选择履职区域" @change="onAreaChanged"
|
|
|
+ <el-select style="width: 100%;" v-model="formData.areaId" placeholder="请选择履职区域" @clear="onClearArea" @change="onAreaChanged"
|
|
|
clearable>
|
|
|
<el-option v-for="item in areas" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
|
- </el-select>
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="履职点位" prop="checkId">
|
|
|
- <el-select style="width: 100%;" v-model="formData.checkId" placeholder="请选择履职点位" @change="onCheckChanged"
|
|
|
+ <el-select style="width: 100%;" v-model="formData.checkId" placeholder="请选择履职点位" @clear="onClearCheck" @change="onCheckChanged"
|
|
|
clearable>
|
|
|
<el-option v-for="item in checks" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
|
</el-select>
|
|
|
@@ -48,7 +48,7 @@
|
|
|
<el-button type="primary" @click="onSubmit()">{{
|
|
|
index >= 0 ? "保 存" : "添 加"
|
|
|
}}</el-button>
|
|
|
- <el-button @click="dataVisible = false">取 消</el-button>
|
|
|
+ <el-button @click="dataVisible = false">取 消</el-button>
|
|
|
</div>
|
|
|
</DialogCom>
|
|
|
</div>
|
|
|
@@ -112,7 +112,7 @@ export default {
|
|
|
|
|
|
if (this.currentOrgType != this.rule.orgType) {
|
|
|
this.currentOrgType = this.rule.orgType;
|
|
|
- allAreaByOrgtype(this.rule.orgType).then((d) => {
|
|
|
+ allAreaByOrgtype(this.rule.orgType).then((d) => {
|
|
|
this.areas = d.data;
|
|
|
});
|
|
|
|
|
|
@@ -127,7 +127,7 @@ export default {
|
|
|
if(this.formData.name){
|
|
|
this.formData.name=this.formData.name.trim();
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
this.$refs.form.validate((isValidate) => {
|
|
|
if (!isValidate) return;
|
|
|
if(!this.formData.checkId && !this.formData.areaId){
|
|
|
@@ -148,6 +148,15 @@ export default {
|
|
|
onHide() {
|
|
|
this.isShow = false;
|
|
|
},
|
|
|
+ onClearArea(){
|
|
|
+ this.formData.areaName = null;
|
|
|
+ this.formData.areaId = null;
|
|
|
+
|
|
|
+ },
|
|
|
+ onClearCheck(){
|
|
|
+ this.formData.checkName = null;
|
|
|
+ this.formData.checkId = null;
|
|
|
+ },
|
|
|
onAreaChanged(val) {
|
|
|
let area = this.areas.find((a) => a.id === val);
|
|
|
if (area) {
|