|
@@ -112,7 +112,7 @@
|
|
size="mini"
|
|
size="mini"
|
|
type="text"
|
|
type="text"
|
|
icon="el-icon-document"
|
|
icon="el-icon-document"
|
|
- @click="handleYardstick(scope.row)"
|
|
|
|
|
|
+ @click="handleYardstick(scope.row),selectFocus(year)"
|
|
v-hasPermi="['plant:targetyardstick:edit']"
|
|
v-hasPermi="['plant:targetyardstick:edit']"
|
|
>{{ $t('判定标准') }}</el-button>
|
|
>{{ $t('判定标准') }}</el-button>
|
|
<el-button
|
|
<el-button
|
|
@@ -237,7 +237,21 @@
|
|
<el-table v-loading="yardstickLoading" :data="targetyardstickList" border>
|
|
<el-table v-loading="yardstickLoading" :data="targetyardstickList" border>
|
|
<el-table-column :label="$t('目标')" align="center" header-align="center" prop="target">
|
|
<el-table-column :label="$t('目标')" align="center" header-align="center" prop="target">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-input v-if="scope.row.isEdit" v-model="scope.row.target" :placeholder="$t('请输入')+$t('目标')" />
|
|
|
|
|
|
+ <el-select
|
|
|
|
+ v-if="scope.row.isEdit"
|
|
|
|
+ v-model="scope.row.target"
|
|
|
|
+ placeholder="请输入或选择"
|
|
|
|
+ clearable
|
|
|
|
+ filterable
|
|
|
|
+ allow-create
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in contentList"
|
|
|
|
+ :key="item.description"
|
|
|
|
+ :label="item.description"
|
|
|
|
+ :value="item.description">
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
<span v-else>{{ scope.row.target }}</span>
|
|
<span v-else>{{ scope.row.target }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -255,7 +269,24 @@
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column :label="$t('判定标准')" align="left" header-align="center" prop="yardstick" width="500" >
|
|
<el-table-column :label="$t('判定标准')" align="left" header-align="center" prop="yardstick" width="500" >
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-input v-if="scope.row.isEdit" type="textarea" :rows="4" v-model="scope.row.yardstick" :placeholder="$t('请输入')+$t('判定标准')" />
|
|
|
|
|
|
+ <el-select style="width:100%"
|
|
|
|
+ v-if="scope.row.isEdit"
|
|
|
|
+ v-model="scope.row.yardstick"
|
|
|
|
+ placeholder="请输入或选择"
|
|
|
|
+ clearable
|
|
|
|
+ multiple
|
|
|
|
+ filterable
|
|
|
|
+ allow-create
|
|
|
|
+ @focus="selectChange(scope.row.target)"
|
|
|
|
+ @blur="selectBlur"
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in measuresList"
|
|
|
|
+ :key="item.measures"
|
|
|
|
+ :label="item.measures"
|
|
|
|
+ :value="item.measures">
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
<span v-else>{{ scope.row.yardstick }}</span>
|
|
<span v-else>{{ scope.row.yardstick }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -401,6 +432,7 @@ import { getToken } from "@/utils/auth";
|
|
import {allFileList, delCommonfile ,updateCommonfile ,addCommonfile} from "@/api/common/commonfile";
|
|
import {allFileList, delCommonfile ,updateCommonfile ,addCommonfile} from "@/api/common/commonfile";
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
|
+import {getAllContent, getAllMeasures} from "@/api/plant/targetlist";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
@@ -408,6 +440,9 @@ export default {
|
|
components: { Treeselect },
|
|
components: { Treeselect },
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ year: new Date().getFullYear(),
|
|
|
|
+ contentList: [],
|
|
|
|
+ measuresList: [],
|
|
// 遮罩层
|
|
// 遮罩层
|
|
loading: true,
|
|
loading: true,
|
|
yardstickLoading: true,
|
|
yardstickLoading: true,
|
|
@@ -560,6 +595,24 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ selectFocus(year){
|
|
|
|
+ this.queryParams.year=year;
|
|
|
|
+ getAllContent(this.queryParams).then(response => {
|
|
|
|
+ console.log(response)
|
|
|
|
+ this.contentList = response.data;
|
|
|
|
+ console.log(this.contentList)
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ selectChange(content){
|
|
|
|
+ this.queryParams.description=content;
|
|
|
|
+ getAllMeasures(this.queryParams).then(response => {
|
|
|
|
+ this.measuresList = response.data;
|
|
|
|
+ });
|
|
|
|
+ this.queryParams.description=null;
|
|
|
|
+ },
|
|
|
|
+ selectBlur() {
|
|
|
|
+ this.measuresList = [];
|
|
|
|
+ },
|
|
/** 查询目标协议列表 */
|
|
/** 查询目标协议列表 */
|
|
getList() {
|
|
getList() {
|
|
this.loading = true;
|
|
this.loading = true;
|
|
@@ -724,6 +777,7 @@ export default {
|
|
}
|
|
}
|
|
this.yardstickLoading = false;
|
|
this.yardstickLoading = false;
|
|
this.yardstickOpen = true;
|
|
this.yardstickOpen = true;
|
|
|
|
+ this.year=row.year;
|
|
this.yardstickTitle = employeeName + year + this.$t('年') + this.$t('判断标准');
|
|
this.yardstickTitle = employeeName + year + this.$t('年') + this.$t('判断标准');
|
|
});
|
|
});
|
|
},
|
|
},
|
|
@@ -751,6 +805,15 @@ export default {
|
|
that.yardstickLoading = true;
|
|
that.yardstickLoading = true;
|
|
this.yardstickForm = row;
|
|
this.yardstickForm = row;
|
|
this.yardstickForm.agreementId = this.yardstickQueryParams.agreementId;
|
|
this.yardstickForm.agreementId = this.yardstickQueryParams.agreementId;
|
|
|
|
+ let newYardstick="";
|
|
|
|
+ console.log(row.yardstick)
|
|
|
|
+ row.yardstick.forEach(
|
|
|
|
+ item=>{
|
|
|
|
+ newYardstick+=item+",";
|
|
|
|
+ }
|
|
|
|
+ )
|
|
|
|
+ row.yardstick = newYardstick.substring(0,newYardstick.length-1)
|
|
|
|
+ console.log(row.yardstick)
|
|
if (this.rowActualpost !== "24") {
|
|
if (this.rowActualpost !== "24") {
|
|
var partner = null;
|
|
var partner = null;
|
|
this.yardstickForm.partners.forEach(function (value,key,arr) {
|
|
this.yardstickForm.partners.forEach(function (value,key,arr) {
|