123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224 |
- <!-- 整改详情 -->
- <template>
- <view id="rectifyDetails">
- <view class="info-max-page" v-if="pageType == 1">
- <!-- <view class="position-button" v-if="buttonArrayType != 4">
- <picker @change="buttonChange" :value="buttonIndex" :range="buttonArray">查看报告</picker>
- </view> -->
- <view class="top-info-box">
- <view class="top-min-info-box">
- <view>整改类型:</view>
- <view>{{newData.zgType == 0?'一般整改':'重大整改'}}</view>
- </view>
- <view class="top-min-info-box">
- <view>实验室名称:</view>
- <view>{{newData.laboratoryName}}</view>
- </view>
- <view class="top-min-info-box">
- <view>房间号:</view>
- <view>{{newData.fjNumber}}</view>
- </view>
- <view class="top-min-info-box">
- <view>所属实验楼:</view>
- <view>{{newData.buildingName}}</view>
- </view>
- <view class="top-min-info-box">
- <view>实验室负责人:</view>
- <view>{{newData.fzrName}}</view>
- </view>
- <view class="top-min-info-box">
- <view>联系方式:</view>
- <view>{{newData.fzrLxfs}}</view>
- </view>
- <view class="top-min-info-box">
- <view>检查单位:</view>
- <view>{{newData.jcDwName}}</view>
- </view>
- <view class="top-min-info-box">
- <view>检查时间:</view>
- <view>{{newData.createTime}}</view>
- </view>
- <view class="top-min-info-box">
- <view>整改截止时间: </view>
- <view>{{newData.zgjzTime}}</view>
- </view>
- <view class="top-min-info-box" v-if="details.spStatus != 0">
- <view>整改确认时间: </view>
- <view>{{details.zgTime}}</view>
- </view>
- <view class="top-min-info-box" v-if="details.spStatus == 2">
- <view>整改驳回时间: </view>
- <view>{{details.spTime}}</view>
- </view>
- <view class="top-min-info-box" v-if="details.spStatus == 4">
- <view>整改完成时间: </view>
- <view>{{details.zgTime}}</view>
- </view>
- <view class="top-info-button" @click="infoClickButton">
- <view>{{showType?"收起详情":"查看详情"}}</view>
- <img v-if="showType" src="@/images/Version2.2/icon_aqjc_sq.png">
- <img v-if="!showType" src="@/images/Version2.2/icon_aqjc_sq_two.png">
- </view>
- </view>
- <view class="bottom-info-box" v-show="showType">
- <view class="bottom-info-title-box" v-if="details.spStatus==0">
- <img src="@/images/Version2.2/icon_aqjc_czwt.png">
- <view>存在隐患</view>
- </view>
- <view class="bottom-info-title-box" v-if="details.spStatus != 0">
- <img src="@/images/Version2.2/icon_aqjc_zgxx.png">
- <view>整改信息</view>
- </view>
- <!-- <view class="bottom-info-text-box" v-if="details.spStatus==4">
- <view>整改结果:</view>
- <view>{{newData.zgJg}}</view>
- </view> -->
- <view class="bottom-info-text-box" v-if="details.spStatus==2">
- <view>驳回原因:</view>
- <view>{{details.spMs}}</view>
- </view>
- <view class="rectified-max-box">
- <view class="rectified-for-box" v-if="details.isZg != 1 && details.spStatus!=2">
- <!-- <view class="rectified-for-position-index">{{index+1}}</view> -->
- <img v-if="details.spStatus == 4" class="rectified-for-position-img" src="@/images/Version2.2/icon_bg_ywc.png">
- <view class="rectified-for-title">{{details.jcxName}}</view>
- <view class="rectified-for-name" v-if="details.isLingshi == 1">临时检查项</view>
- <view class="rectified-for-name" v-if="details.isLingshi == 0">{{details.jcxSstkMs}}</view>
- <view class="rectified-for-text-max-box">
- <view class="rectified-for-text-box">
- <view>隐患描述:</view>
- <view>{{details.yhMs}}</view>
- </view>
- <!-- <view class="rectified-for-text-box" v-if="details.isZg == 0 && newData.zgType == 0">
- <view>整改描述:</view>
- <view>{{details.zgMs}}</view>
- </view> -->
- <!-- <view class="rectified-for-text-box" v-if="details.isZg == 0 && newData.zgType == 1">
- <view>原因分析:</view>
- <view>{{details.zgYyfx}}</view>
- </view>
- <view class="rectified-for-text-box" v-if="details.isZg == 0 && newData.zgType == 1">
- <view>整改措施:</view>
- <view>{{details.zgCs}}</view>
- </view> -->
- <view class="rectified-for-text-box" v-if="details.isZg == 1">
- <view>证明信息:</view>
- <view>{{details.zmClMs}}</view>
- </view>
- </view>
- <view class="rectified-for-img-max-box">
- <view class="rectify_front">
- <view class="rectify_front_t">整改前照片:</view>
- <view class="rectify_front_b" @click="lockImg(details.yhImg)">
- <img :src="itemUrl" v-for="(itemUrl,indexTwo) in details.yhImg" :key="indexTwo">
- </view>
- </view>
- <!-- 循环复核信息 -->
- <view v-for="(item2,index2) in details.detailslogList" :key="index2" style="border-bottom: 1px dotted #E0E0E0;">
- <view class="top-info-box rectify_info">
- <view class="top-min-info-box">
- <view>整改时间:</view>
- <view>{{item2.createTime}}</view>
- </view>
- <view class="top-min-info-box">
- <view>整改人:</view>
- <view>{{item2.zgUserName}}</view>
- </view>
- <view class="top-min-info-box">
- <view>整改描述:</view>
- <view>{{item2.zgMs}}</view>
- </view>
- </view>
- <view class="rectify_later">
- <view class="rectify_later_t">整改后照片:</view>
- <view class="rectify_later_b" @click="lockImg(item2.yhZghImg)">
- <img :src="itemUrl" v-for="(itemUrl,indexTwo) in item2.yhZghImg" :key="indexTwo">
- </view>
- </view>
- <view class="top-info-box rectify_info" v-if='rejectItem.spTime'>
- <view class="top-min-info-box" >
- <view>复核时间:</view>
- <view v-if="item2.spTime">{{item2.spTime}}</view>
- </view>
- <view class="top-min-info-box">
- <view>复核人:</view>
- <view v-if="item2.spUserName">{{item2.spUserName}}</view>
- </view>
- <view class="top-min-info-box">
- <view>复核描述:</view>
- <view v-if="item2.spSm">{{item2.spSm}}</view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <!-- 驳回 -->
- <view class="rectified-for-box" v-if="details.isZg != 1 && details.spStatus==2">
- <img v-if="details.spStatus == 4" class="rectified-for-position-img" src="@/images/Version2.2/icon_bg_ywc.png">
- <view class="rectified-for-title">{{details.jcxName}}</view>
- <view class="rectified-for-name" v-if="details.isLingshi == 0">{{details.jcxSstkMs}}</view>
- <view class="rectified-for-text-max-box">
- <view class="rectified-for-text-box">
- <view>隐患描述:</view>
- <view>{{details.yhMs}}</view>
- </view>
- </view>
- <view class="rectified-for-img-max-box">
- <!-- <view class="rectified-for-img-box" @click="lockImg(details.yhImg)" v-if="details.yhImg">
- <img :src="baseUrl+itemUrl" v-if="indexTwo<4" v-for="(itemUrl,indexTwo) in details.yhImg" :key="indexTwo">
- <view class="rectified-for-img-min-text" style="color:#999;" v-if="!details.yhImg">未上传隐患照片</view>
- <view class="rectified-for-img-min-text" v-if="details.yhImg[0]">{{details.spStatus==0?'隐患照片':'整改前照片'}} >></view>
- </view>
- <view class="rectified-for-img-box" @click="lockImg(item.yhZghImg)" v-if="details.yhZghImg">
- <img :src="baseUrl+itemUrl" v-if="indexTwo<4" v-for="(itemUrl,indexTwo) in details.yhZghImg" :key="indexTwo">
- <view class="rectified-for-img-min-text">整改后照片 >></view>
- </view> -->
- <view class="rectified-for-img-box" @click="lockImg(details.yhImg)" v-if="details.yhImg" >
- <img :src="itemUrl" v-for="(itemUrl,indexTwo) in details.yhImg" :key="indexTwo">
- <view class="rectified-for-img-min-text" style="color:#999;" v-if="!details.yhImg">未上传隐患照片</view>
- <view class="rectified-for-img-min-text" v-if="details.yhImg[0]">隐患照片 >></view>
- </view>
- <view v-for="(rejectItem,rejectIndex) in details.detailslogList" :key="rejectIndex" style="border-bottom: 1px dotted #E0E0E0;">
- <view class="top-info-box rectify_info">
- <view class="top-min-info-box">
- <view>整改时间:</view>
- <view>{{rejectItem.zgTime}}</view>
- </view>
- <view class="top-min-info-box">
- <view>整改人:</view>
- <view>{{rejectItem.zgUserName}}</view>
- </view>
- <view class="top-min-info-box">
- <view>整改描述:</view>
- <view>{{rejectItem.zgMs}}</view>
- </view>
- </view>
- <view class="rectify_later" style='border-bottom: 1px solid #E0E0E0;'>
- <view class="rectify_later_t">整改后照片:</view>
- <view class="rectify_later_b" @click="lockImg(rejectItem.yhZghImg)">
- <img :src="itemUrl" v-for="(itemUrl,indexTwo) in rejectItem.yhZghImg" :key="indexTwo">
- </view>
- </view>
- <view class="top-info-box rectify_info" v-if='rejectItem.spTime'>
- <view class="top-min-info-box">
- <view>复核时间:</view>
- <view>{{rejectItem.spTime}}</view>
- </view>
- <view class="top-min-info-box">
- <view>复核人:</view>
- <view>{{rejectItem.spUserName}}</view>
- </view>
- <view class="top-min-info-box">
- <view>复核描述:</view>
- <view>{{rejectItem.spSm}}</view>
- </view>
- </view>
- </view>
- <view class="input-box" style="margin: 0;">
- <view class="text-p">整改描述</view>
- <view class="bj-p">*</view>
- <textarea class="textarea-p" maxlength="50" v-model="form.zgMs" placeholder="请输入整改描述"></textarea>
- </view>
- <view class="img-up-box" style="margin: 0;">
- <view class="text-p">整改照片</view>
- <view class="bj-p"></view>
- <view class="img-box">
- <view class="min-for-img-box" v-for="(url,index) in form.yhZghImg" :key="index">
- <img class="min-for-img" @click.stop="uploadLockImg(url)"
- :src="baseUrl+url">
- <img class="del-img" @click.stop="delZgImg(index)" src="@/images/icon_ssp_closure.png">
- </view>
- <view class="up-img" @click="selectImage">
- <view>上传</view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view class="bottom-info-title-box" v-if="details.spStatus==3">
- <img src="@/images/Version2.2/icon_aqjc_zgxx.png">
- <view>未整改信息</view>
- </view>
- <view class="rectified-max-box">
- <view class="rectified-for-box" v-if="details.isZg == 1" >
- <!-- <view class="rectified-for-position-index">{{index+1}}</view> -->
- <view class="rectified-for-title">{{details.jcxName}}</view>
- <view class="rectified-for-name" v-if="details.isLingshi == 1">临时检查项</view>
- <view class="rectified-for-name" v-if="details.isLingshi == 0">{{details.jcxSstkMs}}</view>
- <view class="rectified-for-text-max-box">
- <view class="rectified-for-text-box">
- <view>隐患描述:</view>
- <view>{{details.yhMs}}</view>
- </view>
- <view class="rectified-for-text-box" v-if="details.isZg == 0 && newData.zgType == 0">
- <view>整改描述:</view>
- <view>{{details.zgMs}}</view>
- </view>
- <view class="rectified-for-text-box" v-if="details.isZg == 0 && newData.zgType == 1">
- <view>原因分析:</view>
- <view>{{details.zgYyfx}}</view>
- </view>
- <view class="rectified-for-text-box" v-if="details.isZg == 0 && newData.zgType == 1">
- <view>整改措施:</view>
- <view>{{details.zgCs}}</view>
- </view>
- <view class="rectified-for-text-box" v-if="details.isZg == 0">
- <view>证明信息:</view>
- <view>{{details.zmClMs}}</view>
- </view>
- </view>
- <view class="rectified-for-img-max-box">
- <view class="rectified-for-img-box" @click="lockImg(details.yhImg)" v-if="details.yhImg">
- <img :src="itemUrl" v-for="(itemUrl,indexTwo) in details.yhImg" :key="indexTwo">
- <view class="rectified-for-img-min-text" style="color:#999;" v-if="!details.yhImg">未上传隐患照片</view>
- <view class="rectified-for-img-min-text" v-if="details.yhImg">{{details.spStatus==0?'隐患照片':'整改前照片'}} >></view>
- </view>
- <view class="rectified-for-img-box" @click="lockImg(details.zmClImg)" v-if="details.zmClImg">
- <img :src="itemUrl" v-for="(itemUrl,indexTwo) in details.zmClImg" :key="indexTwo">
- <view class="rectified-for-img-min-text">证明材料 >></view>
- </view>
- </view>
- <view class="input-box" v-if="details.spStatus == 0 || details.spStatus == 2">
- <view class="text-p">整改描述</view>
- <view class="bj-p">*</view>
- <textarea class="textarea-p" maxlength="50" v-model="form.zgMs" placeholder="请输入整改描述"></textarea>
- </view>
- <view class="img-up-box" v-if="details.spStatus == 0 || details.spStatus == 2">
- <view class="text-p">整改照片</view>
- <view class="bj-p"></view>
- <view class="img-box">
- <view class="min-for-img-box" v-for="(url,index) in form.yhZghImg" :key="index">
- <img class="min-for-img" @click.stop="uploadLockImg(url)"
- :src="baseUrl+url">
- <img class="del-img" @click.stop="delZgImg(index)" src="@/images/icon_ssp_closure.png">
- </view>
- <view class="up-img" @click="selectImage">
- <view>上传</view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <!-- <view class="info-bottom-button-box" v-if="details.spStatus == 0 || details.spStatus == 3" @click="goUpData">完成整改</view> -->
- <view class="info-bottom-button-box-three" v-if="details.spStatus == 0">
- <view @click="goUpData(3)">暂无法整改</view>
- <view @click="goUpData(1)">完成整改</view>
- </view>
- <!-- <view class="info-bottom-button-box" v-if="details.spStatus == 2" @click="goUpData(1)">再次提交</view> -->
- <!-- <view class="info-bottom-button-box-two" v-if="details.spStatus == 1">审核中</view> -->
- <view class="info-bottom-button-box-three" v-if="details.spStatus == 2" >
- <view @click="goUpData(3)">暂无法整改</view>
- <view @click="goUpData(1)">再次提交</view>
- </view>
- <!-- <view class="info-bottom-button-box-three" v-if="userId==newData.createUserId && (details.spStatus == 1 || details.spStatus == 3)">
- <view @click="pageClick(2)">驳回</view>
- <view @click="pageClick(3)">审核通过</view>
- </view> -->
- <view class="info-bottom-button-box-two" v-if="details.spStatus == 4">整改完成</view>
- </view>
- <view class="input-max-box" v-if="pageType == 2">
- <view class="input-box">
- <textarea maxlength="100" v-model="text" placeholder="请输入驳回原因"></textarea>
- </view>
- <view class="input-button-box">
- <view class="out-button" @click="pageClick(1)">返回</view>
- <view class="input-button" @click="upDataClick(2)">提交</view>
- </view>
- </view>
- <view class="input-max-box" v-if="pageType == 3">
- <view class="input-box">
- <textarea maxlength="100" v-model="text" placeholder="请输入整改结果"></textarea>
- </view>
- <view class="input-button-box">
- <view class="out-button" @click="pageClick(1)">返回</view>
- <view class="input-button" @click="upDataClick(3)">提交</view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import { config } from '@/api/request/config.js'
- import { RecordDettailsListNew,editListUpdate,} from '@/api/index.js'
- export default {
- name: "rectifyDetails",
- data() {
- return {
- userId:uni.getStorageSync('userId'),
- //页面状态
- pageType:1,
- id:"",
- text:'',
- baseUrl:config.base_url,
- //选项
- buttonIndex:0,
- buttonArray:[],
- buttonArrayType:"",
- //详情开关
- showType:false,
- //数据
- newData:{},
- details:{},
- form:{
- yhZghImg:[],
- },
- }
- },
- onLoad(option) {
- console.log(this.baseUrl)
- let item=JSON.parse(option.item)
- this.id = item.id;
- // 动态修改导航名称
- uni.setNavigationBarTitle({
- title:item.laboratoryName
- })
- },
- onShow() {
- console.log(this.baseUrl)
- this.getInfo();
- },
- methods: {
- pageClick(type){
- if(this.pageType != type){
- this.pageType = type;
- }
- },
- upDataClick(type){
- let self = this;
- if(!this.text){
- uni.showToast({
- title: this.pageType==2?'请输入驳回原因':(this.pageType == 3?'请输入整改结果':''),
- icon:"none",
- mask:true,
- duration: 2000
- });
- return
- }
- if(type == 2){
- let obj = {
- id: self.details.id,
- checkId: self.details.checkId,
- spMs: self.text,
- spStatus: 2,
- };
- uni.showModal({
- content: '确认要驳回吗?',
- cancelColor:"#999",
- confirmColor:"#0183FA",
- success: function (res) {
- if (res.confirm) {
- self.checkRecordUpdate(obj);
- console.log('用户点击确定');
- } else if (res.cancel) {
- console.log('用户点击取消');
- }
- }
- });
- }else if(type == 3){
- let obj = {
- id: self.details.id,
- checkId: self.details.checkId,
- spMs: self.text,
- spStatus: 4,
- }
- uni.showModal({
- content: '确认要审核通过吗?',
- cancelColor:"#999",
- confirmColor:"#0183FA",
- success: function (res) {
- if (res.confirm) {
- self.checkRecordUpdate(obj);
- console.log('用户点击确定');
- } else if (res.cancel) {
- console.log('用户点击取消');
- }
- }
- });
- }
- },
- async checkRecordUpdate(obj){
- const {data} = await editListUpdate(obj);
- if(data.code == 200){
- uni.showToast({
- title: '操作成功',
- icon:"none",
- mask:true,
- duration: 2000
- });
- setTimeout(function(){
- uni.navigateBack();
- },2000);
- }
- },
- // 整改上传
- selectImage() {
- let self = this;
- if(this.form.yhZghImg.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.zgUploadImg(tempFilePaths);
- }
- });
- },
- async zgUploadImg(tempFilePaths){
- var self = this;
- uni.showLoading({
- title: '上传中',
- mask: true
- });
- uni.uploadFile({
- url: config.base_url+'/base/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.yhZghImg.push(res.data.url);
- }else{
- uni.showToast({
- title: res.msg,
- icon:"none",
- mask:true,
- duration: 2000
- });
- }
- },
- fail: err => {},
- complete: () => {
- uni.hideLoading()
- }
- });
- },
- //删除整改图片
- delZgImg(index){
- console.log("index",index)
- this.form.yhZghImg.splice(index,1);
- },
- //去整改
- async goUpData(type){
- let self = this;
- if(!self.form.zgMs){
- uni.showToast({
- title: '请填写整改描述!',
- icon:"none",
- mask:true,
- duration: 2000
- });
- return
- }
- let obj = {
- id: self.details.id,
- checkId: self.details.checkId,
- yhZghImg: self.form.yhZghImg.join(','),
- zgMs: self.form.zgMs,
- spStatus:type,
- }
- const {data} = await editListUpdate(obj);
- if(data.code == 200){
- uni.showToast({
- title: '提交成功',
- icon:"none",
- mask:true,
- duration: 2000
- });
- setTimeout(function(){
- uni.navigateBack();
- },2000);
- }
- /* uni.navigateTo({
- url: '/pages_manage/workbench/problemRectification/rectifyInfo?newData='+encodeURIComponent(JSON.stringify(this.newData)),//未提交列表
- }); */
- },
- //查看报告按钮
- buttonChange(e){
- if(this.buttonArrayType == 1){
- if(e.target.value == 0){
- this.genNotice();
- }else if(e.target.value == 1){
- this.genReport();
- }
- }else if(this.buttonArrayType == 2){
- this.genNotice();
- }
- },
- genNotice(){
- uni.showLoading({
- title: '下载中'
- });
- wx.downloadFile({
- url: config.base_url+'/laboratory/checkOption/genNotice/' + this.newData.id,
- 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(){
- uni.showLoading({
- title: '下载中'
- });
- wx.downloadFile({
- url: config.base_url+'/laboratory/checkOption/genReport/' + this.newData.id,
- 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
- });
- }
- })
- },
- //详情开关
- infoClickButton(type){
- this.showType = !this.showType;
- },
- //查看图片
- lockImg(list){
- console.log(list)
- if(!list){
- return
- }
- /* let urlList=[];
- list=list.split(',')
- list.forEach(function(item2){
- urlList.push(config.base_url+item2)
- }) */
- wx.previewImage({
- urls:list, //需要预览的图片http链接列表,多张的时候,url直接写在后面就行了
- current: '', // 当前显示图片的http链接,默认是第一个
- success: function(res) {},
- fail: function(res) {},
- complete: function(res) {},
- })
- },
- //上传查看照片
- uploadLockImg(list){
- console.log(list)
- if(!list){
- return
- }
- let urlList=[];
- list=list.split(',')
- list.forEach(function(item2){
- urlList.push(config.base_url+item2)
- })
- wx.previewImage({
- urls:urlList, //需要预览的图片http链接列表,多张的时候,url直接写在后面就行了
- current: '', // 当前显示图片的http链接,默认是第一个
- success: function(res) {},
- fail: function(res) {},
- complete: function(res) {},
- })
- },
- async getInfo(){
- let obj = {
- id:this.id
- };
- const {data} = await RecordDettailsListNew(obj);
- console.log(22222)
- if(data.code==200){
- console.log(data.data)
- let obj = JSON.parse(JSON.stringify(data.data));
- let newOjb = obj.record;
- this.$set(this,'newData',newOjb);
- this.$set(this,'details',obj.details);
- let yhImg=[];
- let yhZghImg=[];
- if(obj.details.yhImg){
- yhImg=obj.details.yhImg.split(',');
- let urlList=[];
- yhImg.forEach(function(item2){
- urlList.push(config.base_url+item2)
- })
- this.details.yhImg=urlList
- }
- if(obj.details.yhZghImg){
- yhZghImg=obj.details.yhZghImg.split(',');
- let urlList=[];
- yhZghImg.forEach(function(item2){
- urlList.push(config.base_url+item2)
- })
- this.details.yhZghImg=urlList
- }
- if(this.details.detailslogList){
- this.details.detailslogList.forEach(function(item){
- if(item.yhImg){
- let list=[];
- let urlList=[];
- list=item.yhImg.split(',');
- list.forEach(function(item2){
- urlList.push(config.base_url+item2)
- })
- item.yhImg=urlList
- }
- if(item.yhZghImg){
- console.log(item.yhZghImg)
- let list=[];
- let urlList=[];
- list=item.yhZghImg.split(',');
- console.log(list)
- list.forEach(function(item2){
- console.log(item2)
- urlList.push(config.base_url+item2)
- console.log(urlList)
- })
- item.yhZghImg=urlList;
- }
- })
- console.log(this.details.detailslogList)
- }
- }
- /* if(data.code == 200){
- let obj = JSON.parse(JSON.stringify(data.data));
- for(let i=0;i<obj.yhlist.length;i++){
- let text = "";
- if(obj.yhlist[i].level1){
- text = text + obj.yhlist[i].level1;
- }
- if(obj.yhlist[i].level2){
- text = text + '/'+ obj.yhlist[i].level2;
- }
- if(obj.yhlist[i].level3){
- text = text + '/'+ obj.yhlist[i].level3;
- }
- if(obj.yhlist[i].level4){
- text = text + '/'+ obj.yhlist[i].level4;
- }
- obj.yhlist[i].level = text;
- if(obj.yhlist[i].yhImg){
- if(obj.yhlist[i].yhImg[i]){
- obj.yhlist[i].yhImg = obj.yhlist[i].yhImg.split(",");
- }
- }
- if(obj.yhlist[i].zmClImg){
- if(obj.yhlist[i].zmClImg[i]){
- obj.yhlist[i].zmClImg = obj.yhlist[i].zmClImg.split(",");
- }
- }
- if(obj.yhlist[i].yhZghImg){
- if(obj.yhlist[i].yhZghImg[i]){
- obj.yhlist[i].yhZghImg = obj.yhlist[i].yhZghImg.split(",");
- }
- }
- }
- let newOjb = obj.record;
- newOjb.detailsList = obj.yhlist;
- //判断悬浮按钮
- if(newOjb.zgType == 0){
- this.$set(this,'buttonArray',[])
- this.buttonArrayType = 4;
- }else if(newOjb.zgType == 1 && (newOjb.zgStatus == 1 || newOjb.zgStatus == 3 || newOjb.zgStatus == 4)){
- this.$set(this,'buttonArray',["整改通知书","整改报告"])
- this.buttonArrayType = 1;
- }else if(newOjb.zgType == 1 && (newOjb.zgStatus != 1 || newOjb.zgStatus != 3 || newOjb.zgStatus != 4)){
- this.$set(this,'buttonArray',["整改通知书"])
- this.buttonArrayType = 2;
- }
- this.$set(this,'newData',newOjb);
- }
- */
- },
- }
- }
- </script>
- <style lang="stylus" scoped>
- #rectifyDetails{
- height: 100%;
- width: 100%;
- display flex
- .info-max-page{
- flex:1;
- .position-button{
- position fixed
- right:0;
- top:214rpx;
- width:160rpx;
- height:60rpx;
- background #0183FA
- color:#fff;
- text-align center
- line-height:60rpx;
- font-size:26rpx;
- z-index:10;
- border-radius:50rpx 0 0 50rpx;
- }
- .top-info-box{
- background #fff
- margin:20rpx;
- padding:20rpx 20rpx 0;
- border-radius:20rpx;
- .top-min-info-box{
- line-height:66rpx;
- display:flex;
- font-size:28rpx;
- view:nth-child(1){
- width:220rpx;
- color:#999;
- }
- view:nth-child(2){
- flex:1;
- text-align right
- }
- }
- .top-info-button{
- border-top:1rpx solid #dedede;
- display:flex;
- line-height:98rpx;
- margin-top:20rpx;
- view{
- font-size:28rpx;
- margin-left:258rpx;
- color:#0183FA;
- }
- img{
- width:24rpx;
- height:12rpx;
- margin:45rpx 0 0 15rpx;
- }
- }
- }
- .bottom-info-box{
- .bottom-info-title-box{
- display flex;
- height:80rpx;
- margin:20rpx;
- img{
- width:32rpx;
- height:32rpx;
- margin:24rpx 15rpx 0 0;
- }
- view{
- line-height:80rpx;
- color:#333;
- font-size:30rpx;
- }
- }
- .bottom-info-text-box{
- display flex
- margin:20rpx;
- padding:36rpx 35rpx 36rpx 28rpx;
- background #fff
- border-radius:20rpx;
- view{
- font-size:28rpx;
- }
- view:nth-child(1){
- color:#999;
- width:140rpx;
- }
- view:nth-child(2){
- color:#666;
- flex:1;
- text-align left
- }
- }
- .rectified-max-box{
- .rectified-for-box{
- background #fff
- margin:20rpx;
- border-radius:20rpx;
- position relative
- overflow hidden
- .rectified-for-position-index{
- position absolute
- left:0;
- top:0;
- background #B4DBFF;
- color:#0183FA;
- width:50rpx;
- height:50rpx;
- text-align center;
- line-height:50rpx;
- font-size:34rpx;
- }
- .rectified-for-position-img{
- position absolute
- right:43rpx;
- top:105rpx;
- width:250rpx;
- height:220rpx;
- }
- .rectified-for-title{
- line-height:30rpx;
- font-size:30rpx;
- color:#333;
- margin:78rpx 30rpx 36rpx;
- }
- .rectified-for-name{
- margin:0 30rpx;
- line-height:40rpx;
- font-size:28rpx;
- padding-bottom:39rpx;
- color:#666;
- border-bottom:1rpx solid #E0E0E0;
- }
- .rectified-for-text-max-box{
- margin:38rpx 30rpx 0;
- .rectified-for-text-box{
- display flex
- margin-bottom :20rpx;
- view{
- font-size:28rpx;
- }
- view:nth-child(1){
- width:140rpx;
- color:#999;
- line-height 40rpx
- }
- view:nth-child(2){
- flex:1;
- color:#666;
- line-height 40rpx
- }
- }
- }
- .rectified-for-img-max-box{
- margin:35rpx 26rpx 40rpx;
- .rectified-for-img-box{
- margin-bottom :20rpx;
- display flex
- background #f0f0f0
- border-radius:10rpx;
- padding:10rpx 35rpx 10rpx 23rpx;
- img{
- width:80rpx;
- height:80rpx;
- margin-right:10rpx;
- }
- .rectified-for-img-min-text{
- flex:1;
- text-align right;
- line-height:80rpx;
- color:#0183FA;
- font-size:28rpx;
- }
- }
- /* 整改前照片 */
- .rectify_front{
- .rectify_front_t{
- width:150rpx;
- color:#999;
- line-height 40rpx
- font-size :28rpx;
- margin-bottom :24rpx;
- }
- .rectify_front_b{
- display :flex;
- justify-content :flex-start;
- flex-wrap: wrap;
- align-items :center;
- border-bottom: 1px solid #E0E0E0;
- >img{
- width: 200rpx;
- height: 200rpx;
- margin-right :14rpx;
- margin-bottom 40rpx;
- border-radius :10rpx;
- }
- }
- }
- .rectify_info{
- margin: 0;
- padding: 0;
- margin-top 40rpx;
- margin-bottom :10rpx;
- }
- /* 整改后照片 */
- .rectify_later{
- .rectify_later_t{
- width:150rpx;
- color:#999;
- line-height 40rpx
- font-size :28rpx;
- margin-bottom :24rpx;
- }
- .rectify_later_b{
- display :flex;
- justify-content :flex-start;
- flex-wrap: wrap;
- align-items :center;
- >img{
- width: 200rpx;
- height: 200rpx;
- margin-right :14rpx;
- margin-bottom 40rpx;
- border-radius :10rpx;
- }
- }
- }
- }
- }
- }
- }
- .info-bottom-button-box{
- width:650rpx;
- height:100rpx;
- margin:50rpx auto;
- color:#fff;
- background:#0183FA;
- text-align center;
- line-height:100rpx;
- border-radius:20rpx;
- }
- .info-bottom-button-box-two{
- width:650rpx;
- height:100rpx;
- margin:50rpx auto;
- color:#fff;
- background:#999;
- text-align center;
- line-height:100rpx;
- border-radius:20rpx;
- }
- .info-bottom-button-box-three{
- display flex
- width:650rpx;
- height:100rpx;
- margin:50rpx auto;
- view{
- text-align center
- line-height:100rpx;
- font-size:30rpx;
- color:#fff;
- }
- view:nth-child(1){
- width: 325rpx;
- height: 100rpx;
- background: linear-gradient(-45deg, #FA9901, #F28E26);
- border-radius: 50rpx 0 0 50rpx;
- }
- view:nth-child(2){
- width: 325rpx;
- height: 100rpx;
- background: linear-gradient(-35deg, #309CFF, #0183FA);
- border-radius: 0 50rpx 50rpx 0;
- }
- }
- /* 整改描述 */
- .input-box{
- //display flex
- margin:32rpx 25rpx 0;
- .text-p{
- display:inline-block;
- font-size:30rpx;
- line-height:74rpx;
- }
- .bj-p{
- display:inline-block;
- font-size:30rpx;
- line-height:74rpx;
- color:#FF0000;
- width:30rpx;
- }
- .textarea-p{
- //width:658rpx;
- height:212rpx;
- padding:20rpx;
- font-size:28rpx;
- border:1rpx solid #dedede;
- border-radius:20rpx;
- }
- }
- /* 整改照片 */
- .img-up-box{
- //display flex
- margin:32rpx 25rpx 0;
- .text-p{
- display :inline-block;
- font-size:30rpx;
- line-height:74rpx;
- }
- .bj-p{
- display :inline-block;
- font-size:30rpx;
- line-height:74rpx;
- color:#FF0000;
- width:30rpx;
- }
- .img-box{
- flex:1;
- .up-img{
- display: inline-block;
- background url(@/images/icon_07.png) no-repeat
- background-size 100%
- width:200rpx;
- height:200rpx;
- overflow: hidden;
- margin:0 10rpx 10rpx 0;
- border-radius: 10rpx;
- view{
- font-size:28rpx;
- text-align center;
- color:#999;
- line-height:30rpx;
- margin-top:120rpx;
- }
- }
- .min-for-img-box{
- position relative
- display: inline-block;
- width:200rpx;
- height:200rpx;
- margin:0 10rpx 10rpx 0;
- overflow hidden;
- border-radius: 10rpx;
- .min-for-img{
- width:200rpx;
- height:200rpx;
- }
- .del-img{
- position absolute;
- top:0rpx;
- right:0rpx;
- width:40rpx;
- height:40rpx;
- }
- }
- }
- }
- }
- .input-max-box{
- flex:1;
- .input-box{
- margin:20rpx;
- background #fff
- border-radius:20rpx;
- display flex
- overflow hidden
- textarea{
- width:610rpx;
- height:212rpx;
- margin:36rpx auto 47rpx;
- font-size:28rpx;
- padding:33rpx 24rpx;
- border-radius:10rpx;
- border: 2rpx solid #E0E0E0;
- }
- }
- .input-button-box{
- display flex
- width:700rpx;
- margin:50rpx auto;
- .out-button{
- flex:1;
- text-align center
- line-height:100rpx;
- font-size:28rpx;
- color:#fff;
- background #999;
- border-radius: 50rpx 0 0 50rpx;
- }
- .input-button{
- flex:1;
- text-align center
- line-height:100rpx;
- font-size:28rpx;
- color:#fff;
- background #0183FA;
- border-radius: 0 50rpx 50rpx 0;
- }
- }
- }
- }
- </style>
|