|
|
@@ -92,7 +92,6 @@
|
|
|
v-model="formData.execOrgType"
|
|
|
placeholder="请选择履职机构类型"
|
|
|
clearable
|
|
|
-
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="item in dict.type.sys_org_type"
|
|
|
@@ -109,7 +108,7 @@
|
|
|
<el-select
|
|
|
@visible-change="getRolesByOrg"
|
|
|
label="履职角色"
|
|
|
- v-model="formData.resumptionRole"
|
|
|
+ v-model="formData.roleList"
|
|
|
placeholder="请选择履职角色"
|
|
|
multiple
|
|
|
filterable
|
|
|
@@ -156,33 +155,43 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- <el-form-item prop="description" label="备注">
|
|
|
+ <el-form-item prop="note" label="备注">
|
|
|
<el-input
|
|
|
- v-model="formData.description"
|
|
|
+ v-model="formData.note"
|
|
|
:maxlength="255"
|
|
|
clearable
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
- <el-button>新增履职内容</el-button>
|
|
|
+ <el-button @click="openSelect">新增履职内容</el-button>
|
|
|
+
|
|
|
<el-table :data="tableData" style="width: 100%">
|
|
|
- <el-table-column
|
|
|
- :prop="propItem.prop"
|
|
|
- :label="propItem.label"
|
|
|
- v-for="propItem in propList"
|
|
|
- :key="propItem.prop"
|
|
|
- >
|
|
|
- <template v-slot="{ row }">
|
|
|
- <span v-if="!propItem.component">{{ row[propItem.prop] }}</span>
|
|
|
- <component
|
|
|
- v-else
|
|
|
- v-bind:is="propItem.component"
|
|
|
- size="mini"
|
|
|
- type="text"
|
|
|
- icon="el-icon-edit"
|
|
|
- @click="removeRow(index)"
|
|
|
- >删除</component
|
|
|
- >
|
|
|
+ <el-table-column label="是否扫描" >
|
|
|
+ <template v-slot="{ row }">
|
|
|
+ <el-switch
|
|
|
+ v-model="row.pointScan"
|
|
|
+ active-text="是"
|
|
|
+ inactive-text="否">
|
|
|
+ </el-switch>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="必须履职" >
|
|
|
+ <template v-slot="{ row }">
|
|
|
+ <el-switch
|
|
|
+ v-model="row.required"
|
|
|
+ active-text="是"
|
|
|
+ inactive-text="否">
|
|
|
+ </el-switch>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="ruleName" label="履职内容库" > </el-table-column>
|
|
|
+ <el-table-column prop="itemName" label="履职项" > </el-table-column>
|
|
|
+ <el-table-column prop="pointName" label="履职内容" > </el-table-column>
|
|
|
+ <el-table-column prop="areaName" label="履职区域" > </el-table-column>
|
|
|
+ <el-table-column prop="areaName" label="操作" >
|
|
|
+ <template v-slot="{ row }">
|
|
|
+ <el-button type="text" @click="removeRow(row)">删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -193,6 +202,12 @@
|
|
|
<el-button type="primary" @click="onSubmit">确定</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+ <DialogSelect
|
|
|
+ ref="DialogSelect"
|
|
|
+ :defaultSelect=defaultSelect
|
|
|
+ :orgType="formData.execOrgType"
|
|
|
+ @select="onSelect"
|
|
|
+ ></DialogSelect>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -201,7 +216,7 @@ import { mapGetters } from "vuex";
|
|
|
import * as api from "@/api/resumption/plan";
|
|
|
import { statusOptions } from "./../../commonOption";
|
|
|
import { listRole } from "@/api/system/role";
|
|
|
-
|
|
|
+import DialogSelect from "@/views/resumption/ruleManager/dialog.select.point.vue";
|
|
|
export default {
|
|
|
dicts: [
|
|
|
"resumption_plan_type",
|
|
|
@@ -217,6 +232,7 @@ export default {
|
|
|
// let o=statusOptions;
|
|
|
// debugger
|
|
|
return {
|
|
|
+ defaultSelect: [],
|
|
|
selectedValues: [],
|
|
|
resumptionRoles: [],
|
|
|
planName: null,
|
|
|
@@ -235,6 +251,10 @@ export default {
|
|
|
prop: "pointScan",
|
|
|
},
|
|
|
{
|
|
|
+ label: "itemId",
|
|
|
+ prop: "itemId",
|
|
|
+ },
|
|
|
+ {
|
|
|
label: "必须履职",
|
|
|
prop: "required",
|
|
|
},
|
|
|
@@ -284,7 +304,7 @@ export default {
|
|
|
},
|
|
|
watch: {},
|
|
|
computed: {
|
|
|
- ...mapGetters(['orgId',"orgName"]),
|
|
|
+ ...mapGetters(["orgId", "orgName"]),
|
|
|
},
|
|
|
methods: {
|
|
|
reset() {
|
|
|
@@ -300,10 +320,11 @@ export default {
|
|
|
tableData: null,
|
|
|
itemList: null,
|
|
|
planExec: null,
|
|
|
- count:0,
|
|
|
- note:null,
|
|
|
- planCreateOrgId:null,
|
|
|
- planCreateOrgName:null,
|
|
|
+ count: 0,
|
|
|
+ note: null,
|
|
|
+ planCreateOrgId: null,
|
|
|
+ planCreateOrgName: null,
|
|
|
+ roleList: null,
|
|
|
};
|
|
|
},
|
|
|
getRolesByOrg() {
|
|
|
@@ -322,6 +343,27 @@ export default {
|
|
|
async refresh(id, other) {
|
|
|
this.formData = id ? (await api.get(id)).data : this.reset(other);
|
|
|
},
|
|
|
+ onSelect(selectList){
|
|
|
+ console.log(selectList);
|
|
|
+ for(let i=0;i<selectList.length;i++){
|
|
|
+ let tem={
|
|
|
+ pointScan:selectList[i].pointScan,
|
|
|
+ required:selectList[i].required,
|
|
|
+ pointName:selectList[i].ruleName,
|
|
|
+ itemName:selectList[i].itemName,
|
|
|
+ itemDesc:selectList[i].pointName,
|
|
|
+ areaName:selectList[i].areaName,
|
|
|
+ itemId:selectList[i].itemId,
|
|
|
+ }
|
|
|
+ if(this.tableData==null){
|
|
|
+ this.tableData=[];
|
|
|
+ }
|
|
|
+ this.tableData.push(tem);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
async show(id, other = {}) {
|
|
|
this.id = id;
|
|
|
this.tableData = null;
|
|
|
@@ -337,34 +379,49 @@ export default {
|
|
|
|
|
|
this.isShow = true;
|
|
|
},
|
|
|
- removeRow(index) {
|
|
|
- this.tableData.splice(index, 1);
|
|
|
+ removeRow(row) {
|
|
|
+ this.tableData = this.tableData.filter(item => item !== row)
|
|
|
+ // this.tableData.splice(index, 1);
|
|
|
},
|
|
|
// 事件
|
|
|
onHide() {
|
|
|
this.isShow = false;
|
|
|
},
|
|
|
+ getIteamF(){
|
|
|
+ if(this.id==null){
|
|
|
+ this.defaultSelect=[];
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ api.getPointIds(this.id).then((res) => {
|
|
|
+ this.defaultSelect = res.data;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ openSelect() {
|
|
|
+
|
|
|
+ this.getIteamF();
|
|
|
+ this.$refs.DialogSelect.show();
|
|
|
+ },
|
|
|
onSubmit() {
|
|
|
this.$refs.form.validate(async (isValidate) => {
|
|
|
- this.formData.note = this.formData.description;
|
|
|
- this.formData.planCreateOrgId=this.orgId;
|
|
|
- this.formData.planCreateOrgName=this.orgName;
|
|
|
+ // this.formData.note = this.formData.description;
|
|
|
+ this.formData.planCreateOrgId = this.orgId;
|
|
|
+ this.formData.planCreateOrgName = this.orgName;
|
|
|
if (!isValidate) return;
|
|
|
- this.formData.itemList = this.tableData==null?[]:this.tableData;
|
|
|
+ this.formData.itemList = this.tableData == null ? [] : this.tableData;
|
|
|
this.formData.roleList = this.selectedValues;
|
|
|
await api.update(this.formData);
|
|
|
this.$emit("success");
|
|
|
this.onHide();
|
|
|
});
|
|
|
},
|
|
|
- handleRolesChange(val){
|
|
|
- this.selectedValues = val.toString().split(',');
|
|
|
+ handleRolesChange(val) {
|
|
|
+ this.selectedValues = val.toString().split(",");
|
|
|
},
|
|
|
// 事件
|
|
|
//apimark//
|
|
|
},
|
|
|
mounted() {},
|
|
|
- components: {},
|
|
|
+ components: {DialogSelect},
|
|
|
};
|
|
|
</script>
|
|
|
|