12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628 |
- <!-- 安全检查-安全隐患 -->
- <template>
- <view class="examine">
- <scroll-view scroll-x @scrolltolower="scrollGet" class="header">
- <view class="tabTitle_tow">
- <view class="tabTitle_tow_li" @tap="tabClickTow(item,index)" :key="index"
- v-for="(item,index) in tabTextTow">
- <view :class="{on:curTabTow==index}" class="tabTitle_tow_text">{{item.name}}</view>
- <view :class="{on:curTabTow==index}" class="tabTitle_tow_across"></view>
- </view>
- </view>
- </scroll-view>
- <scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
- <!-- 隐患检查 -->
- <view v-if="curTabIndex=='detail'">
- <view class="basics">
- <view class="basics_li">
- <text>学院:</text>
- <text>{{infoData.collegeName}}</text>
- </view>
- <view class="basics_li">
- <text>实验室:</text>
- <text>{{infoData.subjectName}}-{{infoData.roomNumber?infoData.roomNumber:''}}</text>
- </view>
- <view class="basics_li">
- <text>楼栋:</text>
- <text>{{infoData.buildName?infoData.buildName:'-'}}</text>
- </view>
- <view class="basics_li">
- <text>检查组织:</text>
- <text>{{infoData.checkType==1?'校园巡查':(infoData.checkType==2?'实验室自查':'')}}</text>
- </view>
- <view class="basics_li">
- <text>检查范围:</text>
- <text>{{infoData.checkRange==1?'全校':(infoData.checkRange==2?'学院':'实验室')}}</text>
- </view>
- <view class="basics_li" style="border:none;">
- <text>计划标题:</text>
- <text>{{infoData.title}}</text>
- </view>
- </view>
- <view class="basics">
- <view class="basics_li">
- <text>检查结果:</text>
- <text>{{infoData.checkResult==0?'不符合':(infoData.checkResult==1?'符合':'')}}</text>
- </view>
- <view class="basics_li">
- <text>整改期限:</text>
- <text>{{infoData.rectifyDeadline?infoData.rectifyDeadline:''}}</text>
- </view>
- <view class="basics_li">
- <text>整改通知:</text>
- <text style="color: #0183FA;"
- @click="rectifyInform">{{infoData.rectifyNotice == 1?'整改告知书':(infoData.rectifyNotice == 2?'整改通知书':'')}}</text>
- </view>
- <view class="basics_li">
- <text>检查者:</text>
- <text>{{infoData.checkUser}}</text>
- </view>
- <view class="basics_li" style="border:none;">
- <text>检查时间:</text>
- <text>{{infoData.checkTime}}</text>
- </view>
- </view>
- <!-- 综合检查 -->
- <view v-if="infoData.checkCategory==1" class="danger">
- <view class="danger_title">不符合项</view>
- <view class="grade">
- <text>隐患等级:</text>
- <text>{{infoData.checkHazardApplyDto.hazardLevel==2?'一般隐患':(infoData.checkHazardApplyDto.hazardLevel==1?'重大隐患':(infoData.checkHazardApplyDto.hazardLevel==3?'管理问题':''))}}</text>
- </view>
- <view class="project">
- <view class="project_t">检查项目:</view>
- <view class="project_b">{{infoData.checkHazardApplyDto.hazardCheckProStr}}</view>
- <view class="project_b2" v-if="infoData.checkHazardApplyDto.hazardCheckCount>0">
- 此检查项在当前实验室累计出现{{infoData.checkHazardApplyDto.hazardCheckCount}}次隐患</view>
- </view>
- <view class="project">
- <view class="project_t">检查要点:</view>
- <view class="project_b">{{infoData.checkHazardApplyDto.hazardCheckPoint}}</view>
- </view>
- <view class="project">
- <view class="project_t">隐患描述:</view>
- <view class="project_b">
- {{infoData.checkHazardApplyDto.hazardDescribe?infoData.checkHazardApplyDto.hazardDescribe:''}}
- </view>
- </view>
- <view class="picture">
- <view class="picture_t">隐患照片</view>
- <view class="picture_b" @click="lockImg(infoData.checkHazardApplyDto.uploadDtoList)">
- <img :src="baseUrl+imgItem.fileUrl"
- v-for="(imgItem,index) in infoData.checkHazardApplyDto.uploadDtoList" :key="index" />
- </view>
- </view>
- </view>
- <!-- 专项检查 -->
- <view v-if="infoData.checkCategory==2">
- <view class="inconformity_tow" @click="inconformityFun2()">
- {{infoData.checkHazardApplyDto.hazardName}}<img v-if="inconformityStatus2"
- src="@/pages_safetyExamine/images/icon_bfhx_xq.png" /><img v-if="!inconformityStatus2"
- src="@/pages_safetyExamine/images/icon_bfhx_sq.png" />
- </view>
- <view class="danger_border" v-if="!inconformityStatus2">
- <view class="ident">检查项目</view>
- <view class="danger special_danger">
- <view class="grade">
- <view class="sort">1</view>
- <text>第一项隐患</text>
- <viwe :class="infoData.checkHazardApplyDto.checkFlag==0?'noConform':'isConform'">
- {{infoData.checkHazardApplyDto.checkFlag==0?'不符合':'符合'}}
- </viwe>
- </view>
- <view class="small_items">{{infoData.checkHazardApplyDto.hazardCheckProStr}}</view>
- <view class="frequency" v-if="infoData.checkHazardApplyDto.hazardCheckCount>0">
- 此检查项在当前实验室累计出现{{infoData.checkHazardApplyDto.hazardCheckCount}}次隐患</view>
- <view class="grading">
- <text>隐患等级:</text>
- <text>{{infoData.checkHazardApplyDto.hazardLevel==2?'一般隐患':(infoData.checkHazardApplyDto.hazardLevel==1?'重大隐患':(infoData.checkHazardApplyDto.hazardLevel==3?'管理问题':''))}}</text>
- </view>
- <view class="project">
- <view class="project_t">隐患描述:</view>
- <view class="project_b">
- {{infoData.checkHazardApplyDto.hazardDescribe?infoData.checkHazardApplyDto.hazardDescribe:''}}
- </view>
- </view>
- <view class="picture">
- <view class="picture_t">隐患照片</view>
- <view class="picture_b" @click="lockImg(infoData.checkHazardApplyDto.uploadDtoList)">
- <img :src="baseUrl+imgItem.fileUrl"
- v-for="(imgItem,imgIndex) in infoData.checkHazardApplyDto.uploadDtoList" />
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view v-for="(item,index) in infoData.checkRectifyApplyList" :key="index" v-if="curTabIndex== index">
- <!-- 整改结果 -->
- <view v-if="item.applyFlag == 1" class="abarbeitung_result danger">
- <view class="grade">
- <text>整改结果:</text>
- <text
- style="color: #0183FA;">{{item.rectifyResult == 1?'已整改':(item.rectifyResult == 0?'暂无法整改':'')}}</text>
- </view>
- <view class="project">
- <view class="project_t">整改措施:</view>
- <view class="project_b">{{item.rectifyMeasure}}</view>
- </view>
- <view class="picture">
- <view class="picture_t">整改照片:</view>
- <view class="picture_b" @click="lockImg(item.uploadDtoList)">
- <img :src="baseUrl+imgItem.fileUrl" v-for="(imgItem,imgIndex) in item.uploadDtoList"
- :key="imgIndex">
- </view>
- </view>
- <view class="grade">
- <text>整改人:</text>
- <text>{{item.createName}}</text>
- </view>
- <view class="grade" style="border:none;">
- <text>整改时间:</text>
- <text>{{item.createTime}}</text>
- </view>
- </view>
- <!-- 复核结果 -->
- <view v-if="item.applyFlag == 2" class="review_result danger">
- <view class="audit">
- <text>审核结果:</text>
- <img v-if="item.examineResult == 0" src="@/pages_safetyExamine/images/icon_ywc.png" />
- <img v-if="item.examineResult == 1" src="@/pages_safetyExamine/images/icon_cg.png" />
- </view>
- <view class="project">
- <view class="project_t">审核意见:</view>
- <view class="project_b">{{item.examineOpinion}}</view>
- </view>
- <view class="grade">
- <text>审核人:</text>
- <text>{{item.reviewedName}}</text>
- </view>
- <view class="grade" style="border:none;">
- <text>审核时间:</text>
- <text>{{item.reviewedTime}}</text>
- </view>
- </view>
- </view>
- <!-- 待整改 -->
- <view v-if="rectifyStatus==2 && curTabIndex=='add'">
- <view class="await">
- <view class="result">
- <view class="result_l">整改结果</view>
- <view class="result_r">
- <view v-for="(item,index) in resultArray" :key="index" @click="tabClick(index)">
- <text :class="resultIndex==index?'checked':'result_r_l' "></text>
- <text class="result_r_r">{{item}}</text>
- </view>
- </view>
- </view>
- <view class="describe">
- <view class="describe_l">{{form.rectifyResult==1?'整改措施:':'原因描述:'}}</view>
- <textarea class="describe_r" type="text" v-model="form.rectifyMeasure" maxlength="50"
- :placeholder="form.rectifyResult==1?'请输入整改描述:':'请输入原因描述:'"
- placeholder-style="font-size:28rpx;color:#999;"></textarea>
- </view>
- <view class="check-for-img-max-box">
- <view class="left-title-p">隐患照片(最多上传5张):</view>
- <view class="right-img-box">
- <view class="img-box" v-for="(imgUrl,imgIndex) in form.uploadDtoList" :key="imgIndex">
- <img class="img-data" :src="baseUrl+imgUrl.fileUrl">
- <img class="position-img" src="@/pages_safetyExamine/images/icon_ssp_closure.png"
- @click="delImg(imgIndex)">
- </view>
- <img class="add-button" src="@/pages_safetyExamine/images/icon_07.png"
- @click="selectImage()" v-if="form.uploadDtoList.length<5">
- </view>
- </view>
- </view>
- </view>
- <!-- 待复核 -->
- <view v-if="rectifyStatus==3 && curTabIndex=='check'" class="review">
- <view class="describe">
- <view class="describe_l">审核意见:</view>
- <textarea class="describe_r" type="text" v-model="form.examineOpinion" maxlength="50"
- placeholder="请输入审核意见" placeholder-style="font-size:28rpx;color:#999;"></textarea>
- </view>
- <view class="quick">
- <view class="quick_l">审核意见快捷输入</view>
- <view class="quick_r">
- <text @click="quickSelect(index)" :class="item.type?'quick_B':'quick_A'"
- v-for="(item,index) in quickArray" :key="index">{{item.name}}</text>
- </view>
- </view>
- </view>
- </scroll-view>
- <view class="bottom_btn" @click="submitForm('rectify')" v-if="rectifyStatus==2 && rectifyGentle">提交</view>
- <view class="bottom_btn_tow" v-if="rectifyStatus==3 && applyGentle">
- <text @click="submitForm('reject')">驳回</text>
- <text @click="submitForm('pass')">通过</text>
- </view>
- </view>
- </template>
- <script>
- import {
- config
- } from '@/api/request/config.js'
- import {
- getHazardById,
- checkHazardAdd
- } from '@/pages_safetyExamine/api/index.js'
- export default {
- name: "rectifyList",
- components: {
- },
- data() {
- return {
- baseUrl: config.base_url,
- id: '',
- pageType: 0,
- //列表请求参数
- getData: {
- page: 1,
- pageSize: 20,
- },
- tabTextTow: [],
- curTabTow: 0,
- curTabIndex: 'detail', //随顶部按钮点击变化索引
- resultIndex: 0,
- resultArray: ['已整改', '暂无法整改'],
- form: {
- checkHazardId: '', // 隐患id
- rectifyType: '', // 整改类型:1是院校巡查,2是自查
- rectifyResult: '1', //1是已整改,0是暂无法整改
- rectifyMeasure: '', //整改措施
- uploadDtoList: [],
- //复核---------------
- id: '',
- examineResult: '', //审核结果1是通过,0是驳回
- examineOpinion: '',
- },
- quickIndex: 0,
- quickArray: [{
- name: '复核驳回',
- type: false
- }, {
- name: '驳回再整改',
- type: false
- }, {
- name: '请补充材料',
- type: false
- }, {
- name: '请补充描述',
- type: false
- }, {
- name: '未解决',
- type: false
- }],
- infoData: {},
- item: {},
- rectifyStatus: '', //1已完成 2待整改 3待复核 4 暂无法整改
- checkType: null,
- applyGentle: false, //待复核-有没有审核权限
- rectifyGentle: false, //待整改-有没有整改权限
- inconformityStatus2: false,
- }
- },
- onLoad(option) {
- if (option.item) {
- this.item = JSON.parse(decodeURIComponent(option.item));
- this.id = this.item.id
- this.rectifyStatus = this.item.rectifyStatus;
- this.getHazardById()
- }
- },
- onShow() {
- },
- mounted() {
- },
- methods: {
- //整改结果
- tabClick(index) {
- this.resultIndex = index;
- if (index == 0) {
- this.form.rectifyResult = 1
- } else if (index == 1) {
- this.form.rectifyResult = 0
- }
- },
- //顶部tab点击
- tabClickTow(item, index) {
- this.curTabTow = index;
- this.pageType = index;
- if (item.type == 'detail' || item.type == 'add' || item.type == 'check') {
- this.curTabIndex = item.type
- } else {
- this.curTabIndex = index - 1;
- }
- },
- //专项隐患项收起展开
- inconformityFun2() {
- this.inconformityStatus2 = !this.inconformityStatus2;
- },
- //详情
- async getHazardById() {
- let self = this;
- const {
- data
- } = await getHazardById({
- id: this.id
- });
- if (data.code == 200) {
- this.infoData = data.data
- this.form.checkHazardId = data.data.checkHazardApplyDto.id;
- this.form.rectifyType = data.data.checkType;
- if (data.data.checkType == 1) {
- uni.setNavigationBarTitle({
- title: '校院巡查隐患'
- })
- } else if (data.data.checkType == 2) {
- uni.setNavigationBarTitle({
- title: '实验室自查隐患'
- })
- }
- this.applyGentle = data.data.checkHazardApplyDto.applyGentle
- this.rectifyGentle = data.data.checkHazardApplyDto.rectifyGentle
- if (data.data.checkRectifyApplyList.length > 0) {
- for (let i = 0; i < data.data.checkRectifyApplyList.length; i++) {
- this.form.id = data.data.checkRectifyApplyList[i].id;
- }
- }
- this.checkType = data.data.checkType; //检查组织 1校院巡查 2实验室自查
- if (data.data.checkRectifyApplyList[0]) {
- this.tabTextTow.push({
- 'type': 'detail',
- 'name': '隐患检查'
- })
- for (let i = 0; i < data.data.checkRectifyApplyList.length; i++) {
- if (i == 0) {
- this.tabTextTow.push({
- 'type': 'item',
- 'name': '隐患整改'
- })
- } else if (i == 1) {
- this.tabTextTow.push({
- 'type': 'item',
- 'name': '整改复核'
- })
- } else {
- let nameLeft = this.frequencyCalculation(i, data.data.checkRectifyApplyList[i]
- .applyFlag);
- let nameRight = data.data.checkRectifyApplyList[i].applyFlag == 1 ? '整改' : '复核';
- this.tabTextTow.push({
- 'type': 'item',
- 'name': nameLeft + nameRight
- })
- }
- }
- if (this.rectifyStatus == 3 && this.applyGentle) {
- this.tabTextTow.push({
- 'type': 'check',
- 'name': '整改复核'
- })
- } else if (this.rectifyStatus == 2 && this.rectifyGentle) {
- this.tabTextTow.push({
- 'type': 'add',
- 'name': '隐患整改'
- })
- }
- } else {
- if (this.rectifyStatus == 2 && this.rectifyGentle) { //有整改权限
- this.tabTextTow = [{
- 'type': 'detail',
- 'name': '隐患检查'
- }, {
- 'type': 'add',
- 'name': '隐患整改'
- }]
- } else {
- this.tabTextTow = [{
- 'type': 'detail',
- 'name': '隐患检查'
- }]
- }
- }
- }
- },
- //多次名称匹配
- frequencyCalculation(length, type) {
- let textList = [{
- value: '二次',
- key: '2'
- }, {
- value: '三次',
- key: '3'
- }, {
- value: '四次',
- key: '4'
- }, {
- value: '五次',
- key: '5'
- }, {
- value: '六次',
- key: '6'
- }, {
- value: '七次',
- key: '7'
- },
- {
- value: '八次',
- key: '8'
- }, {
- value: '九次',
- key: '9'
- }, {
- value: '十次',
- key: '10'
- }
- ]
- let num = type === 2 ? Math.ceil(length / 2) : Math.floor(length / 2)
- if (type == 1) {
- num++
- }
- if (num > 10) {
- return '再次'
- } else {
- for (let i = 0; i < textList.length; i++) {
- if (num == textList[i].key) {
- return textList[i].value
- }
- }
- }
- },
- //滚动事件
- scrollGet() {},
- handleClick(doType) {
- let self = this;
- if (doType == 'subBtn') { //
- }
- },
- //查看图片
- lockImg(list) {
- if (!list[0]) {
- return
- }
- let urlList = [];
- for (let i = 0; i < list.length; i++) {
- urlList.push(this.baseUrl + list[i].fileUrl)
- }
- wx.previewImage({
- urls: urlList, //需要预览的图片http链接列表,多张的时候,url直接写在后面就行了
- current: '', // 当前显示图片的http链接,默认是第一个
- success: function(res) {},
- fail: function(res) {},
- complete: function(res) {},
- })
- },
- //快捷选择
- quickSelect(index) {
- this.quickArray[index].type = !this.quickArray[index].type
- this.form.examineOpinion = this.quickArray[index].name
- let self = this;
- if (self.quickArray[index].type == true) {
- self.quickArray.forEach(function(item2) {
- if (item2.name == self.quickArray[index].name) {
- item2.type = true
- } else {
- item2.type = false
- }
- })
- } else {
- this.form.examineOpinion = '';
- }
- },
- // 图片上传
- selectImage(item) {
- let self = this;
- if (this.form.uploadDtoList.length > 4) {
- uni.showToast({
- title: '最多上传5张图片',
- icon: "none",
- mask: true,
- duration: 2000
- });
- return
- }
- wx.chooseImage({
- count: 1,
- sizeType: ["original", "compressed"],
- sourceType: ["album", "camera"],
- success: function(res) {
- let tempFilePaths = res.tempFilePaths[0];
- self.uploadImg(tempFilePaths);
- }
- });
- },
- async uploadImg(tempFilePaths) {
- var self = this;
- uni.showLoading({
- title: '上传中',
- mask: true
- });
- uni.uploadFile({
- url: config.base_url + '/system/file/upload', //仅为示例,非真实的接口地址
- header: {
- 'Authorization': uni.getStorageSync('token')
- },
- filePath: tempFilePaths,
- name: 'file',
- formData: {
- 'user': 'test'
- },
- success: (uploadFileRes) => {
- let res = JSON.parse(uploadFileRes.data);
- if (res.code == 200) {
- self.form.uploadDtoList.push({
- 'fileUrl': res.data.url,
- 'fileName': res.data.name
- });
- } else {
- uni.showToast({
- title: res.msg,
- icon: "none",
- mask: true,
- duration: 2000
- });
- }
- },
- fail: err => {},
- complete: () => {
- uni.hideLoading()
- }
- });
- },
- //删除图片
- delImg(minIndex) {
- this.form.uploadDtoList.splice(minIndex, 1);
- this.$forceUpdate();
- },
- //整改通知
- rectifyInform() { //rectifyNotice 整改通知(1整改告知书 2整改通知书)
- if (this.infoData.rectifyNotice == 1) { //1整改告知书
- this.genReport(this.infoData.id)
- } else if (this.infoData.rectifyNotice == 2) { //2整改通知书
- this.genNotice(this.infoData.id)
- }
- },
- //整改报告
- rectifyReport() {
- uni.showLoading({
- title: '下载中'
- });
- wx.downloadFile({
- url: config.base_url + '/zd-security/checkRectify/genReport/?id='+this.infoData.id+'&fileUrl='+uni.getStorageSync('fileBrowseEnvironment'),
- header: {
- Authorization: uni.getStorageSync('token')
- },
- success: function(res) {
- const fileManager = wx.getFileSystemManager()
- const filePath = wx.env.USER_DATA_PATH + '/(整改报告).docx'
- fileManager.saveFile({
- tempFilePath: res.tempFilePath,
- filePath,
- success: () => {
- uni.hideLoading();
- wx.openDocument({
- filePath: filePath,
- showMenu: true,
- fileType: 'docx'
- })
- },
- fail: function(res) {
- uni.hideLoading();
- uni.showToast({
- title: '下载失败',
- icon: "none",
- mask: true,
- duration: 2000
- });
- }
- })
- },
- fail: function(res) {
- uni.hideLoading();
- uni.showToast({
- title: '下载失败',
- icon: "none",
- mask: true,
- duration: 2000
- });
- }
- })
- },
- //整改通知书
- genNotice(id) {
- uni.showLoading({
- title: '下载中'
- });
- wx.downloadFile({
- url: config.base_url + '/zd-security/checkManage/getRectifyAdviceNote/?checkMangeId='+this.infoData.id+'&fileUrl='+uni.getStorageSync('fileBrowseEnvironment'),
- header: {
- Authorization: uni.getStorageSync('token')
- },
- success: function(res) {
- const fileManager = wx.getFileSystemManager()
- const filePath = wx.env.USER_DATA_PATH + '/(整改通知书).docx'
- fileManager.saveFile({
- tempFilePath: res.tempFilePath,
- filePath,
- success: () => {
- uni.hideLoading();
- wx.openDocument({
- filePath: filePath,
- showMenu: true,
- fileType: 'docx'
- })
- },
- fail: function(res) {
- uni.hideLoading();
- uni.showToast({
- title: '下载失败',
- icon: "none",
- mask: true,
- duration: 2000
- });
- }
- })
- },
- fail: function(res) {
- uni.hideLoading();
- uni.showToast({
- title: '下载失败',
- icon: "none",
- mask: true,
- duration: 2000
- });
- }
- })
- },
- //整改告知书
- genReport(id) {
- uni.showLoading({
- title: '下载中'
- });
- wx.downloadFile({
- url: config.base_url + '/zd-security/checkManage/getRectifyNotification/?checkMangeId='+this.infoData.id+'&fileUrl='+uni.getStorageSync('fileBrowseEnvironment'),
- header: {
- Authorization: uni.getStorageSync('token')
- },
- success: function(res) {
- const fileManager = wx.getFileSystemManager()
- const filePath = wx.env.USER_DATA_PATH + '/整改报告.docx'
- fileManager.saveFile({
- tempFilePath: res.tempFilePath,
- filePath,
- success: () => {
- uni.hideLoading();
- wx.openDocument({
- filePath: filePath,
- showMenu: true,
- fileType: 'docx'
- })
- },
- fail: function(res) {
- uni.hideLoading();
- uni.showToast({
- title: '下载失败',
- icon: "none",
- mask: true,
- duration: 2000
- });
- }
- })
- },
- fail: function(res) {
- uni.hideLoading();
- uni.showToast({
- title: '下载失败',
- icon: "none",
- mask: true,
- duration: 2000
- });
- }
- })
- },
- async submitForm(doType) {
- let self = this;
- let obj = {};
- if (doType == 'rectify') { //整改
- if (!this.form.rectifyMeasure) {
- if (this.form.rectifyResult == 1) {
- uni.showToast({
- title: '请输入整改措施!',
- icon: "none",
- mask: true,
- duration: 2000
- });
- } else {
- uni.showToast({
- title: '请输入原因描述!',
- icon: "none",
- mask: true,
- duration: 2000
- });
- }
- return
- }
- if (this.form.uploadDtoList.length == 0) {
- uni.showToast({
- title: '请上传照片!',
- icon: "none",
- mask: true,
- duration: 2000
- });
- return
- }
- obj.checkHazardId = this.form.checkHazardId;
- obj.rectifyType = this.form.rectifyType;
- obj.rectifyResult = this.form.rectifyResult;
- obj.rectifyMeasure = this.form.rectifyMeasure;
- obj.uploadDtoList = this.form.uploadDtoList;
- } else if (doType == 'reject') { //复核 驳回
- obj.id = this.form.id;
- obj.examineResult = 0;
- if (!this.form.examineOpinion) {
- uni.showToast({
- title: '请输入审核意见!',
- icon: "none",
- mask: true,
- duration: 2000
- });
- return
- }
- obj.examineOpinion = this.form.examineOpinion;
- } else if (doType == 'pass') { //复核 通过
- obj.id = this.form.id;
- obj.examineResult = 1;
- if (!this.form.examineOpinion) {
- uni.showToast({
- title: '请输入审核意见!',
- icon: "none",
- mask: true,
- duration: 2000
- });
- return
- }
- obj.examineOpinion = this.form.examineOpinion;
- }
- const {
- data
- } = await checkHazardAdd(obj);
- if (data.code == 200) {
- uni.redirectTo({
- url: '/pages_safetyExamine/views/dangerManage/dangerList?pageType=' + this.checkType
- });
- uni.showToast({
- title: '提交成功',
- icon: "none",
- mask: true,
- duration: 2000
- });
- }
- },
- }
- }
- </script>
- <style lang="stylus" scoped>
- .examine {
- height: 100%;
- display flex;
- // padding: 0 30rpx;
- // box-sizing: border-box;
- padding-bottom: 120rpx;
- box-sizing: border-box;
- .info-max-box {
- flex: 1;
- overflow: scroll;
- padding: 120rpx 0rpx 0;
- box-sizing: border-box;
- }
- /* 隐患检查 */
- .header {
- width: 750rpx;
- height: 100rpx;
- position: fixed;
- top: 0rpx;
- z-index: 100;
- background: #fff;
- .tabTitle_tow {
- height: 100rpx;
- white-space: nowrap;
- display: inline-flex;
- .tabTitle_tow_li {
- position: relative;
- width: 152rpx;
- height: 100rpx;
- text-align center;
- padding-top: 26rpx;
- box-sizing: border-box;
- .tabTitle_tow_text {
- display: inline-block;
- font-size: 30rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #333333;
- line-height: 46rpx;
- position: relative;
- &.on {
- color: #0183FA;
- }
- }
- .tabTitle_tow_across {
- width: 50rpx;
- height: 4rpx;
- background: #0183FA;
- border-radius: 2rpx;
- margin-left: 33%;
- display none;
- &.on {
- display block;
- }
- }
- }
- }
- }
- .basics {
- width: 690rpx;
- background: #FFFFFF;
- border-radius: 20rpx;
- padding: 30rpx 30rpx 32rpx;
- box-sizing: border-box;
- margin: 20rpx 30rpx;
- .basics_li {
- height: 80rpx;
- display: flex;
- justify-content: space-between;
- border-bottom: 1rpx solid #D8D8D8;
- >text:nth-of-type(1) {
- font-size: 28rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #666666;
- line-height: 80rpx;
- width: 140rpx;
- }
- >text:nth-of-type(2) {
- flex: 1;
- font-size: 28rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #333333;
- line-height: 80rpx;
- text-align: right;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- }
- }
- .attachment {
- width: 690rpx;
- background: #FFFFFF;
- border-radius: 20rpx;
- margin: 20rpx 30rpx 0;
- padding-bottom: 32rpx;
- box-sizing: border-box;
- .attachment_t {
- border-bottom: 1rpx solid #D8D8D8;
- >text:nth-of-type(1) {
- font-size: 30rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #333333;
- line-height: 110rpx;
- margin-left: 28rpx;
- }
- >text:nth-of-type(2) {
- font-size: 30rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #999999;
- line-height: 110rpx;
- margin-left: 24rpx;
- }
- }
- .attachment_li {
- height: 40rpx;
- display: flex;
- justify-content: flex-start;
- align-items: center;
- margin-top: 32rpx;
- >img {
- width: 30rpx;
- height: 26rpx;
- margin-right: 20rpx;
- margin-left: 50rpx;
- }
- >text {
- flex: 1;
- font-size: 28rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #0183FA;
- line-height: 40rpx;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- .attachment_li_del {
- width: 30rpx;
- height: 30rpx;
- }
- }
- }
- .danger {
- width: 690rpx;
- background: #FFFFFF;
- border-radius: 20rpx;
- padding: 30rpx 30rpx 32rpx;
- box-sizing: border-box;
- margin: 20rpx 30rpx;
- .danger_title {
- font-size: 30rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #333333;
- line-height: 80rpx;
- border-bottom: 1rpx solid #D8D8D8;
- }
- .grade {
- height: 80rpx;
- display: flex;
- justify-content: space-between;
- border-bottom: 1rpx solid #D8D8D8;
- >text:nth-of-type(1) {
- font-size: 28rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #666666;
- line-height: 80rpx;
- width: 140rpx;
- }
- >text:nth-of-type(2) {
- flex: 1;
- font-size: 28rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #333333;
- line-height: 80rpx;
- text-align: right;
- }
- }
- .project {
- .project_t {
- font-size: 30rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #333333;
- line-height: 80rpx;
- }
- .project_b {
- min-height: 158rpx;
- font-size: 28rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #333333;
- line-height: 40rpx;
- padding: 20rpx 14rpx;
- box-sizing: border-box;
- background: #F5F5F5;
- border-radius: 20rpx 20rpx 20rpx 20rpx;
- }
- .project_b2 {
- font-size: 26rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #666666;
- line-height: 26rpx;
- margin-top: 14rpx;
- text-align: right;
- }
- }
- .picture {
- .picture_t {
- font-size: 30rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #333333;
- line-height: 80rpx;
- }
- .picture_b {
- display: flex;
- justify-content: flex-start;
- flex-wrap: wrap;
- >img {
- width: 200rpx;
- height: 200rpx;
- border-radius: 10rpx 10rpx 10rpx 10rpx;
- margin-right: 14rpx;
- margin-bottom: 10rpx;
- }
- >img:nth-of-type(3n+3) {
- margin-right: 0rpx;
- }
- }
- }
- }
- /* 待整改 */
- .await {
- width: 690rpx;
- background: #FFFFFF;
- border-radius: 20rpx;
- padding: 30rpx 30rpx 32rpx;
- box-sizing: border-box;
- margin: 20rpx 30rpx;
- /* 整改结果 */
- .result {
- display: flex;
- justify-content: flex-start;
- border-bottom: 1rpx solid #D8D8D8;
- .result_l {
- width: 146rpx;
- text-align: left;
- font-size: 30rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #333333;
- line-height: 80rpx;
- }
- .result_r {
- width: 486rpx;
- height: 80rpx;
- padding-left: 20rpx;
- box-sizing: border-box;
- display: flex;
- justify-content: flex-end;
- align-items: center;
- >view {
- display: flex;
- justify-content: flex-start;
- align-items: center;
- margin-right: 24rpx;
- .result_r_l {
- display: inline-block;
- width: 30rpx;
- height: 30rpx;
- border-radius: 50%;
- border: 1rpx solid #E0E0E0;
- margin-right: 14rpx;
- }
- .result_r_r {
- font-size: 30rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #333333;
- line-height: 80rpx;
- }
- .checked {
- display: inline-block;
- width: 30rpx;
- height: 30rpx;
- border-radius: 50%;
- border: 1rpx solid #0183FA;
- margin-right: 14rpx;
- position: relative;
- }
- .checked::after {
- content: '';
- position: absolute;
- top: 5rpx;
- left: 5rpx;
- width: 20rpx;
- height: 20rpx;
- border-radius: 50%;
- background: #0183FA;
- }
- }
- }
- }
- /* 原因描述 */
- .describe {
- .describe_l {
- width: 158rpx;
- text-align: left;
- font-size: 30rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #333333;
- line-height: 80rpx;
- }
- .describe_r {
- width: 630rpx;
- height: 158rpx;
- border-radius: 20rpx 20rpx 20rpx 20rpx;
- opacity: 1;
- border: 1rpx solid #E0E0E0;
- padding: 20rpx 14rpx;
- box-sizing: border-box;
- font-size: 30rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #333333;
- line-height: 34rpx;
- }
- }
- /* 上传照片 */
- .check-for-img-max-box {
- .left-title-p {
- width: 100%;
- text-align: left;
- font-size: 30rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #333333;
- line-height: 80rpx;
- }
- .right-img-box {
- .img-box {
- display inline-block;
- height: 200rpx;
- width: 200rpx;
- position relative;
- margin: 0 14rpx 20rpx 0;
- border-radius 10rpx;
- overflow hidden;
- .img-data {
- height: 200rpx;
- width: 200rpx;
- }
- .position-img {
- position absolute;
- right: 0;
- top: 0;
- width: 36rpx;
- height: 36rpx;
- }
- }
- .img-box:nth-of-type(3n+3) {
- margin-right: 0rpx;
- }
- .add-button {
- margin: 0 0rpx 20rpx 0;
- border-radius 10rpx;
- overflow hidden;
- display inline-block;
- height: 200rpx;
- width: 200rpx;
- }
- }
- }
- }
- /* 待复核 */
- .review {
- width: 690rpx;
- background: #FFFFFF;
- border-radius: 20rpx;
- padding: 30rpx 30rpx 32rpx;
- box-sizing: border-box;
- margin: 20rpx 30rpx;
- /* 审核意见 */
- .describe {
- .describe_l {
- width: 158rpx;
- text-align: left;
- font-size: 30rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #666;
- line-height: 80rpx;
- }
- .describe_r {
- width: 630rpx;
- height: 158rpx;
- border-radius: 20rpx 20rpx 20rpx 20rpx;
- opacity: 1;
- border: 1rpx solid #E0E0E0;
- padding: 20rpx 14rpx;
- box-sizing: border-box;
- font-size: 30rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #333333;
- line-height: 34rpx;
- }
- }
- /* 快捷输入 */
- .quick {
- .quick_l {
- font-size: 30rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #666666;
- line-height: 80rpx;
- }
- .quick_r {
- >text {
- display: inline-block;
- font-size: 30rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- line-height: 60rpx;
- padding: 0 24rpx;
- box-sizing: border-box;
- border-radius: 10rpx 10rpx 10rpx 10rpx;
- margin-right: 20rpx;
- margin-bottom: 30rpx;
- }
- .quick_A {
- color: #666666;
- background: #F5F5F5;
- }
- .quick_B {
- color: #0183FA;
- background: rgba(1, 131, 250, 0.2);
- }
- }
- }
- }
- /* 暂无法整改 */
- .incapable {
- width: 690rpx;
- background: #FFFFFF;
- border-radius: 20rpx;
- padding: 30rpx 30rpx 32rpx;
- box-sizing: border-box;
- margin: 20rpx 30rpx;
- }
- /* 整改结果 */
- .abarbeitung_result {
- width: 690rpx;
- background: #FFFFFF;
- border-radius: 20rpx;
- padding: 30rpx 30rpx 32rpx;
- box-sizing: border-box;
- margin: 20rpx 30rpx;
- }
- /* 审核结果 */
- .review_result {
- width: 690rpx;
- background: #FFFFFF;
- border-radius: 20rpx;
- padding: 30rpx 30rpx 32rpx;
- box-sizing: border-box;
- margin: 20rpx 30rpx;
- .audit {
- height: 80rpx;
- display: flex;
- justify-content: space-between;
- border-bottom: 1rpx solid #D8D8D8;
- >text:nth-of-type(1) {
- font-size: 28rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #666666;
- line-height: 80rpx;
- width: 140rpx;
- }
- >img {
- width: 80rpx;
- height: 70rpx;
- }
- }
- }
- /* 专项检查 */
- .inconformity_tow {
- width: 690rpx;
- height: 100rpx;
- background: #FFFFFF;
- border-radius: 20rpx 20rpx 20rpx 20rpx;
- margin: 20rpx 30rpx;
- font-size: 30rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #333333;
- line-height: 100rpx;
- text-align: center;
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 0 30rpx;
- box-sizing: border-box;
- >img {
- width: 30rpx;
- height: 26rpx;
- margin-left: 20rpx;
- }
- }
- .danger_border {
- border-radius: 20rpx;
- width: 690rpx;
- background: #FFFFFF;
- margin: 0rpx 30rpx 20rpx;
- overflow: hidden;
- }
- .special_danger {
- width: auto;
- background: #FFFFFF;
- padding: 0;
- box-sizing: border-box;
- margin: 0 30rpx;
- border-radius: 0;
- .grade {
- height: 80rpx;
- display: flex;
- justify-content: flex-start;
- border-bottom: 1rpx solid #D8D8D8;
- position: relative;
- background: #F5F5F5;
- border-radius: 20rpx 20rpx 0rpx 0rpx;
- .sort {
- width: 40rpx;
- height: 40rpx;
- background: #0183FA;
- border-radius: 20rpx 0rpx 10rpx 0rpx;
- font-size: 30rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #FFFFFF;
- line-height: 40rpx;
- text-align: center;
- position: absolute;
- left: 0;
- top: 0;
- }
- .isConform {
- width: 100rpx;
- height: 40rpx;
- font-size: 24rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #0183FA;
- line-height: 36rpx;
- background: #C4DEF6;
- text-align: center;
- border-radius: 20rpx;
- margin-left: 12rpx;
- margin-top: 20rpx;
- }
- .noConform {
- width: 100rpx;
- height: 40rpx;
- font-size: 24rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #FF0000;
- line-height: 36rpx;
- background: #F7C4C4;
- text-align: center;
- border-radius: 20rpx;
- margin-left: 12rpx;
- margin-top: 20rpx;
- }
- >text:nth-of-type(1) {
- font-size: 28rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #666666;
- line-height: 80rpx;
- width: 140rpx;
- margin-left: 66rpx;
- }
- >text:nth-of-type(2) {
- flex: 1;
- font-size: 28rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #333333;
- line-height: 80rpx;
- text-align: right;
- margin-right: 30rpx;
- }
- }
- .frequency {
- font-size: 26rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #333;
- line-height: 26rpx;
- margin-top: 14rpx;
- text-align: right;
- margin-bottom: 14rpx;
- }
- .grading {
- height: 80rpx;
- display: flex;
- justify-content: space-between;
- >text:nth-of-type(1) {
- font-size: 28rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #666666;
- line-height: 80rpx;
- width: 140rpx;
- }
- >text:nth-of-type(2) {
- flex: 1;
- font-size: 28rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #333333;
- line-height: 80rpx;
- text-align: left;
- background: #F5F5F5;
- border-radius: 10rpx 10rpx 10rpx 10rpx;
- padding-left: 20rpx;
- box-sizing: border-box;
- }
- }
- }
- .small_items {
- min-height: 158rpx;
- font-size: 28rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #333333;
- line-height: 40rpx;
- padding: 20rpx 14rpx;
- box-sizing: border-box;
- border-radius: 0rpx 0rpx 20rpx 20rpx;
- opacity: 1;
- border: 1rpx solid #E0E0E0;
- border-top: none;
- }
- .ident {
- font-size: 30rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #666666;
- line-height: 42rpx;
- margin: 34rpx 30rpx;
- }
- .bottom_btn {
- position: fixed;
- bottom: 26rpx;
- left: 30rpx;
- font-size: 30rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #FFFFFF;
- line-height: 90rpx;
- width: 690rpx;
- height: 90rpx;
- background: #0183FA;
- border-radius: 20rpx;
- text-align: center;
- }
- .bottom_btn_tow {
- display: flex;
- justify-content: center;
- position: fixed;
- bottom: 26rpx;
- left: 30rpx;
- width: 690rpx;
- height: 90rpx;
- >text {
- flex: 1;
- display: inline-block;
- font-size: 30rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 400;
- color: #FFFFFF;
- line-height: 90rpx;
- text-align: center
- }
- >text:nth-of-type(1) {
- background: #FA8201;
- border-radius: 45rpx 0rpx 0rpx 45rpx;
- }
- >text:nth-of-type(2) {
- background: #0183FA;
- border-radius: 0rpx 45rpx 45rpx 0rpx;
- }
- }
- }
- </style>
|