|
|
@@ -92,6 +92,7 @@
|
|
|
v-model="formData.execOrgType"
|
|
|
placeholder="请选择履职机构类型"
|
|
|
clearable
|
|
|
+
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="item in dict.type.sys_org_type"
|
|
|
@@ -104,18 +105,21 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
- <el-form-item prop="roleNames" label="履职角色:">
|
|
|
+ <el-form-item prop="roleList" label="履职角色:">
|
|
|
<el-select
|
|
|
+ @visible-change="getRolesByOrg"
|
|
|
label="履职角色"
|
|
|
- v-model="formData.roleNames"
|
|
|
+ v-model="formData.resumptionRole"
|
|
|
placeholder="请选择履职角色"
|
|
|
- clearable
|
|
|
+ multiple
|
|
|
+ filterable
|
|
|
+ @change="handleRolesChange"
|
|
|
>
|
|
|
<el-option
|
|
|
- v-for="item in roleNames"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"
|
|
|
+ v-for="item in resumptionRoles"
|
|
|
+ :key="item.index"
|
|
|
+ :label="item.roleName"
|
|
|
+ :value="item.id"
|
|
|
>
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
@@ -142,14 +146,13 @@
|
|
|
<el-col :span="6">
|
|
|
<el-form-item prop="count" label="履职次数:">
|
|
|
<el-input-number
|
|
|
- style="margin-left: 10px"
|
|
|
- v-model="count"
|
|
|
- controls-position="right"
|
|
|
- @change="handleChange"
|
|
|
- :min="1"
|
|
|
- :max="10"
|
|
|
- ></el-input-number>
|
|
|
-
|
|
|
+ style="margin-left: 10px"
|
|
|
+ v-model="formData.count"
|
|
|
+ controls-position="right"
|
|
|
+ @change="handleChange"
|
|
|
+ :min="1"
|
|
|
+ :max="10"
|
|
|
+ ></el-input-number>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
@@ -194,27 +197,37 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { mapState, mapMutations } from "vuex";
|
|
|
+import { mapGetters } from "vuex";
|
|
|
import * as api from "@/api/resumption/plan";
|
|
|
import { statusOptions } from "./../../commonOption";
|
|
|
+import { listRole } from "@/api/system/role";
|
|
|
|
|
|
export default {
|
|
|
- dicts: ['resumption_plan_type',"resumption_plan_cycle","resumption_org_type","resumption_plan_status","sys_org_type","resumption_plan_exec"],
|
|
|
+ dicts: [
|
|
|
+ "resumption_plan_type",
|
|
|
+ "resumption_plan_cycle",
|
|
|
+ "resumption_org_type",
|
|
|
+ "resumption_plan_status",
|
|
|
+ "sys_org_type",
|
|
|
+ "resumption_plan_exec",
|
|
|
+ ],
|
|
|
data() {
|
|
|
// const params = this.$route.params;
|
|
|
// let o1=options;
|
|
|
// let o=statusOptions;
|
|
|
// debugger
|
|
|
return {
|
|
|
+ selectedValues: [],
|
|
|
+ resumptionRoles: [],
|
|
|
planName: null,
|
|
|
- planType: null,
|
|
|
- planCycle: null,
|
|
|
- planStatus: null,
|
|
|
- execOrgType: null,
|
|
|
- roleNames: null,
|
|
|
- planExec:null,
|
|
|
- count: null,
|
|
|
- description: null,
|
|
|
+ planType: null,
|
|
|
+ planCycle: null,
|
|
|
+ planStatus: null,
|
|
|
+ execOrgType: null,
|
|
|
+ roleNames: null,
|
|
|
+ planExec: null,
|
|
|
+ count: 0,
|
|
|
+ description: null,
|
|
|
propItem: "",
|
|
|
propList: [
|
|
|
{
|
|
|
@@ -271,10 +284,9 @@ export default {
|
|
|
},
|
|
|
watch: {},
|
|
|
computed: {
|
|
|
- ...mapState([]),
|
|
|
+ ...mapGetters(['orgId',"orgName"]),
|
|
|
},
|
|
|
methods: {
|
|
|
- ...mapMutations([]),
|
|
|
reset() {
|
|
|
return {
|
|
|
planName: null,
|
|
|
@@ -285,28 +297,44 @@ export default {
|
|
|
roleNames: null,
|
|
|
count: null,
|
|
|
description: null,
|
|
|
- tableData:null,
|
|
|
- itemList:null,
|
|
|
- planExec:null,
|
|
|
+ tableData: null,
|
|
|
+ itemList: null,
|
|
|
+ planExec: null,
|
|
|
+ count:0,
|
|
|
+ note:null,
|
|
|
+ planCreateOrgId:null,
|
|
|
+ planCreateOrgName:null,
|
|
|
+ };
|
|
|
+ },
|
|
|
+ getRolesByOrg() {
|
|
|
+ let params = {
|
|
|
+ orgType: this.formData.execOrgType,
|
|
|
};
|
|
|
+ listRole(params).then((res) => {
|
|
|
+ // console.info(res);
|
|
|
+ this.resumptionRoles = res.rows;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ handleChange(value) {
|
|
|
+ console.log(value);
|
|
|
+ this.count = value;
|
|
|
},
|
|
|
- handleChange(value) {},
|
|
|
async refresh(id, other) {
|
|
|
this.formData = id ? (await api.get(id)).data : this.reset(other);
|
|
|
},
|
|
|
async show(id, other = {}) {
|
|
|
this.id = id;
|
|
|
- this.tableData=null;
|
|
|
- this.formData.itemList=null;
|
|
|
+ this.tableData = null;
|
|
|
+ this.formData.itemList = null;
|
|
|
await this.refresh(id, other);
|
|
|
- console.log(id)
|
|
|
- if(id!==undefined){
|
|
|
+ console.log(id);
|
|
|
+ if (id !== undefined) {
|
|
|
await api.get(id).then((res) => {
|
|
|
- console.log(res);
|
|
|
- this.tableData = res.data.itemList;
|
|
|
- });
|
|
|
+ console.log(res);
|
|
|
+ this.tableData = res.data.itemList;
|
|
|
+ });
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
this.isShow = true;
|
|
|
},
|
|
|
removeRow(index) {
|
|
|
@@ -318,15 +346,20 @@ export default {
|
|
|
},
|
|
|
onSubmit() {
|
|
|
this.$refs.form.validate(async (isValidate) => {
|
|
|
- console.log(this.formData)
|
|
|
+ this.formData.note = this.formData.description;
|
|
|
+ this.formData.planCreateOrgId=this.orgId;
|
|
|
+ this.formData.planCreateOrgName=this.orgName;
|
|
|
if (!isValidate) return;
|
|
|
- this.formData.itemList=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(',');
|
|
|
+ },
|
|
|
// 事件
|
|
|
//apimark//
|
|
|
},
|