Переглянути джерело

修改未提示选择信息

master
yangzhou-cyber 3 роки тому
джерело
коміт
7d3fc8ab82
4 змінених файлів з 109 додано та 50 видалено
  1. +61
    -41
      src/views/second/segmentation/contentDetail.vue
  2. +12
    -1
      src/views/second/taskSummary/basicTable.vue
  3. +20
    -8
      src/views/second/taskSummary/constraint.vue
  4. +16
    -0
      src/views/second/taskSummary/reward.vue

+ 61
- 41
src/views/second/segmentation/contentDetail.vue Переглянути файл

@@ -137,16 +137,16 @@
<span>{{ row.points }}</span>
</template>
</el-table-column>
<el-table-column
label="第一牵头部门和责任领导"
width="250"
align="center"
>
<template slot-scope="{ row }">
<pre>{{formatList(row,'leader')}}</pre>
</template>
</el-table-column>
<!-- <el-table-column
<el-table-column
label="第一牵头部门和责任领导"
width="250"
align="center"
>
<template slot-scope="{ row }">
<pre>{{ formatList(row, "leader") }}</pre>
</template>
</el-table-column>
<!-- <el-table-column
label="第一牵头部门责任领导"
width="170"
align="center"
@@ -155,16 +155,16 @@
<pre>{{ row.leaderPrincipalList | formatList }}</pre>
</template>
</el-table-column> -->
<el-table-column
label="其他牵头部门和责任领导"
width="250"
align="center"
>
<template slot-scope="{ row }">
<pre>{{ formatList(row,'other') }}</pre>
</template>
</el-table-column>
<!-- <el-table-column
<el-table-column
label="其他牵头部门和责任领导"
width="250"
align="center"
>
<template slot-scope="{ row }">
<pre>{{ formatList(row, "other") }}</pre>
</template>
</el-table-column>
<!-- <el-table-column
label="其他牵头部门责任领导"
width="170"
align="center"
@@ -173,16 +173,16 @@
<pre>{{ row.otherPrincipalList | formatList }}</pre>
</template>
</el-table-column> -->
<el-table-column
label="配合部门和责任领导"
width="250"
align="center"
>
<template slot-scope="{ row }">
<pre>{{formatList(row,'cooperate') }}</pre>
</template>
</el-table-column>
<!-- <el-table-column
<el-table-column
label="配合部门和责任领导"
width="250"
align="center"
>
<template slot-scope="{ row }">
<pre>{{ formatList(row, "cooperate") }}</pre>
</template>
</el-table-column>
<!-- <el-table-column
label="配合部门责任领导"
width="150"
align="center"
@@ -446,7 +446,7 @@
<el-button @click="showEdit = false">取消</el-button>&nbsp;
</div>
</el-dialog>
<div style="text-align:center;margin-top:10px">
<div style="text-align: center; margin-top: 10px">
<el-button type="primary" @click="$router.go(-1)">返回</el-button>
</div>
</div>
@@ -502,18 +502,22 @@ export default {
this.$store.dispatch("base/getDepartment", 1);
this.getData();
},
filters:{
formatData(value){
return value&&value.join('\n')
}
filters: {
formatData(value) {
return value && value.join("\n");
},
},
methods: {
formatList(data,type) {
let arr=[]
for(let key in data[type+'DeptList']){
arr.push(`${data[type+'DeptList'][key]}(${data[type+'PrincipalList'][key]})`)
formatList(data, type) {
let arr = [];
for (let key in data[type + "DeptList"]) {
arr.push(
`${data[type + "DeptList"][key]}(${
data[type + "PrincipalList"][key]
})`
);
}
return arr.join('\n')
return arr.join("\n");
},
addDept(type) {
if (type == "other") {
@@ -626,6 +630,22 @@ export default {
add() {
let form = this.form;
let params = ["itemContent", "points", "leaderDept", "leaderPrincipal"];
let arr = [
"otherDept",
"otherPrincipal",
"cooperateDept",
"cooperatePrincipal",
];
for (let key of arr) {
if (form[key]) {
for (let item of form[key]) {
if (!item || item.length == 0) {
this.$message.error("请选择部门及对应责任领导");
return;
}
}
}
}
for (let param of params) {
if (
(param == "itemContent" || param == "leaderDept") &&
@@ -641,7 +661,7 @@ export default {
return;
}
}
if (param== "points") {
if (param == "points") {
if (!form[param]) {
this.$message.error("请输入分值");
return;

+ 12
- 1
src/views/second/taskSummary/basicTable.vue Переглянути файл

@@ -762,7 +762,18 @@ export default {
},
save() {
let form = this.form;
let params = ["itemContent", "points", "leaderDept", "leaderPrincipal"];
let params = ["itemContent", "points", "leaderDept", "leaderPrincipal",];
let arr=['otherDept','otherPrincipal','cooperateDept','cooperatePrincipal']
for(let key of arr){
if(form[key]){
for (let item of form[key]){
if(!item||(item.length==0)){
this.$message.error('请选择部门及对应责任领导')
return
}
}
}
}
for (let param of params) {
if (
(param == "itemContent" || param == "leaderDept") &&

+ 20
- 8
src/views/second/taskSummary/constraint.vue Переглянути файл

@@ -75,7 +75,7 @@
align="center"
>
<template slot-scope="{ row }">
<pre>{{formatList(row,'leader')}}</pre>
<pre>{{ formatList(row, "leader") }}</pre>
</template>
</el-table-column>
<!-- <el-table-column
@@ -93,7 +93,7 @@
align="center"
>
<template slot-scope="{ row }">
<pre>{{ formatList(row,'other') }}</pre>
<pre>{{ formatList(row, "other") }}</pre>
</template>
</el-table-column>
<!-- <el-table-column
@@ -105,13 +105,9 @@
<pre>{{ row.otherPrincipalList | formatList }}</pre>
</template>
</el-table-column> -->
<el-table-column
label="配合部门和责任领导"
width="250"
align="center"
>
<el-table-column label="配合部门和责任领导" width="250" align="center">
<template slot-scope="{ row }">
<pre>{{formatList(row,'cooperate') }}</pre>
<pre>{{ formatList(row, "cooperate") }}</pre>
</template>
</el-table-column>
<!-- <el-table-column
@@ -614,6 +610,22 @@ export default {
save() {
let form = this.form;
let params = ["itemContent", "leaderDept", "leaderPrincipal"];
let arr = [
"otherDept",
"otherPrincipal",
"cooperateDept",
"cooperatePrincipal",
];
for (let key of arr) {
if (form[key]) {
for (let item of form[key]) {
if (!item || item.length == 0) {
this.$message.error("请选择部门及对应责任领导");
return;
}
}
}
}
for (let param of params) {
if (
(param == "itemContent" || param == "leaderDept") &&

+ 16
- 0
src/views/second/taskSummary/reward.vue Переглянути файл

@@ -627,6 +627,22 @@ export default {
save() {
let form = this.form;
let params = ["itemContent", "points", "leaderDept", "leaderPrincipal"];
let arr = [
"otherDept",
"otherPrincipal",
"cooperateDept",
"cooperatePrincipal",
];
for (let key of arr) {
if (form[key]) {
for (let item of form[key]) {
if (!item || item.length == 0) {
this.$message.error("请选择部门及对应责任领导");
return;
}
}
}
}
for (let param of params) {
if (
(param == "itemContent" || param == "leaderDept") &&

Завантаження…
Відмінити
Зберегти