yangzhou-cyber 3年前
コミット
19410d03c6
6個のファイルの変更767行の追加703行の削除
  1. +106
    -19
      src/views/chain/assessmentContent.vue
  2. +3
    -3
      src/views/chain/search.vue
  3. +13
    -16
      src/views/second/segmentation/contentDetail.vue
  4. +212
    -223
      src/views/second/taskSummary/basicTable.vue
  5. +217
    -221
      src/views/second/taskSummary/constraint.vue
  6. +216
    -221
      src/views/second/taskSummary/reward.vue

+ 106
- 19
src/views/chain/assessmentContent.vue ファイルの表示

@@ -1,9 +1,9 @@
<template>
<div class="software ele-body">
<el-card shadow="never" element-loading-background="rgba(255, 255, 255, 1)">
<search @search:task="updateParams($event)" :category-list="dataList"/>
<search @search:task="updateParams($event)" :category-list="dataList" />
<div class="operating">
<el-button size="small" type="primary" @click="edit()"
<el-button size="small" type="primary" @click="edit('add')"
>新增考核内容</el-button
>
</div>
@@ -75,7 +75,7 @@
<el-col :span="4" align="center" class="td"
><span class="cell"
><el-link
@click="edit(index, ind)"
@click="edit('edit', index, ind)"
icon="el-icon-edit"
type="primary"
:underline="false"
@@ -112,28 +112,43 @@
@submit.native.prevent
:rules="rules"
>
<el-form-item label="产业链名称:" prop="">
<el-select placeholder="请选择产业链名称">
<el-option></el-option>
<el-form-item label="产业链名称:" prop="categoryId">
<el-select v-model="form.categoryId" filterable clearable>
<el-option
v-for="(item, index) of dataList"
:key="index"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="考核指标:" prop="">
<el-select placeholder="请选择考核指标">
<el-option prop=""></el-option>
<el-form-item label="考核指标:" prop="type">
<el-select v-model="form.type" filterable clearable>
<el-option
v-for="(item, index) of quotaList"
:key="index"
:label="item.quota"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="指标内容:" prop="">
<el-form-item label="指标内容:" prop="content">
<el-input
type="textarea"
:rows="5"
placeholder="请输入考核内容"
v-model="form.content"
></el-input>
</el-form-item>
<el-form-item label="分值:" prop="">
<el-input placeholder="请输入分值"></el-input>
<el-form-item label="分值:" prop="points">
<el-input placeholder="请输入分值" v-model="form.points"></el-input>
</el-form-item>
<el-form-item label="牵头部门:" prop="">
<el-form-item label="得分:" prop="score">
<el-input placeholder="请输入得分" v-model="form.score"></el-input>
</el-form-item>
<el-form-item label="牵头部门:" prop="leaderDept">
<treeselect
v-model="form.leaderDept"
:disable-branch-nodes="true"
:flat="true"
:options="formatDep"
@@ -154,8 +169,9 @@
"
/>
</el-form-item>
<el-form-item label="配合部门:" prop="">
<el-form-item label="配合部门:" prop="cooperateDept">
<treeselect
v-model="form.cooperateDept"
:disable-branch-nodes="true"
:flat="true"
:options="formatDep"
@@ -203,11 +219,17 @@ export default {
dataList: [],
tableHeight: document.documentElement.clientHeight - 310,
showEdit: false,
action: "",
title: "",
form: {},
rules: {},
loading: false,
dialogTitle: "",
quotaList: [
{ id: 1, quota: "重点指标" },
{ id: 2, quota: "重点任务" },
{ id: 3, quota: "加减分考核" },
],
};
},
created() {
@@ -233,16 +255,81 @@ export default {
this.loading = false;
});
},
edit(index, ind) {
edit(type, index, ind) {
this.showEdit = true;
let title = "新增考核内容";
if (index && ind) {
console.log("编辑");
let title;
if (type == "edit") {
title = "编辑考核内容";
this.action = "edit";
}
if (type == "add") {
title = "新增考核内容";
this.action = "add";
}
this.dialogTitle = title;
},
save() {},
save(type) {
let form = JSON.parse(JSON.stringify(this.form));
for (let key in form) {
console.log(key, form[key]);
if (!form[key]) {
this.$message({
type: "warning",
message: "请完善信息",
});
return;
}
if (Array.isArray(form[key])) {
if (form[key].length == 0) {
this.$message({
type: "warning",
message: "请完善信息",
});
return;
}
}
if (key == "points" || key == "score") {
if (parseInt(form[key]) !== parseInt(form[key])) {
this.$message({
type: "warning",
message: "分数类请输入数字",
});
return;
}
}
if (typeof form[key] == "string" && !form[key].trim()) {
this.$message({
type: "warning",
message: "请完善信息",
});
return;
}
}
try {
form.leaderDept = form.leaderDept.join(",");
form.cooperateDept = form.cooperateDept.join(",");
} catch (e) {
this.$message({ type: "warning", message: "请完善信息" });
return
}
if (this.action == "edit") {
}
if (this.action == "add") {
api
.add(form)
.then((res) => {
this.$message({
type: "success",
message: "添加考核目标内容失败",
});
this.getList();
})
.then((e) => {
this.$message.error("添加考核目标内容失败");
});
}
},
},
computed: {
...mapGetters(["formatDep"]),

+ 3
- 3
src/views/chain/search.vue ファイルの表示

@@ -1,8 +1,8 @@
<template>
<div class="search">
<el-form :inline="true" :model="searchParams" size="small">
<el-form-item label="考核指标">
<el-select v-model="searchParams.categoryId">
<el-form-item label="产业链名称:">
<el-select v-model="searchParams.categoryId" placeholder="请选择产业链名称">
<el-option
v-for="(item, index) of categoryList"
:key="index"
@@ -12,7 +12,7 @@
</el-select>
</el-form-item>
<el-form-item label="考核指标">
<el-select v-model="searchParams.type ">
<el-select v-model="searchParams.type " placeholder="请选择考核指标">
<el-option
v-for="(item, index) of quotaList"
:key="index"

+ 13
- 16
src/views/second/segmentation/contentDetail.vue ファイルの表示

@@ -489,22 +489,19 @@ export default {
data[map[this.type]].push({ add: true });
}
if (type == "edit") {
let form = JSON.parse(
JSON.stringify(this.data[map[this.type]][index])
);
form.cooperateDept = form.cooperateDept
.split(",")
.map((item) => parseInt(item));
form.cooperatePrincipal = form.cooperatePrincipal
.split(",")
.map((item) => parseInt(item));
form.otherDept = form.otherDept
.split(",")
.map((item) => parseInt(item));
form.otherPrincipal = form.otherPrincipal
.split(",")
.map((item) => parseInt(item));
console.log(form);
let form = JSON.parse(JSON.stringify(row));
form.cooperateDept =
form.cooperateDept &&
form.cooperateDept.split(",").map((item) => parseInt(item));
form.cooperatePrincipal =
form.cooperatePrincipal &&
form.cooperatePrincipal.split(",").map((item) => parseInt(item));
form.otherDept =
form.otherDept &&
form.otherDept.split(",").map((item) => parseInt(item));
form.otherPrincipal =
form.otherPrincipal &&
form.otherPrincipal.split(",").map((item) => parseInt(item));
this.form = form;
this.$set(this.data[map[this.type]][index], "edit", true);
}

+ 212
- 223
src/views/second/taskSummary/basicTable.vue ファイルの表示

@@ -128,223 +128,212 @@
@closed="form = {}"
>
<!-- <el-scrollbar style="height: 50vh"> -->
<el-row>
<el-col :span="4" class="title">考核内容:</el-col>
<el-col :span="18"
><el-input
type="textarea"
:rows="4"
placeholder="请输入考核内容"
v-model="form.itemContent"
></el-input
></el-col>
</el-row>
<el-row>
<el-col :span="4" class="title"> 牵头部门: </el-col>
<el-col :span="7">
<treeselect
:disable-branch-nodes="true"
@input="changePrincipal($event, 'leader')"
v-model="form.leaderDept"
:options="formatDep"
placeholder="请选择牵头部门"
:defaultExpandLevel="2"
:normalizer="
(d) => {
return {
id: d.id,
label: d.name,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
<el-col :span="4" class="title"> 责任领导: </el-col>
<el-col :span="7">
<treeselect
:disable-branch-nodes="true"
v-model="form.leaderPrincipal"
:options="principalList"
placeholder="请选择牵头部门责任领导"
:defaultExpandLevel="1"
:normalizer="
(d) => {
return {
id: d.id,
label: d.realname,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
</el-row>
<div class="leader">
<div
style="
display: flex;
justify-content: center;
margin-bottom: 20px;
<el-row>
<el-col :span="4" class="title">考核内容:</el-col>
<el-col :span="18"
><el-input
type="textarea"
:rows="4"
placeholder="请输入考核内容"
v-model="form.itemContent"
></el-input
></el-col>
</el-row>
<el-row>
<el-col :span="4" class="title"> 牵头部门: </el-col>
<el-col :span="7">
<treeselect
:disable-branch-nodes="true"
@input="changePrincipal($event, 'leader')"
v-model="form.leaderDept"
:options="formatDep"
placeholder="请选择牵头部门"
:defaultExpandLevel="2"
:normalizer="
(d) => {
return {
id: d.id,
label: d.name,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
<el-col :span="4" class="title"> 责任领导: </el-col>
<el-col :span="7">
<treeselect
:disable-branch-nodes="true"
v-model="form.leaderPrincipal"
:options="principalList"
placeholder="请选择牵头部门责任领导"
:defaultExpandLevel="1"
:normalizer="
(d) => {
return {
id: d.id,
label: d.realname,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
</el-row>
<div class="leader">
<div
style="display: flex; justify-content: center; margin-bottom: 20px"
>
<el-button type="primary" @click="addDept('other')"
>添加其他牵头部门</el-button
>
<el-button type="primary" @click="addDept('other')"
>添加其他牵头部门</el-button
>
</div>
<!-- <span
</div>
<!-- <span
class="el-icon-circle-plus-outline add"
@click="addDept('other')"
></span> -->
<div
style="position: relative"
v-for="(item, index) of form.otherDept"
:key="index"
>
<span
class="el-icon-remove-outline delete"
style="z-index: 10"
@click="deleteDept(index, 'other')"
></span>
<el-row>
<el-col :span="4" class="title"> 其他牵头部门: </el-col>
<el-col :span="7">
<treeselect
:disable-branch-nodes="true"
@input="changePrincipal($event, 'other', index)"
v-model="form.otherDept[index]"
:options="formatDep"
placeholder="请选择其他牵头部门"
:defaultExpandLevel="2"
:normalizer="
(d) => {
return {
id: d.id,
label: d.name,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
<el-col :span="4" class="title"> 责任领导: </el-col>
<el-col :span="7">
<treeselect
:disable-branch-nodes="true"
v-model="form.otherPrincipal[index]"
:options="principalList"
placeholder="请选择其他牵头部门责任领导"
:defaultExpandLevel="1"
:normalizer="
(d) => {
return {
id: d.id,
label: d.realname,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
</el-row>
</div>
<div
style="position: relative"
v-for="(item, index) of form.otherDept"
:key="index"
>
<span
class="el-icon-remove-outline delete"
style="z-index: 10"
@click="deleteDept(index, 'other')"
></span>
<el-row>
<el-col :span="4" class="title"> 其他牵头部门: </el-col>
<el-col :span="7">
<treeselect
:disable-branch-nodes="true"
@input="changePrincipal($event, 'other', index)"
v-model="form.otherDept[index]"
:options="formatDep"
placeholder="请选择其他牵头部门"
:defaultExpandLevel="2"
:normalizer="
(d) => {
return {
id: d.id,
label: d.name,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
<el-col :span="4" class="title"> 责任领导: </el-col>
<el-col :span="7">
<treeselect
:disable-branch-nodes="true"
v-model="form.otherPrincipal[index]"
:options="principalList"
placeholder="请选择其他牵头部门责任领导"
:defaultExpandLevel="1"
:normalizer="
(d) => {
return {
id: d.id,
label: d.realname,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
</el-row>
</div>
<div class="cooperate">
<div
style="
display: flex;
justify-content: center;
margin-bottom: 20px;
"
</div>
<div class="cooperate">
<div
style="display: flex; justify-content: center; margin-bottom: 20px"
>
<el-button type="primary" @click="addDept('cooperate')"
>添加配合部门</el-button
>
<el-button type="primary" @click="addDept('cooperate')"
>添加配合部门</el-button
>
</div>
<!-- <span
</div>
<!-- <span
class="el-icon-circle-plus-outline add"
@click="addDept('cooperate')"
></span> -->
<div
style="position: relative"
v-for="(item, index) of form.cooperateDept"
:key="index"
>
<span
class="el-icon-remove-outline delete"
style="z-index: 10"
@click="deleteDept(index, 'cooperate')"
></span>
<el-row>
<el-col :span="4" class="title">配合部门: </el-col>
<el-col :span="7">
<treeselect
:disable-branch-nodes="true"
@input="changePrincipal($event, 'cooperate')"
v-model="form.cooperateDept[index]"
:options="formatDep"
placeholder="请选择配合部门"
:defaultExpandLevel="2"
:normalizer="
(d) => {
return {
id: d.id,
label: d.name,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
<el-col :span="4" class="title"> 责任领导: </el-col>
<el-col :span="7">
<treeselect
:disable-branch-nodes="true"
v-model="form.cooperatePrincipal[index]"
:options="principalList"
placeholder="请选择配合部门责任领导"
:defaultExpandLevel="1"
:normalizer="
(d) => {
return {
id: d.id,
label: d.realname,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
</el-row>
</div>
<div
style="position: relative"
v-for="(item, index) of form.cooperateDept"
:key="index"
>
<span
class="el-icon-remove-outline delete"
style="z-index: 10"
@click="deleteDept(index, 'cooperate')"
></span>
<el-row>
<el-col :span="4" class="title">配合部门: </el-col>
<el-col :span="7">
<treeselect
:disable-branch-nodes="true"
@input="changePrincipal($event, 'cooperate')"
v-model="form.cooperateDept[index]"
:options="formatDep"
placeholder="请选择配合部门"
:defaultExpandLevel="2"
:normalizer="
(d) => {
return {
id: d.id,
label: d.name,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
<el-col :span="4" class="title"> 责任领导: </el-col>
<el-col :span="7">
<treeselect
:disable-branch-nodes="true"
v-model="form.cooperatePrincipal[index]"
:options="principalList"
placeholder="请选择配合部门责任领导"
:defaultExpandLevel="1"
:normalizer="
(d) => {
return {
id: d.id,
label: d.realname,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
</el-row>
</div>
<el-row>
<el-col :span="4" class="title">分值:</el-col>
<el-col :span="7"
><el-input
placeholder="请输入分值"
v-model="form.points"
></el-input
></el-col>
</el-row>
</div>
<el-row>
<el-col :span="4" class="title">分值:</el-col>
<el-col :span="7"
><el-input placeholder="请输入分值" v-model="form.points"></el-input
></el-col>
</el-row>
<!-- </el-scrollbar> -->
<div slot="footer">
<el-button type="primary" @click="save">确定</el-button>
@@ -447,10 +436,14 @@ export default {
},
addDept(type) {
if (type == "other") {
this.form.otherDept = this.form.otherDept || [];
this.form.otherPrincipal = this.form.otherPrincipal || [];
this.form.otherDept.push(undefined);
this.form.otherPrincipal.push(undefined);
}
if (type == "cooperate") {
this.form.cooperateDept = this.form.cooperateDept || [];
this.form.cooperatePrincipal = this.form.cooperatePrincipal || [];
this.form.cooperateDept.push(undefined);
this.form.cooperatePrincipal.push(undefined);
}
@@ -495,22 +488,18 @@ export default {
edit(row) {
this.showEdit = true;
let form = JSON.parse(JSON.stringify(row));
// form.leaderDept = form.leaderDept
// .split(",")
// .map((item) => parseInt(item));
form.cooperateDept = form.cooperateDept
.split(",")
.map((item) => parseInt(item));
// form.leaderPrincipal = form.leaderPrincipal
// .split(",")
// .map((item) => parseInt(item));
form.cooperatePrincipal = form.cooperatePrincipal
.split(",")
.map((item) => parseInt(item));
form.otherDept = form.otherDept.split(",").map((item) => parseInt(item));
form.otherPrincipal = form.otherPrincipal
.split(",")
.map((item) => parseInt(item));
form.cooperateDept =
form.cooperateDept &&
form.cooperateDept.split(",").map((item) => parseInt(item));
form.cooperatePrincipal =
form.cooperatePrincipal &&
form.cooperatePrincipal.split(",").map((item) => parseInt(item));
form.otherDept =
form.otherDept &&
form.otherDept.split(",").map((item) => parseInt(item));
form.otherPrincipal =
form.otherPrincipal &&
form.otherPrincipal.split(",").map((item) => parseInt(item));
this.form = form;
},
save() {
@@ -641,7 +630,7 @@ export default {
/deep/ .el-dialog__body {
padding-right: 0;
padding-left: 0;
max-height:60vh;
max-height: 60vh;
overflow-y: scroll;
}
</style>

+ 217
- 221
src/views/second/taskSummary/constraint.vue ファイルの表示

@@ -124,220 +124,216 @@
@closed="form = {}"
>
<!-- <el-scrollbar style="height: 50vh"> -->
<el-row>
<el-col :span="4" class="title">考核内容:</el-col>
<el-col :span="18"
><el-input
type="textarea"
:rows="4"
placeholder="请输入考核内容"
v-model="form.itemContent"
></el-input
></el-col>
</el-row>
<el-row>
<el-col :span="4" class="title"> 牵头部门: </el-col>
<el-col :span="7">
<treeselect
:disable-branch-nodes="true"
@input="changePrincipal($event, 'leader')"
v-model="form.leaderDept"
:options="formatDep"
placeholder="请选择牵头部门"
:defaultExpandLevel="2"
:normalizer="
(d) => {
return {
id: d.id,
label: d.name,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
<el-col :span="4" class="title"> 责任领导: </el-col>
<el-col :span="7">
<treeselect
:disable-branch-nodes="true"
v-model="form.leaderPrincipal"
:options="principalList"
placeholder="请选择牵头部门责任领导"
:defaultExpandLevel="1"
:normalizer="
(d) => {
return {
id: d.id,
label: d.realname,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
</el-row>
<div class="leader">
<div
style="display: flex; justify-content: center; margin-bottom: 20px"
<el-row>
<el-col :span="4" class="title">考核内容:</el-col>
<el-col :span="18"
><el-input
type="textarea"
:rows="4"
placeholder="请输入考核内容"
v-model="form.itemContent"
></el-input
></el-col>
</el-row>
<el-row>
<el-col :span="4" class="title"> 牵头部门: </el-col>
<el-col :span="7">
<treeselect
:disable-branch-nodes="true"
@input="changePrincipal($event, 'leader')"
v-model="form.leaderDept"
:options="formatDep"
placeholder="请选择牵头部门"
:defaultExpandLevel="2"
:normalizer="
(d) => {
return {
id: d.id,
label: d.name,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
<el-col :span="4" class="title"> 责任领导: </el-col>
<el-col :span="7">
<treeselect
:disable-branch-nodes="true"
v-model="form.leaderPrincipal"
:options="principalList"
placeholder="请选择牵头部门责任领导"
:defaultExpandLevel="1"
:normalizer="
(d) => {
return {
id: d.id,
label: d.realname,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
</el-row>
<div class="leader">
<div
style="display: flex; justify-content: center; margin-bottom: 20px"
>
<el-button type="primary" @click="addDept('other')"
>添加其他牵头部门</el-button
>
<el-button type="primary" @click="addDept('other')"
>添加其他牵头部门</el-button
>
</div>
<!-- <span
</div>
<!-- <span
class="el-icon-circle-plus-outline add"
@click="addDept('other')"
></span> -->
<div
style="position: relative"
v-for="(item, index) of form.otherDept"
:key="index"
<div
style="position: relative"
v-for="(item, index) of form.otherDept"
:key="index"
>
<span
class="el-icon-remove-outline delete"
style="z-index: 10"
@click="deleteDept(index, 'other')"
></span>
<el-row>
<el-col :span="4" class="title"> 其他牵头部门: </el-col>
<el-col :span="7">
<treeselect
:disable-branch-nodes="true"
@input="changePrincipal($event, 'other')"
v-model="form.otherDept[index]"
:options="formatDep"
placeholder="请选择其他牵头部门"
:defaultExpandLevel="2"
:normalizer="
(d) => {
return {
id: d.id,
label: d.name,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
<el-col :span="4" class="title"> 责任领导: </el-col>
<el-col :span="7">
<treeselect
:disable-branch-nodes="true"
v-model="form.otherPrincipal[index]"
:options="principalList"
placeholder="请选择其他牵头部门责任领导"
:defaultExpandLevel="1"
:normalizer="
(d) => {
return {
id: d.id,
label: d.realname,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
</el-row>
</div>
</div>
<div class="cooperate">
<div
style="display: flex; justify-content: center; margin-bottom: 20px"
>
<el-button type="primary" @click="addDept('cooperate')"
>添加配合部门</el-button
>
<span
class="el-icon-remove-outline delete"
style="z-index: 10"
@click="deleteDept(index, 'other')"
></span>
<el-row>
<el-col :span="4" class="title"> 其他牵头部门: </el-col>
<el-col :span="7">
<treeselect
:disable-branch-nodes="true"
@input="changePrincipal($event, 'other')"
v-model="form.otherDept[index]"
:options="formatDep"
placeholder="请选择其他牵头部门"
:defaultExpandLevel="2"
:normalizer="
(d) => {
return {
id: d.id,
label: d.name,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
<el-col :span="4" class="title"> 责任领导: </el-col>
<el-col :span="7">
<treeselect
:disable-branch-nodes="true"
v-model="form.otherPrincipal[index]"
:options="principalList"
placeholder="请选择其他牵头部门责任领导"
:defaultExpandLevel="1"
:normalizer="
(d) => {
return {
id: d.id,
label: d.realname,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
</el-row>
</div>
</div>
<div class="cooperate">
<div
style="
display: flex;
justify-content: center;
margin-bottom: 20px;
"
>
<el-button type="primary" @click="addDept('cooperate')"
>添加配合部门</el-button
>
</div>
<!-- <span
<!-- <span
class="el-icon-circle-plus-outline add"
@click="addDept('cooperate')"
></span> -->
<div
style="position: relative"
v-for="(item, index) of form.cooperateDept"
:key="index"
>
<span
class="el-icon-remove-outline delete"
style="z-index: 10"
@click="deleteDept(index, 'cooperate')"
></span>
<el-row>
<el-col :span="4" class="title">配合部门: </el-col>
<el-col :span="7">
<treeselect
:disable-branch-nodes="true"
@input="changePrincipal($event, 'cooperate')"
v-model="form.cooperateDept[index]"
:options="formatDep"
placeholder="请选择配合部门"
:defaultExpandLevel="2"
:normalizer="
(d) => {
return {
id: d.id,
label: d.name,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
<el-col :span="4" class="title"> 责任领导: </el-col>
<el-col :span="7">
<treeselect
:disable-branch-nodes="true"
v-model="form.cooperatePrincipal[index]"
:options="principalList"
placeholder="请选择配合部门责任领导"
:defaultExpandLevel="1"
:normalizer="
(d) => {
return {
id: d.id,
label: d.realname,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
</el-row>
</div>
</div>
<el-row>
<el-col :span="4" class="title">分值:</el-col>
<el-col :span="7"
><el-input placeholder="请输入分值" v-model="form.points"></el-input
></el-col>
</el-row>
<div slot="footer">
<el-button type="primary" @click="save">确定</el-button>
<el-button @click="showEdit = false">取消</el-button>&nbsp;
<div
style="position: relative"
v-for="(item, index) of form.cooperateDept"
:key="index"
>
<span
class="el-icon-remove-outline delete"
style="z-index: 10"
@click="deleteDept(index, 'cooperate')"
></span>
<el-row>
<el-col :span="4" class="title">配合部门: </el-col>
<el-col :span="7">
<treeselect
:disable-branch-nodes="true"
@input="changePrincipal($event, 'cooperate')"
v-model="form.cooperateDept[index]"
:options="formatDep"
placeholder="请选择配合部门"
:defaultExpandLevel="2"
:normalizer="
(d) => {
return {
id: d.id,
label: d.name,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
<el-col :span="4" class="title"> 责任领导: </el-col>
<el-col :span="7">
<treeselect
:disable-branch-nodes="true"
v-model="form.cooperatePrincipal[index]"
:options="principalList"
placeholder="请选择配合部门责任领导"
:defaultExpandLevel="1"
:normalizer="
(d) => {
return {
id: d.id,
label: d.realname,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
</el-row>
</div>
</div>
<el-row>
<el-col :span="4" class="title">分值:</el-col>
<el-col :span="7"
><el-input placeholder="请输入分值" v-model="form.points"></el-input
></el-col>
</el-row>
<div slot="footer">
<el-button type="primary" @click="save">确定</el-button>
<el-button @click="showEdit = false">取消</el-button>&nbsp;
</div>
<!-- </el-scrollbar> -->
</el-dialog>
</div>
@@ -434,10 +430,14 @@ export default {
},
addDept(type) {
if (type == "other") {
this.form.otherDept = this.form.otherDept || [];
this.form.otherPrincipal = this.form.otherPrincipal || [];
this.form.otherDept.push(undefined);
this.form.otherPrincipal.push(undefined);
}
if (type == "cooperate") {
this.form.cooperateDept = this.form.cooperateDept || [];
this.form.cooperatePrincipal = this.form.cooperatePrincipal || [];
this.form.cooperateDept.push(undefined);
this.form.cooperatePrincipal.push(undefined);
}
@@ -482,22 +482,18 @@ export default {
edit(row) {
this.showEdit = true;
let form = JSON.parse(JSON.stringify(row));
// form.leaderDept = form.leaderDept
// .split(",")
// .map((item) => parseInt(item));
form.cooperateDept = form.cooperateDept
.split(",")
.map((item) => parseInt(item));
// form.leaderPrincipal = form.leaderPrincipal
// .split(",")
// .map((item) => parseInt(item));
form.cooperatePrincipal = form.cooperatePrincipal
.split(",")
.map((item) => parseInt(item));
form.otherDept = form.otherDept.split(",").map((item) => parseInt(item));
form.otherPrincipal = form.otherPrincipal
.split(",")
.map((item) => parseInt(item));
form.cooperateDept =
form.cooperateDept &&
form.cooperateDept.split(",").map((item) => parseInt(item));
form.cooperatePrincipal =
form.cooperatePrincipal &&
form.cooperatePrincipal.split(",").map((item) => parseInt(item));
form.otherDept =
form.otherDept &&
form.otherDept.split(",").map((item) => parseInt(item));
form.otherPrincipal =
form.otherPrincipal &&
form.otherPrincipal.split(",").map((item) => parseInt(item));
this.form = form;
},
save() {
@@ -624,7 +620,7 @@ export default {
/deep/ .el-dialog__body {
padding-right: 0;
padding-left: 0;
max-height:60vh;
max-height: 60vh;
overflow-y: scroll;
}
</style>

+ 216
- 221
src/views/second/taskSummary/reward.vue ファイルの表示

@@ -129,227 +129,216 @@
@closed="form = {}"
>
<!-- <el-scrollbar style="height: 50vh"> -->
<el-row>
<el-col :span="4" class="title">考核内容:</el-col>
<el-col :span="18"
><el-input
type="textarea"
:rows="4"
placeholder="请输入考核内容"
v-model="form.itemContent"
></el-input
></el-col>
</el-row>
<el-row>
<el-col :span="4" class="title"> 牵头部门: </el-col>
<el-col :span="7">
<treeselect
:disable-branch-nodes="true"
@input="changePrincipal($event, 'leader')"
v-model="form.leaderDept"
:options="formatDep"
placeholder="请选择牵头部门"
:defaultExpandLevel="2"
:normalizer="
(d) => {
return {
id: d.id,
label: d.name,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
<el-col :span="4" class="title"> 责任领导: </el-col>
<el-col :span="7">
<treeselect
:disable-branch-nodes="true"
v-model="form.leaderPrincipal"
:options="principalList"
placeholder="请选择牵头部门责任领导"
:defaultExpandLevel="1"
:normalizer="
(d) => {
return {
id: d.id,
label: d.realname,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
</el-row>
<div class="leader">
<div
style="
display: flex;
justify-content: center;
margin-bottom: 20px;
<el-row>
<el-col :span="4" class="title">考核内容:</el-col>
<el-col :span="18"
><el-input
type="textarea"
:rows="4"
placeholder="请输入考核内容"
v-model="form.itemContent"
></el-input
></el-col>
</el-row>
<el-row>
<el-col :span="4" class="title"> 牵头部门: </el-col>
<el-col :span="7">
<treeselect
:disable-branch-nodes="true"
@input="changePrincipal($event, 'leader')"
v-model="form.leaderDept"
:options="formatDep"
placeholder="请选择牵头部门"
:defaultExpandLevel="2"
:normalizer="
(d) => {
return {
id: d.id,
label: d.name,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
<el-col :span="4" class="title"> 责任领导: </el-col>
<el-col :span="7">
<treeselect
:disable-branch-nodes="true"
v-model="form.leaderPrincipal"
:options="principalList"
placeholder="请选择牵头部门责任领导"
:defaultExpandLevel="1"
:normalizer="
(d) => {
return {
id: d.id,
label: d.realname,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
</el-row>
<div class="leader">
<div
style="display: flex; justify-content: center; margin-bottom: 20px"
>
<el-button type="primary" @click="addDept('other')"
>添加其他牵头部门</el-button
>
<el-button type="primary" @click="addDept('other')"
>添加其他牵头部门</el-button
>
</div>
<!-- <span
</div>
<!-- <span
class="el-icon-circle-plus-outline add"
@click="addDept('other')"
></span> -->
<div
style="position: relative"
v-for="(item, index) of form.otherDept"
:key="index"
>
<span
class="el-icon-remove-outline delete"
style="z-index: 10"
@click="deleteDept(index, 'other')"
></span>
<el-row>
<el-col :span="4" class="title"> 其他牵头部门: </el-col>
<el-col :span="7">
<treeselect
:disable-branch-nodes="true"
@input="changePrincipal($event, 'other')"
v-model="form.otherDept[index]"
:options="formatDep"
placeholder="请选择其他牵头部门"
:defaultExpandLevel="2"
:normalizer="
(d) => {
return {
id: d.id,
label: d.name,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
<el-col :span="4" class="title"> 责任领导: </el-col>
<el-col :span="7">
<treeselect
:disable-branch-nodes="true"
v-model="form.otherPrincipal[index]"
:options="principalList"
placeholder="请选择其他牵头部门责任领导"
:defaultExpandLevel="1"
:normalizer="
(d) => {
return {
id: d.id,
label: d.realname,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
</el-row>
</div>
<div
style="position: relative"
v-for="(item, index) of form.otherDept"
:key="index"
>
<span
class="el-icon-remove-outline delete"
style="z-index: 10"
@click="deleteDept(index, 'other')"
></span>
<el-row>
<el-col :span="4" class="title"> 其他牵头部门: </el-col>
<el-col :span="7">
<treeselect
:disable-branch-nodes="true"
@input="changePrincipal($event, 'other')"
v-model="form.otherDept[index]"
:options="formatDep"
placeholder="请选择其他牵头部门"
:defaultExpandLevel="2"
:normalizer="
(d) => {
return {
id: d.id,
label: d.name,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
<el-col :span="4" class="title"> 责任领导: </el-col>
<el-col :span="7">
<treeselect
:disable-branch-nodes="true"
v-model="form.otherPrincipal[index]"
:options="principalList"
placeholder="请选择其他牵头部门责任领导"
:defaultExpandLevel="1"
:normalizer="
(d) => {
return {
id: d.id,
label: d.realname,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
</el-row>
</div>
<div class="cooperate">
<div
style="
display: flex;
justify-content: center;
margin-bottom: 20px;
"
</div>
<div class="cooperate">
<div
style="display: flex; justify-content: center; margin-bottom: 20px"
>
<el-button type="primary" @click="addDept('cooperate')"
>添加配合部门</el-button
>
<el-button type="primary" @click="addDept('cooperate')"
>添加配合部门</el-button
>
</div>
<!-- <span
</div>
<!-- <span
class="el-icon-circle-plus-outline add"
@click="addDept('cooperate')"
></span> -->
<div
style="position: relative"
v-for="(item, index) of form.cooperateDept"
:key="index"
>
<span
class="el-icon-remove-outline delete"
style="z-index: 10"
@click="deleteDept(index, 'cooperate')"
></span>
<el-row>
<el-col :span="4" class="title">配合部门: </el-col>
<el-col :span="7">
<treeselect
:disable-branch-nodes="true"
@input="changePrincipal($event, 'cooperate')"
v-model="form.cooperateDept[index]"
:options="formatDep"
placeholder="请选择配合部门"
:defaultExpandLevel="2"
:normalizer="
(d) => {
return {
id: d.id,
label: d.name,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
<el-col :span="4" class="title"> 责任领导: </el-col>
<el-col :span="7">
<treeselect
:disable-branch-nodes="true"
v-model="form.cooperatePrincipal[index]"
:options="principalList"
placeholder="请选择配合部门责任领导"
:defaultExpandLevel="1"
:normalizer="
(d) => {
return {
id: d.id,
label: d.realname,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
</el-row>
</div>
</div>
<el-row>
<el-col :span="4" class="title">分值:</el-col>
<el-col :span="7"
><el-input
placeholder="请输入分值"
v-model="form.points"
></el-input
></el-col>
</el-row>
<div slot="footer">
<el-button type="primary" @click="save">确定</el-button>
<el-button @click="showEdit = false">取消</el-button>&nbsp;
<div
style="position: relative"
v-for="(item, index) of form.cooperateDept"
:key="index"
>
<span
class="el-icon-remove-outline delete"
style="z-index: 10"
@click="deleteDept(index, 'cooperate')"
></span>
<el-row>
<el-col :span="4" class="title">配合部门: </el-col>
<el-col :span="7">
<treeselect
:disable-branch-nodes="true"
@input="changePrincipal($event, 'cooperate')"
v-model="form.cooperateDept[index]"
:options="formatDep"
placeholder="请选择配合部门"
:defaultExpandLevel="2"
:normalizer="
(d) => {
return {
id: d.id,
label: d.name,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
<el-col :span="4" class="title"> 责任领导: </el-col>
<el-col :span="7">
<treeselect
:disable-branch-nodes="true"
v-model="form.cooperatePrincipal[index]"
:options="principalList"
placeholder="请选择配合部门责任领导"
:defaultExpandLevel="1"
:normalizer="
(d) => {
return {
id: d.id,
label: d.realname,
children:
d.children && d.children.length > 0
? d.children
: undefined,
};
}
"
/>
</el-col>
</el-row>
</div>
</div>
<el-row>
<el-col :span="4" class="title">分值:</el-col>
<el-col :span="7"
><el-input placeholder="请输入分值" v-model="form.points"></el-input
></el-col>
</el-row>
<div slot="footer">
<el-button type="primary" @click="save">确定</el-button>
<el-button @click="showEdit = false">取消</el-button>&nbsp;
</div>
<!-- </el-scrollbar> -->
</el-dialog>
</el-card>
@@ -448,10 +437,14 @@ export default {
},
addDept(type) {
if (type == "other") {
this.form.otherDept = this.form.otherDept || [];
this.form.otherPrincipal = this.form.otherPrincipal || [];
this.form.otherDept.push(undefined);
this.form.otherPrincipal.push(undefined);
}
if (type == "cooperate") {
this.form.cooperateDept = this.form.cooperateDept || [];
this.form.cooperatePrincipal = this.form.cooperatePrincipal || [];
this.form.cooperateDept.push(undefined);
this.form.cooperatePrincipal.push(undefined);
}
@@ -496,16 +489,18 @@ export default {
edit(row) {
this.showEdit = true;
let form = JSON.parse(JSON.stringify(row));
form.cooperateDept = form.cooperateDept
.split(",")
.map((item) => parseInt(item));
form.cooperatePrincipal = form.cooperatePrincipal
.split(",")
.map((item) => parseInt(item));
form.otherDept = form.otherDept.split(",").map((item) => parseInt(item));
form.otherPrincipal = form.otherPrincipal
.split(",")
.map((item) => parseInt(item));
form.cooperateDept =
form.cooperateDept &&
form.cooperateDept.split(",").map((item) => parseInt(item));
form.cooperatePrincipal =
form.cooperatePrincipal &&
form.cooperatePrincipal.split(",").map((item) => parseInt(item));
form.otherDept =
form.otherDept &&
form.otherDept.split(",").map((item) => parseInt(item));
form.otherPrincipal =
form.otherPrincipal &&
form.otherPrincipal.split(",").map((item) => parseInt(item));
this.form = form;
},
save() {
@@ -632,7 +627,7 @@ export default {
/deep/ .el-dialog__body {
padding-right: 0;
padding-left: 0;
max-height:60vh;
max-height: 60vh;
overflow-y: scroll;
}
</style>

読み込み中…
キャンセル
保存