|
@@ -1,5 +1,23 @@
|
|
<template>
|
|
<template>
|
|
<view class="mainPointsDetailPage">
|
|
<view class="mainPointsDetailPage">
|
|
|
|
+ <tm-modal v-if="showSelectModal" @click="clickModalhandle">
|
|
|
|
+ <view class="checkItemResultModal">
|
|
|
|
+ <view class="modalContent">
|
|
|
|
+ <view class="modalBar">请选择查核结果</view>
|
|
|
|
+ <scroll-view class="scroll" scroll-y="true" >
|
|
|
|
+ <view v-for="item in checkItemResultList" class="list" :key="item.id" @click="selectResultHandle(item.resultName)" >{{item.resultName}}</view>
|
|
|
|
+ <!-- <view class="list">无缺失</view>
|
|
|
|
+ <view class="list">主要缺失</view>
|
|
|
|
+ <view class="list" >不适用</view>
|
|
|
|
+ <view class="list">无缺失</view>
|
|
|
|
+ <view class="list">主要缺失</view>
|
|
|
|
+ <view class="list" >不适用</view>
|
|
|
|
+ <view class="list">无缺失</view>
|
|
|
|
+ <view class="list">主要缺失</view> -->
|
|
|
|
+ </scroll-view>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ </tm-modal>
|
|
<scroll-view scroll-y="true" class="scroll-y">
|
|
<scroll-view scroll-y="true" class="scroll-y">
|
|
<view class="checkItem">
|
|
<view class="checkItem">
|
|
<view class="chBg">
|
|
<view class="chBg">
|
|
@@ -43,14 +61,16 @@
|
|
<view class="checked">
|
|
<view class="checked">
|
|
<view
|
|
<view
|
|
class="checked-checkItem"
|
|
class="checked-checkItem"
|
|
- @click="checkedOne(1)"
|
|
|
|
|
|
+ v-for="item in checkConfiglist"
|
|
|
|
+ :key="item.value"
|
|
|
|
+ @click="checkedOne(item.attr)"
|
|
:style="
|
|
:style="
|
|
- Index == 1
|
|
|
|
|
|
+ Index == item.attr
|
|
? { backgroundColor: '#3377FF', color: '#fff' }
|
|
? { backgroundColor: '#3377FF', color: '#fff' }
|
|
: { backgroundColor: '#EBEFF7' }
|
|
: { backgroundColor: '#EBEFF7' }
|
|
"
|
|
"
|
|
- >不适用
|
|
|
|
- <view v-if="lastIndex == 1"
|
|
|
|
|
|
+ >{{item.attr}}
|
|
|
|
+ <view v-if="lastIndex == item.attr"
|
|
><image
|
|
><image
|
|
src="../../static/shangci.png"
|
|
src="../../static/shangci.png"
|
|
mode=""
|
|
mode=""
|
|
@@ -59,7 +79,25 @@
|
|
<text class="lastName">上次</text></view
|
|
<text class="lastName">上次</text></view
|
|
>
|
|
>
|
|
</view>
|
|
</view>
|
|
- <view
|
|
|
|
|
|
+ <!-- <view
|
|
|
|
+ class="checked-checkItem"
|
|
|
|
+ @click="checkedOne(1)"
|
|
|
|
+ :style="
|
|
|
|
+ Index == 1
|
|
|
|
+ ? { backgroundColor: '#3377FF', color: '#fff' }
|
|
|
|
+ : { backgroundColor: '#EBEFF7' }
|
|
|
|
+ "
|
|
|
|
+ >不适用
|
|
|
|
+ <view v-if="lastIndex == 1"
|
|
|
|
+ ><image
|
|
|
|
+ src="../../static/shangci.png"
|
|
|
|
+ mode=""
|
|
|
|
+ class="img"
|
|
|
|
+ ></image>
|
|
|
|
+ <text class="lastName">上次</text></view
|
|
|
|
+ >
|
|
|
|
+ </view> -->
|
|
|
|
+ <!-- <view
|
|
class="checked-checkItem"
|
|
class="checked-checkItem"
|
|
@click="checkedOne(2)"
|
|
@click="checkedOne(2)"
|
|
:style="
|
|
:style="
|
|
@@ -130,7 +168,7 @@
|
|
></image>
|
|
></image>
|
|
<text class="lastName">上次</text></view
|
|
<text class="lastName">上次</text></view
|
|
>
|
|
>
|
|
- </view>
|
|
|
|
|
|
+ </view> -->
|
|
</view>
|
|
</view>
|
|
<view class="more" @click="toHistory">
|
|
<view class="more" @click="toHistory">
|
|
<text>查看改善历史</text>
|
|
<text>查看改善历史</text>
|
|
@@ -154,7 +192,10 @@
|
|
</view>
|
|
</view>
|
|
<view>
|
|
<view>
|
|
<view class="talkResult">
|
|
<view class="talkResult">
|
|
- <text class="seeName">查核结果</text>
|
|
|
|
|
|
+ <view class="seeResultFloorOne">
|
|
|
|
+ <text class="seeName">查核结果</text>
|
|
|
|
+ <text v-if="checkItemResultList.length>0" class="threePoint" @click="openSelectModal(i)">⋮</text>
|
|
|
|
+ </view>
|
|
<textarea
|
|
<textarea
|
|
maxlength="300"
|
|
maxlength="300"
|
|
class="seeTextarea"
|
|
class="seeTextarea"
|
|
@@ -177,7 +218,11 @@
|
|
</view>
|
|
</view>
|
|
<view v-else class="see">
|
|
<view v-else class="see">
|
|
<view class="seeResult">
|
|
<view class="seeResult">
|
|
- <text class="seeName">查核结果</text>
|
|
|
|
|
|
+ <view class="seeResultFloorOne">
|
|
|
|
+ <text class="seeName">查核结果</text>
|
|
|
|
+ <text class="threePoint" v-if="checkItemResultList.length>0" @click="openSelectModal">⋮</text>
|
|
|
|
+ <!-- <dropdown :list="checkItemResultList" :current="currentSelect" @onClick="dropDownChange"></dropdown> -->
|
|
|
|
+ </view>
|
|
<textarea
|
|
<textarea
|
|
maxlength="300"
|
|
maxlength="300"
|
|
class="seeTextarea"
|
|
class="seeTextarea"
|
|
@@ -220,6 +265,8 @@
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ value:'',
|
|
|
|
+ showSelectModal:false,
|
|
data: {}, //详情数据
|
|
data: {}, //详情数据
|
|
lastIndex: null, //上次选中的结果
|
|
lastIndex: null, //上次选中的结果
|
|
Index: null, //点击修改本次选中样式
|
|
Index: null, //点击修改本次选中样式
|
|
@@ -232,14 +279,39 @@ export default {
|
|
id: "",
|
|
id: "",
|
|
checkPointId: "",
|
|
checkPointId: "",
|
|
itemBelongGroup:[],
|
|
itemBelongGroup:[],
|
|
- itemId:''
|
|
|
|
|
|
+ itemId:'',
|
|
|
|
+ currentEditTextAreaIndex:'',
|
|
|
|
+ checkItemResultList:[],//查核结果说明下拉列表
|
|
|
|
+ currentSelect:'',
|
|
|
|
+ checkConfiglist:[],//查核情况可配置列表
|
|
};
|
|
};
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
this.checkTaskDetail(this.id);
|
|
this.checkTaskDetail(this.id);
|
|
this.getPeizhiList();
|
|
this.getPeizhiList();
|
|
|
|
+ // this.$refs.pop.open();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ clickModalhandle(){
|
|
|
|
+ this.showSelectModal = false;
|
|
|
|
+ },
|
|
|
|
+ openSelectModal(index){
|
|
|
|
+ console.log({index});
|
|
|
|
+ if(index>=0){
|
|
|
|
+ this.currentEditTextAreaIndex = index;
|
|
|
|
+ }
|
|
|
|
+ this.showSelectModal = true;
|
|
|
|
+ },
|
|
|
|
+ selectResultHandle(val){
|
|
|
|
+ console.log({val});
|
|
|
|
+ console.log('currentEditTextAreaIndex',this.currentEditTextAreaIndex);
|
|
|
|
+ if(this.data.checkModelName == '访谈'){
|
|
|
|
+ this.talkList[this.currentEditTextAreaIndex].talkResult = val;
|
|
|
|
+ }else {
|
|
|
|
+ this.recordList[0].talkResult = val;
|
|
|
|
+ }
|
|
|
|
+ this.showSelectModal = false;
|
|
|
|
+ },
|
|
checkTaskDetail(id) {
|
|
checkTaskDetail(id) {
|
|
this.$store.dispatch({
|
|
this.$store.dispatch({
|
|
type: "mainPointsDetail/commActions",
|
|
type: "mainPointsDetail/commActions",
|
|
@@ -250,18 +322,20 @@ export default {
|
|
},
|
|
},
|
|
},
|
|
},
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
|
|
+ this.id = id;
|
|
if (res) {
|
|
if (res) {
|
|
this.data = res;
|
|
this.data = res;
|
|
if (res && res.lastResult == "不适用") {
|
|
if (res && res.lastResult == "不适用") {
|
|
- this.lastIndex = 1;
|
|
|
|
|
|
+ // this.lastIndex = 1;
|
|
|
|
+ this.lastIndex = res.lastResult;
|
|
} else if (res && res.lastResult == "无缺失") {
|
|
} else if (res && res.lastResult == "无缺失") {
|
|
- this.lastIndex = 2;
|
|
|
|
|
|
+ this.lastIndex = res.lastResult;
|
|
} else if (res && res.lastResult == "主要缺失") {
|
|
} else if (res && res.lastResult == "主要缺失") {
|
|
- this.lastIndex = 3;
|
|
|
|
|
|
+ this.lastIndex = res.lastResult;
|
|
} else if (res && res.lastResult == "次要缺失") {
|
|
} else if (res && res.lastResult == "次要缺失") {
|
|
- this.lastIndex = 4;
|
|
|
|
|
|
+ this.lastIndex = res.lastResult;
|
|
} else if (res && res.lastResult == "观察事项") {
|
|
} else if (res && res.lastResult == "观察事项") {
|
|
- this.lastIndex = 5;
|
|
|
|
|
|
+ this.lastIndex = res.lastResult;
|
|
} else {
|
|
} else {
|
|
this.lastIndex = 0;
|
|
this.lastIndex = 0;
|
|
}
|
|
}
|
|
@@ -280,19 +354,20 @@ export default {
|
|
},
|
|
},
|
|
checkedOne(data) {
|
|
checkedOne(data) {
|
|
this.Index = data;
|
|
this.Index = data;
|
|
- if (data == 1) {
|
|
|
|
- this.data.checkResult = "不适用";
|
|
|
|
- } else if (data == 2) {
|
|
|
|
- this.data.checkResult = "无缺失";
|
|
|
|
- } else if (data == 3) {
|
|
|
|
- this.data.checkResult = "主要缺失";
|
|
|
|
- } else if (data == 4) {
|
|
|
|
- this.data.checkResult = "次要缺失";
|
|
|
|
- } else if (data == 5) {
|
|
|
|
- this.data.checkResult = "观察事项";
|
|
|
|
- } else {
|
|
|
|
- this.data.checkResult = "";
|
|
|
|
- }
|
|
|
|
|
|
+ this.data.checkResult = data;
|
|
|
|
+ // if (data == 1) {
|
|
|
|
+ // this.data.checkResult = "不适用";
|
|
|
|
+ // } else if (data == 2) {
|
|
|
|
+ // this.data.checkResult = "无缺失";
|
|
|
|
+ // } else if (data == 3) {
|
|
|
|
+ // this.data.checkResult = "主要缺失";
|
|
|
|
+ // } else if (data == 4) {
|
|
|
|
+ // this.data.checkResult = "次要缺失";
|
|
|
|
+ // } else if (data == 5) {
|
|
|
|
+ // this.data.checkResult = "观察事项";
|
|
|
|
+ // } else {
|
|
|
|
+ // this.data.checkResult = "";
|
|
|
|
+ // }
|
|
},
|
|
},
|
|
changeFilePaths(filePaths, index) {
|
|
changeFilePaths(filePaths, index) {
|
|
let _recordList = [...this.recordList];
|
|
let _recordList = [...this.recordList];
|
|
@@ -376,7 +451,10 @@ export default {
|
|
list.push(item);
|
|
list.push(item);
|
|
params.checkResultRequestList = list;
|
|
params.checkResultRequestList = list;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ const checkConfiglist = JSON.parse(JSON.stringify(this.checkConfiglist))
|
|
|
|
+ // console.log({'checkConfiglist':this.checkConfiglist});
|
|
|
|
+ // console.log(checkConfiglist[0].attr);
|
|
|
|
+
|
|
this.$store.dispatch({
|
|
this.$store.dispatch({
|
|
type: "mainPointsDetail/commActions",
|
|
type: "mainPointsDetail/commActions",
|
|
payload: {
|
|
payload: {
|
|
@@ -386,13 +464,15 @@ export default {
|
|
},
|
|
},
|
|
},
|
|
},
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
|
|
+ // console.log({'res':res,'checkConfiglist':this.checkConfiglist});
|
|
if (res) {
|
|
if (res) {
|
|
- for (let i = 0; i < this.resultConfigList.length; i++) {
|
|
|
|
|
|
+ for (let i = 0; i < checkConfiglist.length; i++) {
|
|
if (
|
|
if (
|
|
- this.resultConfigList[i].name == params.checkResult &&
|
|
|
|
- (this.resultConfigList[i].resultType == 2 ||
|
|
|
|
- this.resultConfigList[i].resultType == 3)
|
|
|
|
|
|
+ checkConfiglist[i].attr == params.checkResult &&
|
|
|
|
+ (checkConfiglist[i].resultType == 2 ||
|
|
|
|
+ checkConfiglist[i].resultType == 3)
|
|
) {
|
|
) {
|
|
|
|
+ console.log('开始提交改善前准备');
|
|
let param = {
|
|
let param = {
|
|
situationId: this.data.situationId,
|
|
situationId: this.data.situationId,
|
|
situationName: this.data.situationName,
|
|
situationName: this.data.situationName,
|
|
@@ -408,7 +488,9 @@ export default {
|
|
desicion: 0,
|
|
desicion: 0,
|
|
taskType: "1",
|
|
taskType: "1",
|
|
checkId: this.data.checkId,
|
|
checkId: this.data.checkId,
|
|
- checkResult: this.resultConfigList[i].id,
|
|
|
|
|
|
+ checkResult:0,
|
|
|
|
+ newResultType:checkConfiglist[i].resultType,
|
|
|
|
+ // checkResult: this.resultConfigList[i].id,
|
|
receiveEmpId: this.data.receiveEmpId,
|
|
receiveEmpId: this.data.receiveEmpId,
|
|
receiveEmpName: this.data.receiveEmpName,
|
|
receiveEmpName: this.data.receiveEmpName,
|
|
checkDetailId: this.data.id,
|
|
checkDetailId: this.data.id,
|
|
@@ -474,6 +556,8 @@ export default {
|
|
},
|
|
},
|
|
goToPrevPage(){
|
|
goToPrevPage(){
|
|
// window.history.back();
|
|
// window.history.back();
|
|
|
|
+ // const pages = getCurrentPages();
|
|
|
|
+ // console.log({pages});
|
|
uni.navigateBack({
|
|
uni.navigateBack({
|
|
delta: 1
|
|
delta: 1
|
|
});
|
|
});
|
|
@@ -504,20 +588,46 @@ export default {
|
|
}
|
|
}
|
|
let needItemIndex = num>0?current[0].index+1:current[0].index-1;
|
|
let needItemIndex = num>0?current[0].index+1:current[0].index-1;
|
|
let needItemId = this.itemBelongGroup[needItemIndex].id;
|
|
let needItemId = this.itemBelongGroup[needItemIndex].id;
|
|
|
|
+ // console.log({needItemIndex,needItemId});
|
|
this.checkTaskDetail(needItemId);
|
|
this.checkTaskDetail(needItemId);
|
|
},
|
|
},
|
|
- // // 获取改善任务列表
|
|
|
|
- // getMissionList(situationId) {
|
|
|
|
-
|
|
|
|
- // },
|
|
|
|
|
|
+ // 获取查核项可配置列表
|
|
|
|
+ getCheckConfigList(checkItemId) {
|
|
|
|
+ this.$store.dispatch({
|
|
|
|
+ type: 'mainPointsDetail/commActions',
|
|
|
|
+ payload: {
|
|
|
|
+ key:'getCheckItemAttr',
|
|
|
|
+ data:checkItemId
|
|
|
|
+ }
|
|
|
|
+ }).then(data=>{
|
|
|
|
+ this.checkConfiglist = data
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ // 获取查核项结果说明下拉列表
|
|
|
|
+ getCheckItemResultList(checkItemId) {
|
|
|
|
+ this.$store.dispatch({
|
|
|
|
+ type: 'mainPointsDetail/commActions',
|
|
|
|
+ payload: {
|
|
|
|
+ key:'getCheckItemResultList',
|
|
|
|
+ data:checkItemId
|
|
|
|
+ }
|
|
|
|
+ }).then(data=>{
|
|
|
|
+ // console.log({data});
|
|
|
|
+ this.checkItemResultList = data;
|
|
|
|
+ })
|
|
|
|
+ },
|
|
},
|
|
},
|
|
- onLoad({ id, checkPointId }) {
|
|
|
|
|
|
+ onLoad({ id, checkPointId,checkItemId }) {
|
|
this.id = id;
|
|
this.id = id;
|
|
this.checkPointId = checkPointId;
|
|
this.checkPointId = checkPointId;
|
|
|
|
+
|
|
|
|
+ this.getCheckConfigList(checkItemId);
|
|
|
|
+ this.getCheckItemResultList(checkItemId);
|
|
|
|
+
|
|
//接收来自上个页面所传过来的数据
|
|
//接收来自上个页面所传过来的数据
|
|
const eventChannel = this.getOpenerEventChannel();
|
|
const eventChannel = this.getOpenerEventChannel();
|
|
eventChannel.on('acceptDataFromOpenerPage', (data)=>{
|
|
eventChannel.on('acceptDataFromOpenerPage', (data)=>{
|
|
- console.log({data});
|
|
|
|
|
|
+ // console.log({data});
|
|
this.itemBelongGroup =data.data[0].responseList.map((item,index)=>{
|
|
this.itemBelongGroup =data.data[0].responseList.map((item,index)=>{
|
|
return({
|
|
return({
|
|
index:index,
|
|
index:index,
|
|
@@ -541,6 +651,38 @@ export default {
|
|
// min-height: 75rpx;
|
|
// min-height: 75rpx;
|
|
// overflow-y: auto;
|
|
// overflow-y: auto;
|
|
height: 100%;
|
|
height: 100%;
|
|
|
|
+
|
|
|
|
+ .checkItemResultModal {
|
|
|
|
+ display: flex;
|
|
|
|
+ height: 100%;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ align-items: center;
|
|
|
|
+ .modalContent {
|
|
|
|
+ width: 90%;
|
|
|
|
+ height:500rpx;
|
|
|
|
+ border-radius: 20rpx;
|
|
|
|
+ background-color: #FFFFFF;
|
|
|
|
+ .modalBar{
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ align-items: center;
|
|
|
|
+ height: 80rpx;
|
|
|
|
+ color: #4E78FF;
|
|
|
|
+ font-size: 22.5rpx;
|
|
|
|
+ border-bottom: 0.1rpx solid #E5E5E5;
|
|
|
|
+ }
|
|
|
|
+ .scroll {
|
|
|
|
+ height: calc(100% - 80rpx);
|
|
|
|
+ .list {
|
|
|
|
+ display: flex;
|
|
|
|
+ height: 80rpx;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ align-items: center;
|
|
|
|
+ border-bottom: 0.1rpx solid #E5E5E5;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
.scroll-y {
|
|
.scroll-y {
|
|
height: calc(100% - 75rpx);
|
|
height: calc(100% - 75rpx);
|
|
}
|
|
}
|
|
@@ -691,6 +833,19 @@ export default {
|
|
padding-top: 32.5rpx;
|
|
padding-top: 32.5rpx;
|
|
// height: 200rpx;
|
|
// height: 200rpx;
|
|
border-bottom: 1px solid #dadee6;
|
|
border-bottom: 1px solid #dadee6;
|
|
|
|
+ .seeResultFloorOne {
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: row;
|
|
|
|
+ justify-content:space-between;
|
|
|
|
+ align-items: center;
|
|
|
|
+ margin-bottom: 25rpx;
|
|
|
|
+ padding-right: 25rpx;
|
|
|
|
+ .threePoint {
|
|
|
|
+ padding-left: 12.5rpx;
|
|
|
|
+ font-size: 20rpx;
|
|
|
|
+ font-weight:700;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
.seeName {
|
|
.seeName {
|
|
width: 175rpx;
|
|
width: 175rpx;
|
|
font-size: 22.5rpx;
|
|
font-size: 22.5rpx;
|
|
@@ -733,6 +888,19 @@ export default {
|
|
padding-top: 32.5rpx;
|
|
padding-top: 32.5rpx;
|
|
border-bottom: 1px solid #dadee6;
|
|
border-bottom: 1px solid #dadee6;
|
|
background-color: #fff;
|
|
background-color: #fff;
|
|
|
|
+ .seeResultFloorOne {
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: row;
|
|
|
|
+ justify-content:space-between;
|
|
|
|
+ align-items: center;
|
|
|
|
+ margin-bottom: 25rpx;
|
|
|
|
+ padding-right: 25rpx;
|
|
|
|
+ .threePoint {
|
|
|
|
+ padding-left: 12.5rpx;
|
|
|
|
+ font-size: 20rpx;
|
|
|
|
+ font-weight:700;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
.seeName {
|
|
.seeName {
|
|
width: 175rpx;
|
|
width: 175rpx;
|
|
font-size: 22.5rpx;
|
|
font-size: 22.5rpx;
|