123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458 |
- <template>
- <view class="checkMainPoints">
- <u-navbar :title="ifSearchMod?'':'查核要点'" title-color="#292C33">
- <view v-if="ifSearchMod" class="slot-wrap" back-icon-size="25rpx">
- <input confirm-type="search" class="searchBar" type="text" v-model="searchKey" @input="filterFromName"
- placeholder-class="searchBarHolder" placeholder="搜索查核要点或查核项" />
- <image @click="clearSearch" v-if="searchKey" class="clearIcon" src="../../static/text-clear.png"
- mode=""></image>
- </view>
- <view v-if="ifSearchMod" class="navbar-right" slot="right">
- <text @click="cancelSearchMod" class="searchActiveBtn">取消</text>
- </view>
- </u-navbar>
- <uni-popup ref="popup" type="center" :maskClick="true" @change="onMaskChange">
-
- </uni-popup>
- <tm-top-menu v-if="!ifSearchMod" class="tm-top-menu">
- <template v-if="situationType != 2">
- <view class="top-search">
- <view class="search">
- <input confirm-type="search" @input="filterFromName" placeholder="搜索查核要点或查核项" />
- <image src="../../static/search.png"></image>
- </view>
- <view class="btnGroup">
- <image @click="toBindPeople(true)" class="searchBtn" src="../../static/bindPeople.png" mode="">
- </image>
- <image @click="openFilter" class="filterBtn" src="../../static/filterIcon.png" mode="">
- </image>
- </view>
- </view>
- </template>
- <!-- 查核分页模式下// -->
- <template v-if="situationType == 2">
- <view class="top-search-two">
- <view class="rowOne" v-if="nowPermission == 3 && situationType == 2">
- <view class="selectPeople" @click="toSelectVisiter">
- <template v-if="investigationUsers.length>0">
- <image
- v-if="currentSelectedInvestigationUser&¤tSelectedInvestigationUser['investigationStatus'] != 1"
- class="completePeopleIcon" src="../../static/peopleIcon.png" mode=""></image>
- <image
- v-if="currentSelectedInvestigationUser&¤tSelectedInvestigationUser['investigationStatus'] == 1"
- class="completePeopleIcon" src="../../static/completePeopleIcon.png" mode="">
- </image>
- <text
- class="peopleName">{{currentSelectedInvestigationUser?currentSelectedInvestigationUser['contentVOs'][0].value:''}}</text>
- <image class="fullArrow" src="../../static/close-icon.png" mode=""></image>
- </template>
- <template v-if="investigationUsers.length==0">
- <image @click="toSelectVisiter" class="addPeopleBtn" src="../../static/icon-add.png"
- mode=""></image>
- </template>
- </view>
- <view class="btnGroup">
- <image @click="toSearch" class="searchBtn" src="../../static/search.png" mode=""></image>
- <image @click="openFilter" class="filterBtn" src="../../static/filterIcon.png" mode="">
- </image>
- </view>
- </view>
- </view>
- </template>
- <!-- 只有当查核者进入才展示 -->
- <view ref="rowTwoWraper">
- <view class="rowTwo"v-if="nowPermission == 3||nowPermission == 1||nowPermission == 7||nowPermission == 8||nowPermission == 6" :animation="animationData" v-for="(v,i) in btnArr">
- <text class="rowTwoName">{{v.key}}</text>
- <view class="filterBtnWrap" :style="{paddingBottom:i==2?'20px':0}">
- <com-button v-for="(item, index) in v.list" :btnText="item.label" :width="`${32}%`" :height="80" :marginBottom="20"
- :marginRight="(index+1)%3==0?0:`2%`"
- :type="setFilterBtnType(item.value,v.key)" v-on:btnClick="btnClick(item.value,v.key,item.code)" />
- </view>
- </view>
- </view>
- </tm-top-menu>
- <tm-modal v-show="showModal" v-on:click="toggleModal(false)">
- <view class="content-list">
- <view class="list-item" v-for="(item, index) in point"
- :class="{active: checkPointId === item.checkPointId}" @click="checkPointHandle(item.checkPointId)">
- <text>{{item.checkPointName}}</text>
- <image class="check-img" v-if="checkPointId === item.checkPointId"
- src="../../static/checkStatus.png"></image>
- </view>
- </view>
- </tm-modal>
- <view class="contentContainer">
- <image class="dataEmptyimg" v-if="detailList.length==0" src="../../static/no-data.png"></image>
- <scroll-view @scroll="scrollHandle" scroll-y="true"
- v-if="detailList.length>0"
- :class="(detailList.length>0&&active != 2&&finishedStatus != 1)?'scroll-Y':'scroll-Y noBtn'">
-
- <view class="list" v-for="(item, index) in detailList" :key="index">
- <view class="title" v-if="item.responseList.length > 0">查核要点:{{item.checkPointName}}</view>
- <view class="item" v-for="(child, n) in item.responseList"
- @click="childClick(child,item.checkPointId)" :key="n">
- <view class="top-box">
- <view class="top-box-left">
- <view :class="[child.completeFlag?'index-icon done':'index-icon']">{{n + 1}}</view>
- <text>{{child.checkItemName}}</text>
- <!-- <text>ICU病房查看危重病人的抢救全过程(访谈)ICU病房查看危重病人的抢救全过程(访谈)ICU病房查看危重病人的抢救全过程(访谈)的抢救全过程(访谈)</text> -->
- </view>
- <view class="topRightGroup">
- <!-- showNotApplicable==0展示,1不展示 -->
- <view class="checkStatus" v-if="!child.showNotApplicable"
- @click.stop="checkNoApplicable(child)">
- <!-- <image v-if="child.isNoApplicable&&!notApplicableList.includes(child.id)"
- class="checkIcon" src="../../static/check-no.png" mode=""></image>
-
- <image v-if="notApplicableList.includes(child.id)||!child.isNoApplicable"
- class="checkIcon" src="../../static/check-checkbox.png" mode=""></image> -->
- <image v-if="child.isNoApplicable"
- class="checkIcon" src="../../static/check-no.png" mode=""></image>
-
- <image v-if="!child.isNoApplicable"
- class="checkIcon" src="../../static/check-checkbox.png" mode=""></image>
- <text class="checkStatusText">{{child.notApplicableName}}</text>
- </view>
- <image src="../../static/tuli.png"
- @tap.stop="goLegendDetails($event ,child.checkItemId, item.checkPointId)"></image>
- </view>
- </view>
- <view class="children">
- <view class="child">
- <text>{{child.deptName || '--'}}</text>
- <text>查核单位</text>
- </view>
- <view class="child">
- <text>{{child.checkModelName || '--'}}</text>
- <text>查核方式</text>
- </view>
- <view class="child">
- <text :style="{color:`#${child.lastResultColor}`}">{{isZichaDucha?child.lastResultName:child.lastResult || '--'}}</text>
- <text>上次结果</text>
- </view>
- <view class="child">
- <text :style="{color:`#${child.checkResultColor}`}">{{isZichaDucha?child.checkResultName:child.checkResult || '--'}}</text>
- <text>本次结果</text>
- </view>
- </view>
- </view>
- </view>
- </scroll-view>
- </view>
- <tm-callback-listpage />
- <view class="bottomBtnGroup" v-if="!ifSearchMod">
- <view v-if="!isShowSubtotal" class="score">
- <view class="box">
- <text class="label">得分</text>
- <text class="currentScore">{{currentScore}}</text>
- </view>
- <view class="midLine"></view>
- <view class="box">
- <text class="label">总分</text>
- <text class="totalScore">{{totalScore}}</text>
- </view>
- </view>
- <view v-if="isShowSubtotal" class="score scoreTypeTwo">
- <view class="box">
- <view class="rowOne">
- <text class="currentScore">{{currentScore}}</text>
- <text class="subLabel">得分</text>
- </view>
- <view class="rowTwo">
- <text class="label">总分:</text>
- <text class="currentScore">{{totalScore}}</text>
- </view>
- </view>
- <view class="midLine"></view>
- <view class="box">
- <view class="rowOne">
- <text class="currentScore xiaoji">{{subtotalScore}}</text>
- <text class="subLabel">小计</text>
- </view>
- <view class="rowTwo">
- <text class="label">总分:</text>
- <text class="currentScore">{{totalSubtotalScore}}</text>
- </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>
- </view>
- </template>
- <script>
- import {
- mapState
- } from 'vuex';
- import {
- _stopPropagation
- } from "../../utils/compatible.js";
- export default {
- data() {
- return {
- btnArr: [],
- showModal: false,
- detailList: [],
- copyDetailList: [],
- point: [{
- checkPointId: 'all',
- checkPointName: '全部要点'
- }],
- checkPointId: 'all',
- nowPermission: uni.getStorageSync('nowPermission'),
- active:{
- result:['全部'],
- resultCode:-1,
- checkStatus:'全部',
- checkStatusCode:-1,
- other:'全部',
- otherCode:-1,
- }, //筛选tab下标
- checkId: '',
- deptId: '',
- currentScrollHeight: 0,
- finishedStatus: 0, //所有计划里的查核项是否都以完成
- totalScore: 0,
- currentScore: 0,
- subtotalScore: 0, //小计得分
- totalSubtotalScore: 0, //小计总分
- isShowSubtotal:false,//是否展示小计
- animationData: {}, //动画对象
- ifOpenFilter: false,
- searchKey: '', //搜索关键字
- ifSearchMod: false, //搜索模式
- applicable: true, //是否适用
- situationType: null, //情境类型
- notApplicableList: [], //保存本次check的查核项id
- scoreType:null, //计分方式类型 add by yfb 20230417
- customScoreTotal:null, //自定义计分总分分值
- deductPointTotal:null, //扣分汇总
- iOrder:1,// 查核项明细中,下一步顺序是否按要点结束,1:按要点结束;2:按顺序结束
- };
- },
- computed: {
- ...mapState({
- investigationUsers: state => state.checkMainPoints.investigationUsers,
- currentSelectedInvestigationUser: state => state.checkMainPoints.currentSelectedInvestigationUser,
- ifReloadPageData: state => state.checkMainPoints.ifReloadPageData,
- }),
- getCheckPointName() {
- let item = this.point.find((item) => item.checkPointId === this.checkPointId);
- return item ? item.checkPointName : '';
- }
- },
- watch: {
- currentSelectedInvestigationUser(newVal, oldVal) {
- if (this.situationType == 2) {
- //更换受访对象时拉取新数据
- if (newVal && newVal.investigationUserName == '') {
- //已删除所有访查对象
- this.$store.commit('checkMainPoints/comChangeState', {
- key: 'detailList',
- data: []
- });
- this.detailList = [];
- } else {
- this.loadItemData();
- }
- }
- },
- ifReloadPageData(newVal){
- if(newVal){
- this.loadItemData();
- }
- }
- },
- goBack() {
- this.$store.commit('checkList/comChangeState', { //刷新前一页数据
- key: 'ifReloadPageData',
- data: true
- });
-
- this.$store.commit('todayCheck/comChangeState', { //刷新todayCheck页面计划
- key: 'isReloadPageData',
- data: true
- });
- },
- onLoad: function({
- checkId,
- deptId,
- finishedStatus,
- situationType,
- pageTemplateId,
- isZichaDucha,
- functionId, //计划id 用于自查督查
- departmentId,//科室id 用于自查督查
- systemSituationType,
- pointsetType, //计分方式类型 add by yfb 20230417
- checkOrder,//下一项 功能类型 add by yfb 20230609
- }) {
-
- this.deptId = deptId;
- this.checkId = checkId;
- this.finishedStatus = finishedStatus;
- this.situationType = situationType;
- this.pageTemplateId = pageTemplateId;
- this.functionId = functionId;
- this.isZichaDucha = isZichaDucha?JSON.parse(isZichaDucha):false;
- this.departmentId = departmentId; //用于自查督查作为科室id
- this.systemSituationType = systemSituationType;
- this.pointsetType=pointsetType;
-
- if (situationType == 2) {
- //分页模式
- this.getInvestigationUsers();
- }
- //非分页情况下
- if (situationType != 2) {
- this.loadItemData();
- }
- if(this.currentSelectedInvestigationUser){
- this.getFilterList(checkId,deptId,this.currentSelectedInvestigationUser.investigationId);
- }else{
- this.getFilterList(checkId?checkId:functionId,deptId?deptId:departmentId);
- //this.getFilterList(checkId,departmentId);
- }
- this.iOrder=checkOrder;
- },
- onShow: function() {
- if (this.ifReloadPageData) {
- //页面重新拉取数据
- this.loadItemData();
- }
- //创建动画实例
- const animation = uni.createAnimation({
- duration: 100,
- timingFunction: 'ease',
- })
- this.animation = animation;
- },
- onBackPress(e) {
- this.$store.commit('checkGroup/comChangeState', {
- key: 'ifReloadPageData',
- data: true
- });
- },
- onUnload() {
-
- this.$store.commit('checkMainPoints/comChangeState', {
- key: 'ifReloadPageData',
- data: false
- });
-
- this.$store.commit('todayCheck/comChangeState', { //刷新todayCheck页面计划
- key: 'isReloadPageData',
- data: true
- });
- },
- 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,
- indicatorType:this.isZichaDucha?1:0 //0 普通的 1自查督查
- }
- }).then(data=>{
-
- const {checkResults=[],checkStatuses=[],others=[]} = data;
- const _checkResults = checkResults.map(t=>({label:`${t.value}(${t.num})`,id:Math.random(),value:t.value,code:t.code}));
- const _checkStatuses = checkStatuses.map(t=>({label:`${t.value}(${t.num})`,id:Math.random(),value:t.value,code:t.code}));
- const _others = others.map(t=>({label:`${t.value}(${t.num})`,id:Math.random(),value:t.value,code:t.code}));
- this.btnArr = [
- {key:'查核状态',list:_checkStatuses},
- {key:'查核结果',list:_checkResults},
- {key:'其他',list:_others},
- ];
- console.log('2023070503',this.btnArr);
- })
- },
- //绑定当事人
- /**
- * @param {Boolean} bool true直接执行设置当事人,忽略本地以缓存的deptTd
- */
- toBindPeople(bool) {
- if (this.isBindResponsible && bool) {
- uni.showToast({
- icon: 'none',
- title: '已绑定过当事人!',
- duration: 2000
- });
- return;
- };
- let notNowBindPeopledeptIds = uni.getStorageSync('notNowBindPeopledeptIds');
- if (!notNowBindPeopledeptIds) {
- notNowBindPeopledeptIds = []
- } else {
- notNowBindPeopledeptIds = JSON.parse(notNowBindPeopledeptIds);
- }
-
- if (!notNowBindPeopledeptIds.includes(this.deptId) || bool) {
- const nowPermission = JSON.parse(uni.getStorageSync('nowPermission'));
- // console.log(this.isBindResponsible,this.checkDetailMapResponses.length > 0,nowPermission);
- if (!this.isBindResponsible && this.checkDetailMapResponses.length > 0 && (nowPermission == 3||nowPermission == 7||nowPermission == 8)) {
- //当是否已绑定当事人状态为false,可查核项大于0且当前角色是查核组员时
- //只有从查核列表进来才提示
- uni.showModal({
- title: '提示',
- content: '目前未批量分配当事人,是否前往选择?',
- confirmText: '前往设置',
- cancelText: '暂不设置',
- success: (res) => {
- if (res.confirm) {
- uni.navigateTo({
- url: `/pages/responsibleList/responsibleList?deptId=${this.isZichaDucha?this.departmentId:this.deptId}&isFromCheckMainPoints=true&isZichaDucha=${this.isZichaDucha}`,
- });
- } else if (res.cancel) {
- //将当前病区保存,之后不在提示
- notNowBindPeopledeptIds.push(this.deptId);
- uni.setStorageSync('notNowBindPeopledeptIds', JSON.stringify(
- notNowBindPeopledeptIds));
- }
- }
- });
- }else{
- if(!this.isBindResponsible){
- //已绑定当事人不弹提示!
- uni.showModal({
- title: '提示',
- content: '你目前无法批量分配当事人',
- confirmText: '确定',
- showCancel:false
- });
- }
- }
- }
- },
- loadItemData() {
- console.log('2023070404',this.active);
- if(this.isZichaDucha){
- console.log('2023070401',this.active);
-
- //自查督查的情况下
- this.$store.dispatch({
- type: 'checkMainPoints/commActions',
- key: 'getZichaduchaCheckItems',
- data:{
- functionId:this.functionId,
- //filter:"",
- checkStatus:this.active.checkStatusCode,
- checkResult:this.active.resultCode,//this.active.result.join(','),
- checkImages:this.active.otherCode
- }
- }).then(data => {
- if (data) {
- let renderList = data.checkDetailMapResponses?data.checkDetailMapResponses:[];
-
- this.$store.commit('checkMainPoints/comChangeState', {
- key: 'detailList',
- data: renderList
- });
- this.isBindResponsible = data.isBindResponsible;
- this.detailList = renderList;
- this.copyDetailList = renderList;
-
- this.subtotalScore = data.subtotalScore;
- this.isShowSubtotal = data.isShowSubtotal;
- //add by yfb 20230417
- this.scoreType=data.scoreType;
- this.customScoreTotal=data.customScoreTotal;
- this.deductPointTotal=data.deductPointTotal;
- if (data.scoreType==2){
- this.totalScore=data.customScore;
- this.currentScore=data.customScoreTotal;
- }else{
- this.currentScore = data.getScore;
- this.totalScore = data.totalScore;
- }
- this.totalSubtotalScore = data.totalSubtotalScore;
- this.checkDetailMapResponses = renderList;
- renderList.map(({
- checkPointId,
- checkPointName
- }) => {
- this.point.push({
- checkPointId,
- checkPointName
- });
- });
- //检查是否需要弹绑定当事人弹窗
- //this.toBindPeople();
-
- //add by yfb 20230609
- this.iOrder=data.checkOrder;
- }
- });
-
- return
- }
-
- //非自查督查的情况下
- if(this.situationType == 2&&!this.currentSelectedInvestigationUser){
- //分页模式下且未选择访谈对象时拒绝请求数据同时清空历史数据
- this.$store.commit('checkMainPoints/comChangeState', {
- key: 'detailList',
- data:[]
- });
-
- this.detailList = [];
- this.isBindResponsible = false;
- this.copyDetailList = [];
- this.currentScore =0;
- this.totalScore = 0;
- this.subtotalScore = 0;
- this.totalSubtotalScore = 0;
- this.checkDetailMapResponses = [];
- this.point = [];
- return false
- }
-
- this.checkTaskDetailList({
- 'deptId': this.deptId,
- 'checkId': this.checkId,
- 'situationType': this.situationType,
- 'investigationId': this.currentSelectedInvestigationUser && this
- .currentSelectedInvestigationUser.investigationId
- })
- },
- //不适用回调
- checkNoApplicable({
- id,
- isNoApplicable
- }) {
- this.$store.dispatch({
- type: 'checkMainPoints/commActions',
- key: 'oneKeyNotApplicable',
- data: {
- id,
- type:this.isZichaDucha?1:0, //0 普通的 1自查督查
- }
- }).then(data => {
- if (data) {
- //重新拉去列表数据
- this.loadItemData();
- }
- })
- },
- toSelectVisiter() {
- //更新受访对象状态,可能已经是进行中了
- this.$store.dispatch({
- type: 'checkMainPoints/commActions',
- key: 'getInvestigationUsers',
- data: {
- checkId: this.checkId,
- situationType: this.situationType,
- deptId: this.deptId
- }
- }).then(data => {
- this.$store.commit('checkMainPoints/comChangeState', {
- key: 'investigationUsers',
- data: data.map((t,index)=>({...t,id:t.investigationId}))
- });
- uni.navigateTo({
- url: `/pages/selectVisitPerson/selectVisitPerson?checkId=${this.checkId}&situationType=${this.situationType}&deptId=${this.deptId}&pageTemplateId=${this.pageTemplateId}`
- });
- });
- },
- toSearch() {
- this.ifSearchMod = true;
- this.detailList = [];
- },
- cancelSearchMod() {
- this.ifSearchMod = false;
- this.detailList = [...this.copyDetailList];
- },
- onMaskChange({
- show
- }) {
- if (!show) {
- this.ifOpenFilter = false;
- this.animation.height(0).step();
- this.animationData = this.animation.export()
- }
- },
- openFilter() {
- const status = this.ifOpenFilter;
- if (!status) {
- this.$refs.popup.open();
- this.ifOpenFilter = true;
- this.animation.height('100%').step();
- } else {
- this.$refs.popup.close();
- this.ifOpenFilter = false;
- this.animation.height(0).step();
- }
- this.animationData = this.animation.export()
- },
- //滚动监听事件,记录滚动高度
- scrollHandle(e) {
- this.currentScrollHeight = e.detail.scrollTop;
- },
- //一键查核
- onkeyCheckHandle() {
- if(this.situationType == 2&&!this.currentSelectedInvestigationUser){
- //当分页模式且未添加/选择受访对象时
- uni.showToast({
- title: '请先选择或添加受访对象!',
- duration: 2000,
- icon:'none'
- });
- return;
- }
- uni.showModal({
- title: '注意',
- content: '确定所有未填写查核结果项默认满分结果吗?',
- success: (res) => {
- if (res.confirm) {
- console.log('用户点击确定');
- this.oneKeyCheckCommit();
- } else if (res.cancel) {
- console.log('用户点击取消');
- }
- }
- });
- },
- oneKeyCheckCommit() {
- if(!this.isZichaDucha){
- //非自查督查
- let ids = [];
- this.detailList.forEach(item => {
- //筛选掉已查核项
- const temp = item.responseList.filter(v => !v.checkResult);
- const arr = temp.map(v => v.id);
- ids = ids.concat(arr);
- });
- this.$store.dispatch({
- type: 'checkMainPoints/commActions',
- key: 'oneKeyCheck',
- data: ids
- }).then(data => {
- if (data) {
- uni.showModal({
- title: '查核完成!',
- content: '',
- showCancel: false,
- success: function(res) {
- if (res.confirm) {
- console.log('用户点击确定');
- uni.navigateBack({
- delta: 1
- });
- }
- }
- });
- }
- });
-
- }else{
- //自查督查
- this.$store.dispatch({
- type: 'checkMainPoints/commActions',
- key: 'oneKeyCheckZichaducha',
- data:Number(this.functionId)
- }).then((data)=>{
- if(data){
- uni.showModal({
- title: '查核完成!',
- content: '',
- showCancel: false,
- success: function(res) {
- if (res.confirm) {
- uni.navigateBack({
- delta: 1
- });
- }
- }
- });
- }
- })
- }
-
- },
- 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(val,key,code) {
- const _active = this.active;
- console.log('2023070501',_active);
- if(key == '查核结果'){
-
- //_active.result=val;
- 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});
- }
- _active.resultCode=code;
- }
- if(key == '查核状态'){
- _active.checkStatus = val;
- _active.checkStatusCode=code;
- }
- if(key == '其他'){
- _active.other = val;
- _active.otherCode=code;
- }
-
- this.active = _active;
- console.log('2023070502',_active);
- //更新列表
- this.loadItemData();
- },
- //获取访查对象列表
- getInvestigationUsers() {
- this.$store.dispatch({
- type: 'checkMainPoints/commActions',
- key: 'getInvestigationUsers',
- data: {
- checkId: this.checkId,
- situationType: this.situationType,
- deptId: this.deptId
- }
- }).then(data => {
- if(data.length==0){
- //当不存在访查对象时
- uni.showModal({
- title: '提示',
- content: '你目前还未添加访谈对象!',
- confirmText: '确定',
- showCancel:false
- });
- }
- this.$store.commit('checkMainPoints/comChangeState', {
- key: 'investigationUsers',
- data: data
- });
- this.$store.commit('checkMainPoints/comChangeState', {
- key: 'currentSelectedInvestigationUser',
- data: data[0]
- })
- });
- },
- checkTaskDetailList({
- checkId,
- deptId,
- situationType,
- investigationId,
- }) {
-
- const params = {
- checkId,
- deptId,
- situationType,
- checkStatus:this.active.checkStatus,
- checkResult:this.active.result.join(','),
- other:this.active.other
- }
- console.log('2023070402',params);
- //增加受访人
- if (situationType == 2) params['investigationId'] = investigationId;
-
- this.dispatch('checkTaskDetailList', {
- ...params
- }).then((data) => {
- if (data) {
- const renderList = data.checkDetailMapResponses?data.checkDetailMapResponses:[];
-
- this.$store.commit('checkMainPoints/comChangeState', {
- key: 'detailList',
- data: renderList
- });
-
- this.isBindResponsible = data.isBindResponsible;
- this.detailList = renderList;
- this.copyDetailList = renderList;
-
- this.subtotalScore = data.subtotalScore;
- this.isShowSubtotal = data.isShowSubtotal;
- this.totalSubtotalScore = data.totalSubtotalScore;
- this.checkDetailMapResponses = renderList;
- this.scoreType=data.scoreType;
- this.customScoreTotal=data.customScoreTotal;
- this.deductPointTotal=data.deductPointTotal;
- if (data.scoreType==2){
- this.totalScore=data.customScore;
- this.currentScore=data.customScoreTotal;
- }else
- {
- this.currentScore = data.getScore;
- this.totalScore = data.totalScore;
- }
- renderList.map(({
- checkPointId,
- checkPointName
- }) => {
- this.point.push({
- checkPointId,
- checkPointName
- });
- });
- //检查是否需要弹绑定当事人弹窗
- this.toBindPeople();
-
- //add by yfb 20230609
- this.iOrder=data.checkOrder;
- }
- });
- },
- childClick(child, checkPointId) {
-
- if (this.nowPermission == 1 || this.nowPermission == 3||this.nowPermission == 6 ||this.nowPermission == 7 ||this.nowPermission == 8 ) {
- let str = '',
- that = this;
- if (child.checkResult && !child.allowEdit) {
- // 当存在查核结果且不允许再修改时 跳转到查核项详情
- str = `auditItemDetails/auditItemDetails`;
- } else {
- if (this.nowPermission != 3&&this.nowPermission != 8&&this.nowPermission != 7) {
- //角色为非查核组员,职能科室普通人员,自查人
- uni.showModal({
- title: '提示',
- content: '请切换至查核者角色再进行查核操作!',
- showCancel: false
- });
- return;
- } else {
- // 跳转到查核结果提交
- str = `mainPointsDetail/mainPointsDetail`;
- }
- }
-
- uni.navigateTo({
- url: `/pages/${str}?id=${child.id}&checkPointId=${checkPointId}&checkItemId=${child.checkItemId}&situationType=${this.situationType}&isZichaDucha=${this.isZichaDucha}&departmentId=${this.departmentId}&checkOrder=${this.iOrder}&systemSituationType=${this.systemSituationType}`,
- success: function(res) {
-
- if (that.iOrder==1){
- const currentGroup = that.detailList.filter(item => item.checkPointId ==
- checkPointId);
- // 通过eventChannel向被打开页面传送数据
- res.eventChannel.emit('acceptDataFromOpenerPage', {
- data: currentGroup
- });
- }else if (that.iOrder==2){
-
- // 通过eventChannel向被打开页面传送数据
- res.eventChannel.emit('acceptDataFromOpenerPage', {
- data: that.detailList
- });
- }
- }
- });
- }
- },
- toggleModal(flage) {
- this.showModal = flage;
- },
- checkPointHandle(id) {
- this.checkPointId = id;
- if (id === 'all') {
- this.detailList = [...this.copyDetailList];
- } else {
- this.detailList = this.copyDetailList
- .filter((item) => item.checkPointId === id);
- }
- },
- clearSearch() {
- this.searchKey = '';
- this.detailList = [...this.copyDetailList];
- },
- filterFromName(e) {
- const {
- value
- } = e.detail;
- this.searchKey = value;
- if (value === '') {
- this.detailList = [...this.copyDetailList];
- } else {
- this.detailList = [];
- this.copyDetailList.map((item) => {
- let responseList = item.responseList
- .filter((child) => child.checkItemName.indexOf(value) >= 0);
- if (item.checkPointName.indexOf(value) >= 0) {
- this.detailList.push({
- ...item
- });
- } else if (responseList.length > 0) {
- this.detailList.push({
- ...item,
- responseList
- });
- }
- });
- }
- },
- goLegendDetails(e, checkItemId, checkPointId) {
- _stopPropagation(e);
- //跳转到图例详情
- uni.navigateTo({
- url: `/pages/legendDetails/legendDetails?checkItemId=${checkItemId}&checkPointId=${checkPointId}`
- });
- },
- dispatch(key, data) {
- return this.$store.dispatch({
- type: 'checkList/commActions',
- key,
- data
- });
- },
- }
- }
- </script>
- <style lang="less">
- .checkMainPoints {
- position: relative;
- height: 100%;
- display: flex;
- flex-direction: column;
- background-color: #F5F6FA;
- .slot-wrap {
- display: flex;
- flex: 1;
- justify-content: center;
- align-items: center;
- background: #F0F2F7;
- border-radius: 44px;
- padding-left: 20rpx;
- .searchBar {
- flex: 1;
- width: 100%;
- height: 55rpx;
- font-size: 22.5rpx;
- }
- .clearIcon {
- width: 25rpx;
- height: 25rpx;
- margin: 0 20.5rpx;
- }
- .searchBarHolder {
- font-size: 22.5rpx;
- font-family: SourceHanSansCN-Normal, SourceHanSansCN;
- font-weight: 400;
- color: #A1A7B3;
- }
- }
- .navbar-right {
- display: flex;
- justify-content: center;
- align-items: center;
- padding: 0 25rpx;
- .searchActiveBtn {
- font-size: 22.5rpx;
- font-family: SourceHanSansCN-Normal, SourceHanSansCN;
- font-weight: 400;
- color: #292C33;
- }
- }
- .botOneKeyCheck {
- text-align: center;
- height: 75rpx;
- width: 100%;
- line-height: 75rpx;
- font-size: 22.5rpx;
- font-family: SourceHanSansCN-Normal, SourceHanSansCN;
- font-weight: 400;
- color: #FFFFFF;
- background: #3377FF;
- }
- .bottomBtnGroup {
- // position: fixed;
- width: 100%;
- // left:0;
- // bottom: 0;
- display: flex;
- flex-direction: row;
- border-top: 1px solid #DADEE6;
- background-color: #fff;
- .score {
- display: flex;
- width: 50%;
- flex-direction: row;
- justify-content: center;
- align-items: center;
- height: 75rpx;
- .box {
- width: 50%;
- text-align: center;
- white-space: nowrap;
- vertical-align: bottom;
- .label {
- color: #666E80;
- font-size: 17.5rpx;
- margin-right: 10rpx;
- }
- .currentScore {
- font-size: 30rpx;
- font-weight: bold;
- color: #3377FF;
- &.xiaoji {
- color: #19BE6B;
- }
- }
- .totalScore {
- font-size: 30rpx;
- font-weight: bold;
- color: #292C33;
- }
- }
- .midLine {
- height: 17.5rpx;
- border-left: 0.62rpx solid #DADEE6;
- }
- &.scoreTypeTwo {
- height: 100rpx;
- .box {
- .rowOne {
- .subLabel {
- font-size: 10rpx;
- color: #82848A;
- margin-left: 10rpx;
- }
- }
- .rowTwo {
- .currentScore {
- font-size: 20rpx;
- font-weight: bold;
- color: #666E80;
- }
- }
- }
- .midLine {
- height: 25rpx;
- }
- }
- }
- .botOneKeyCheck {
- display: flex;
- justify-content: center;
- align-items: center;
- height: 100%;
- flex-grow: 1;
- font-size: 22.5rpx;
- font-family: SourceHanSansCN-Normal, SourceHanSansCN;
- font-weight: 400;
- color: #FFFFFF;
- background: #3377FF;
- &.typeTwo {
- font-size: 32.5rpx;
- }
- }
- }
- .tm-top-menu {
- .rowTwo {
- display: flex;
- width: 100%;
- height: 0;
- overflow: hidden;
- flex-direction: column;
- box-sizing: border-box;
- padding: 0 25rpx;
- overflow: hidden;
- .rowTwoName {
- font-size: 22.5rpx;
- font-family: SourceHanSansCN-Normal, SourceHanSansCN;
- font-weight: 400;
- color: #666F80;
- margin-bottom: 12.5rpx;
- padding-top: 35rpx;
- }
- .filterBtnWrap {
- display: flex;
- flex-direction: row;
- flex-wrap: wrap;
- justify-content: flex-start;
- }
- }
- }
- .top-search {
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: space-between;
- padding: 25rpx;
- background-color: #fff;
- box-shadow: 0 3.75rpx 12.5rpx 0 rgba(0, 13, 51, 0.1);
- .search {
- position: relative;
- width: 70%;
- height: 55rpx;
- line-height: 55rpx;
- background-color: #F0F2F7;
- input {
- padding: 0 45rpx 0 15rpx;
- height: 55rpx;
- line-height: 55rpx;
- font-size: 22.5rpx;
- }
- image {
- position: absolute;
- top: 16.87rpx;
- right: 15rpx;
- width: 21.25rpx;
- height: 21.25rpx;
- }
- }
- .btnGroup {
- display: flex;
- flex-direction: row;
- justify-content: center;
- align-items: center;
- .searchBtn {
- width: 30rpx;
- height: 30rpx;
- margin-right: 30rpx;
- }
- .filterBtn {
- width: 30rpx;
- height: 27.5rpx;
- }
- }
- .top-btn-wrap {
- padding-left: 25rpx;
- .btn-list {
- display: flex;
- flex-direction: row;
- .com-button {
- margin-left: 5rpx;
- &:first-child {
- margin-left: 0;
- }
- }
- }
- .select-wrap {
- display: flex;
- flex-direction: row;
- align-items: center;
- white-space: nowrap;
- image {
- margin-left: 9.37rpx;
- width: 12.5rpx;
- height: 12.5rpx;
- }
- }
- }
- }
- .top-search-two {
- display: flex;
- flex-direction: column;
- align-items: flex-start;
- justify-content: center;
- padding: 25rpx;
- background-color: #fff;
- box-shadow: 0 3.75rpx 12.5rpx 0 rgba(0, 13, 51, 0.1);
- .rowOne {
- display: flex;
- width: 100%;
- flex-direction: row;
- justify-content: space-between;
- align-items: center;
- .selectPeople {
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- align-items: center;
- .completePeopleIcon {
- width: 50rpx;
- height: 50rpx;
- margin-right: 15rpx;
- }
- .peopleName {
- font-size: 25rpx;
- font-family: SourceHanSansCN-Normal, SourceHanSansCN;
- font-weight: 400;
- color: #292C33;
- }
- .fullArrow {
- width: 11.25rpx;
- height: 7.5rpx;
- margin-left: 15rpx;
- }
- .addPeopleBtn {
- width: 30rpx;
- height: 30rpx;
- margin-right: 12.5rpx;
- }
- }
- .btnGroup {
- .searchBtn {
- width: 30rpx;
- height: 30rpx;
- margin-right: 50rpx;
- }
- .filterBtn {
- width: 30rpx;
- height: 27.5rpx;
- }
- }
- }
- }
- .content-list {
- // padding-top: 105rpx;
- width: 100%;
- background-color: #fff;
- .list-item {
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- align-items: center;
- border-bottom: 1px solid #DADEE6;
- padding: 0 25rpx;
- width: 100%;
- height: 87.5rpx;
- font-size: 22.5rpx;
- line-height: 33.75rpx;
- color: #292C33;
- .check-img {
- float: right;
- width: 19.37rpx;
- height: 14.37rpx;
- }
- &.active {
- color: #3377FF;
- }
- }
- }
- .contentContainer {
- display: flex;
- flex: 1;
- height: 100%;
- overflow: hidden;
- .dataEmptyimg {
- display: block;
- width:200rpx;
- height:230rpx;
- margin: 0 auto;
- margin-top: 200rpx;
- }
- .scroll-Y {
- height: 100%;
- &.noBtn {
- height: 100%;
- }
- }
- }
- .list {
- .title {
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- padding-left: 25rpx;
- width: 100%;
- height: 62.5rpx;
- line-height: 62.5rpx;
- color: #666F80;
- }
- .item {
- margin-top: 15rpx;
- padding: 25rpx 0;
- min-height: 167.5rpx;
- background-color: #fff;
- &:nth-child(2) {
- margin-top: 0;
- }
- .top-box {
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- align-items: center;
- .top-box-left {
- display: flex;
- flex-direction: row;
- width: calc(100% - 55rpx);
- .index-icon {
- margin-right: 15rpx;
- border-radius: 0 62.5rpx 62.5rpx 0;
- width: 50rpx;
- height: 35rpx;
- line-height: 35rpx;
- text-align: center;
- color: #fff;
- background-color: #66B2FE;
- &.done {
- background-color: rgba(195, 202, 217, 1);
- }
- }
- >text {
- display: -webkit-box;
- overflow: hidden;
- width: calc(100% - 65rpx);
- text-overflow: ellipsis;
- -webkit-line-clamp: 2;
- /*! autoprefixer: off */
- -webkit-box-orient: vertical;
- }
- }
- .topRightGroup {
- display: flex;
- flex-direction: row;
- .checkStatus {
- display: flex;
- flex-direction: row;
- justify-content: center;
- align-items: center;
- width: 125rpx;
- height: 40rpx;
- margin-right: 15rpx;
- background: #F2F4F7;
- border-radius: 20rpx;
- .checkIcon {
- width: 25rpx;
- height: 25rpx;
- margin-right: 10rpx;
- }
- .checkStatusText {
- font-size: 20rpx;
- font-family: SourceHanSansCN-Normal, SourceHanSansCN;
- font-weight: 400;
- color: #292C33;
- }
- }
- image {
- margin-right: 15rpx;
- width: 40rpx;
- height: 40rpx;
- }
- }
- }
- .children {
- display: flex;
- flex-direction: row;
- align-items: center;
- margin-top: 18.75rpx;
- .child {
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- flex: 1;
- border-right: 1px solid #DADEE6;
- text {
- width: 150rpx;
- font-weight: 500;
- text-align: center;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- &:last-child {
- font-size: 17.5rpx;
- line-height: 26.25rpx;
- color: #7A8599;
- text-align: center;
- font-weight: 400;
- }
- }
- &:last-child {
- border-right: 0;
- }
- }
- }
- }
- }
- }
- </style>
|