|
@@ -58,11 +58,11 @@
|
|
|
</view>
|
|
|
</template>
|
|
|
<!-- 只有当查核者进入才展示 -->
|
|
|
- <view class="rowTwo" v-if="nowPermission == 3||nowPermission == 1" :animation="animationData">
|
|
|
- <text class="rowTwoName">查核状态</text>
|
|
|
+ <view class="rowTwo" v-if="nowPermission == 3||nowPermission == 1" :animation="animationData" v-for="(v,i) in btnArr">
|
|
|
+ <text class="rowTwoName">{{v.key}}</text>
|
|
|
<view class="filterBtnWrap">
|
|
|
- <com-button v-for="(item, index) in btnArr" :btnText="item.label" :width="350" :height="80"
|
|
|
- :type="active === item.id ? 'pramary':'default'" v-on:btnClick="btnClick(item.id)" />
|
|
|
+ <com-button v-for="(item, index) in v.list" :btnText="item.label" :width="350" :height="80" :marginBottom="20"
|
|
|
+ :type="setFilterBtnType(item.value,v.key)" v-on:btnClick="btnClick(item.value,v.key)" />
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
@@ -164,7 +164,8 @@
|
|
|
<text class="currentScore">{{totalSubtotalScore}}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
+ </view>
|
|
|
+ <!--查核列表为空&&dang q -->
|
|
|
<view v-if="detailList.length>0&&active != 2&&finishedStatus != 1" @click="onkeyCheckHandle"
|
|
|
:class="[subtotalScore != null&&subtotalScore>=0?'botOneKeyCheck typeTwo':'botOneKeyCheck']">完成</view>
|
|
|
</view>
|
|
@@ -185,19 +186,7 @@
|
|
|
data() {
|
|
|
return {
|
|
|
|
|
|
- btnArr: [{
|
|
|
- id: 0,
|
|
|
- label: '全部'
|
|
|
- },
|
|
|
- {
|
|
|
- id: 1,
|
|
|
- label: '未查核'
|
|
|
- },
|
|
|
- {
|
|
|
- id: 2,
|
|
|
- label: '已查核'
|
|
|
- },
|
|
|
- ],
|
|
|
+ btnArr: [],
|
|
|
showModal: false,
|
|
|
detailList: [],
|
|
|
copyDetailList: [],
|
|
@@ -207,7 +196,11 @@
|
|
|
}],
|
|
|
checkPointId: 'all',
|
|
|
nowPermission: uni.getStorageSync('nowPermission'),
|
|
|
- active: 0, //筛选tab下标
|
|
|
+ active:{
|
|
|
+ result:['全部'],
|
|
|
+ checkStatus:'全部',
|
|
|
+ other:'全部'
|
|
|
+ }, //筛选tab下标
|
|
|
checkId: '',
|
|
|
deptId: '',
|
|
|
currentScrollHeight: 0,
|
|
@@ -282,14 +275,22 @@
|
|
|
this.checkId = checkId;
|
|
|
this.finishedStatus = finishedStatus;
|
|
|
this.situationType = situationType;
|
|
|
- this.pageTemplateId = pageTemplateId;
|
|
|
+ this.pageTemplateId = pageTemplateId;
|
|
|
+
|
|
|
+
|
|
|
if (situationType == 2) {
|
|
|
this.getInvestigationUsers();
|
|
|
}
|
|
|
//非分页情况下
|
|
|
if (situationType != 2) {
|
|
|
this.loadItemData();
|
|
|
- }
|
|
|
+ }
|
|
|
+ if(this.currentSelectedInvestigationUser){
|
|
|
+ this.getFilterList(checkId,deptId,this.currentSelectedInvestigationUser.investigationId);
|
|
|
+ }else{
|
|
|
+ this.getFilterList(checkId,deptId);
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
onShow: function() {
|
|
|
if (this.ifReloadPageData) {
|
|
@@ -316,7 +317,35 @@
|
|
|
data: true
|
|
|
});
|
|
|
},
|
|
|
- methods: {
|
|
|
+ methods: {
|
|
|
+ /**
|
|
|
+ * @param {number} checkId 查核id
|
|
|
+ * @param {number} deptId 部门id
|
|
|
+ * @param {number} responsibleUserId 责任对象id 非必传
|
|
|
+ */
|
|
|
+ getFilterList(checkId,deptId,responsibleUserId){
|
|
|
+
|
|
|
+ this.$store.dispatch({
|
|
|
+ type: 'checkMainPoints/commActions',
|
|
|
+ key: 'getPointConditions',
|
|
|
+ data: {
|
|
|
+ checkId:checkId,
|
|
|
+ responsibleUserId,
|
|
|
+ deptId:deptId
|
|
|
+ }
|
|
|
+ }).then(data=>{
|
|
|
+
|
|
|
+ const {checkResults=[],checkStatuses=[],others=[]} = data;
|
|
|
+ const _checkResults = checkResults.map(t=>({label:`${t.value}(${t.num})`,id:Math.random(),value:t.value}));
|
|
|
+ const _checkStatuses = checkStatuses.map(t=>({label:`${t.value}(${t.num})`,id:Math.random(),value:t.value}));
|
|
|
+ const _others = others.map(t=>({label:`${t.value}(${t.num})`,id:Math.random(),value:t.value}));
|
|
|
+ this.btnArr = [
|
|
|
+ {key:'查核结果',list:_checkResults},
|
|
|
+ {key:'查核状态',list:_checkStatuses},
|
|
|
+ {key:'其他',list:_others},
|
|
|
+ ];
|
|
|
+ })
|
|
|
+ },
|
|
|
//绑定当事人
|
|
|
/**
|
|
|
* @param {Boolean} bool true直接执行设置当事人,忽略本地以缓存的deptTd
|
|
@@ -458,7 +487,7 @@
|
|
|
if (!status) {
|
|
|
this.$refs.popup.open();
|
|
|
this.ifOpenFilter = true;
|
|
|
- this.animation.height('11vh').step();
|
|
|
+ this.animation.height('15vh').step();
|
|
|
} else {
|
|
|
this.$refs.popup.close();
|
|
|
this.ifOpenFilter = false;
|
|
@@ -523,11 +552,42 @@
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
+ },
|
|
|
+ setFilterBtnType(val,key){
|
|
|
+ if(key == '查核结果'){
|
|
|
+ const index = this.active.result.findIndex(t=>val==t);
|
|
|
+ return index>=0?'pramary':'default'
|
|
|
+ }
|
|
|
+ if(key == '查核状态'){
|
|
|
+ return this.active.checkStatus == val?'pramary':'default'
|
|
|
+ }
|
|
|
+ if(key == '其他'){
|
|
|
+ return this.active.other == val?'pramary':'default'
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
- btnClick(id) {
|
|
|
- // console.log({id});
|
|
|
- this.active = id;
|
|
|
- this.filterCompleteFlag(id);
|
|
|
+ btnClick(val,key) {
|
|
|
+ const _active = this.active;
|
|
|
+ if(key == '查核结果'){
|
|
|
+ const index = _active.result.findIndex(t=>t == val);
|
|
|
+ if(index >= 0){
|
|
|
+ //当前已存在该id
|
|
|
+ _active.result.splice(index,1);
|
|
|
+ }else{
|
|
|
+ _active.result.push(val);
|
|
|
+ console.log({_active});
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(key == '查核状态'){
|
|
|
+ _active.checkStatus = val
|
|
|
+ }
|
|
|
+ if(key == '其他'){
|
|
|
+ _active.other = val
|
|
|
+ }
|
|
|
+
|
|
|
+ this.active = _active;
|
|
|
+ //更新列表
|
|
|
+ this.loadItemData();
|
|
|
},
|
|
|
//获取访查对象列表
|
|
|
getInvestigationUsers() {
|
|
@@ -563,37 +623,39 @@
|
|
|
checkId,
|
|
|
deptId,
|
|
|
situationType,
|
|
|
- investigationId
|
|
|
+ investigationId,
|
|
|
}) {
|
|
|
const params = {
|
|
|
checkId,
|
|
|
deptId,
|
|
|
- situationType,
|
|
|
- }
|
|
|
-
|
|
|
+ situationType,
|
|
|
+ checkStatus:this.active.checkStatus,
|
|
|
+ checkResult:this.active.result.join(','),
|
|
|
+ other:this.active.other
|
|
|
+ }
|
|
|
+
|
|
|
//增加受访人
|
|
|
if (situationType == 2) params['investigationId'] = investigationId;
|
|
|
-
|
|
|
this.dispatch('checkTaskDetailList', {
|
|
|
...params
|
|
|
}).then((data) => {
|
|
|
- if (data) {
|
|
|
- if (!data.checkDetailMapResponses) return;
|
|
|
-
|
|
|
+ if (data) {
|
|
|
+ const renderList = data.checkDetailMapResponses?data.checkDetailMapResponses:[];
|
|
|
+
|
|
|
this.$store.commit('checkMainPoints/comChangeState', {
|
|
|
key: 'detailList',
|
|
|
- data: data.checkDetailMapResponses
|
|
|
+ data: renderList
|
|
|
});
|
|
|
|
|
|
this.isBindResponsible = data.isBindResponsible;
|
|
|
- this.detailList = data.checkDetailMapResponses;
|
|
|
- this.copyDetailList = data.checkDetailMapResponses;
|
|
|
+ this.detailList = renderList;
|
|
|
+ this.copyDetailList = renderList;
|
|
|
this.currentScore = data.getScore;
|
|
|
this.totalScore = data.totalScore;
|
|
|
this.subtotalScore = data.subtotalScore;
|
|
|
this.totalSubtotalScore = data.totalSubtotalScore;
|
|
|
- this.checkDetailMapResponses = data.checkDetailMapResponses;
|
|
|
- data.checkDetailMapResponses.map(({
|
|
|
+ this.checkDetailMapResponses = renderList;
|
|
|
+ renderList.map(({
|
|
|
checkPointId,
|
|
|
checkPointName
|
|
|
}) => {
|
|
@@ -604,9 +666,6 @@
|
|
|
});
|
|
|
//检查是否需要弹绑定当事人弹窗
|
|
|
this.toBindPeople();
|
|
|
-
|
|
|
- //页面获取完数据时,保持筛选
|
|
|
- this.filterCompleteFlag(this.active);
|
|
|
}
|
|
|
});
|
|
|
},
|
|
@@ -657,20 +716,6 @@
|
|
|
.filter((item) => item.checkPointId === id);
|
|
|
}
|
|
|
},
|
|
|
- filterCompleteFlag(btnId) {
|
|
|
- if (btnId === 0) {
|
|
|
- this.detailList = [...this.copyDetailList];
|
|
|
- } else {
|
|
|
- let completeFlag = btnId === 1 ? false : true;
|
|
|
- this.detailList = this.copyDetailList.map((item) => {
|
|
|
- return {
|
|
|
- ...item,
|
|
|
- responseList: item.responseList
|
|
|
- .filter((child) => child.completeFlag === completeFlag)
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
clearSearch() {
|
|
|
this.searchKey = '';
|
|
|
this.detailList = [...this.copyDetailList];
|
|
@@ -901,7 +946,8 @@
|
|
|
|
|
|
.filterBtnWrap {
|
|
|
display: flex;
|
|
|
- flex-direction: row;
|
|
|
+ flex-direction: row;
|
|
|
+ flex-wrap: wrap;
|
|
|
justify-content: space-between;
|
|
|
}
|
|
|
}
|