1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228 |
- <template>
- <view>
- <cu-custom bgColor="bg-blue" :isBack="true" >
- <block slot="backText">返回</block>
- <block slot="content">{{title}}</block>
- </cu-custom>
-
- <form @submit="formSubmit" class="cu-list menu">
-
- <view class="titlebg2">
- <view class="titlet1" ></view>
- <view class="titlet2" >企业信息</view>
- </view>
-
-
- <view class="textbg">
- <view class="text12">
- 企业名称
- </view>
- <view class="text22">
- {{inputForm.name}}
- </view>
- </view>
-
- <view class="textbg">
- <view class="text12">
- 属地
- </view>
- <view class="text22">
- {{inputForm.qySd}}
- </view>
- </view>
-
- <view class="textbg">
- <view class="text12">
- 企业负责人
- </view>
- <view class="text22">
- {{inputForm.lxr}}
- </view>
- </view>
-
- <view class="textbg">
- <view class="text12">
- 负责人号码
- </view>
- <view class="text22">
- {{inputForm.phone}}
- </view>
- </view>
-
- <view style="height: 30rpx;background-color: white;"></view>
-
- <view class="titlebg2" style="margin-top:10rpx ;">
- <view class="titlet1" ></view>
- <view class="titlet2" >挂钩干部</view>
- </view>
-
- <view class="textbg">
- <view class="text12">
- 姓名
- </view>
- <view class="text22">
- {{inputForm.bz5}}
- </view>
- </view>
-
- <view style="height: 30rpx;background-color: white;"></view>
-
- <view class="titlebg2" style="margin-top:10rpx ;">
- <view class="titlet1" ></view>
- <view class="titlet2" >主要问题诉求</view>
- </view>
-
-
- <view v-for="(item, index2) in questionList">
-
- <view style="display: flex;background-color: #ffffff;justify-content: space-between; align-items: center;">
- <view class="titlebb">
- 问题{{index2+1}}
- </view>
- <!-- <icon v-if="index2!=0" @click="del(index2)" type="cancel" style="padding-right: 15rpx;padding-top: 5rpx;padding-left: 100rpx;"></icon> -->
- </view>
-
-
- <view class="input1">
- <view class="title">
- 问题名称
- </view>
- <input v-model="item.qname" placeholder="请填写问题名称" disabled="true" ></input>
- </view>
-
- <view class="cu-form-group margin-top">
- <view class="title">
- 问题类型
- </view>
- <view class="input2">{{item.qtype||'请选择问题类型'}}</view>
-
- </view>
-
- <view class="cu-form-group margin-top" v-if="item.t1!=''">
- <view class="title">
- {{item.t1}}
- </view>
- <input style="width: 200rpx;" v-model="item.gaps" :placeholder="item.t1s" disabled="true"></input>{{item.t1d}}
- </view>
- <view class="cu-form-group margin-top" >
- <view class="title">
- 问题描述
- </view>
- <textarea v-model="item.des" placeholder="请填写问题描述" disabled="true" ></textarea>
- </view>
- <view class="cu-form-group margin-top" style="border-bottom: 3px solid #eee;" v-if="item.des8">
- <view class="title">
- 涉及单位
- </view>
-
- <view class="input2">{{item.des8||''}}</view>
-
- </view>
-
-
- <view class="cu-form-group" style="flex-direction: column; align-items: start;" v-if="item.picLists2.length!=undefined&&item.picLists2.length!=0">
- <view style="width: -webkit-fill-available;">附件:</view>
-
- <view v-for="(attachment, indexfj) in item.picLists2" :key="indexfj" style="margin-left: 20rpx;padding-bottom: 20rpx;">
- <view @click="viewAttachment(attachment)" style="width: 100%;color: blue;">{{ attachment.name }}</view>
- </view>
- </view>
-
-
-
-
- <!-- 挂钩干部 -->
- <view class="cu-form-group margin-top" v-if="roleIds=='1915280292672946177'" >
- <view class="title">
- 问题处理
- </view>
- <radio-group @change="(e) => radioChange(e, index2)" class="radiog">
- <label class="uni-list-cell uni-list-cell-pd" v-for="(item3, index3) in dels" :key="item3">
- <view>
- <radio :value="item3" :checked="index3 === item.current" :disabled="index3 != item.current&&!item.cansubmit" />
- </view>
- <view style="padding-left: 15rpx;">{{item3}}</view>
- </label>
- </radio-group>
- </view>
- <!-- 大走访办公室 -->
- <view class="cu-form-group margin-top" v-if="roleIds=='1910175386924417025'" >
- <view class="title">
- 问题处理
- </view>
- <radio-group @change="(e) => radioChange(e, index2)" class="radiog">
- <label class="uni-list-cell uni-list-cell-pd" v-for="(item3, index3) in dels2" :key="item3">
- <view>
- <radio :value="item3" :checked="index3 === item.current" :disabled="index3 != item.current&&!item.cansubmit"/>
- </view>
- <view style="padding-left: 15rpx;">{{item3}}</view>
- </label>
- </radio-group>
- </view>
-
- <!-- 交办部门 -->
- <view class="cu-form-group margin-top" v-if="roleIds=='1910175949166673921'" >
- <view class="title">
- 问题处理
- </view>
- <radio-group @change="(e) => radioChange(e, index2)" class="radiog">
- <label class="uni-list-cell uni-list-cell-pd" v-for="(item3, index3) in dels3" :key="item3">
- <view>
- <radio :value="item3" :checked="index3 === item.current" :disabled="index3 != item.current&&!item.cansubmit"/>
- </view>
- <view style="padding-left: 15rpx;">{{item3}}</view>
- </label>
- </radio-group>
- </view>
-
- <!-- 挂钩干部或大走访办公室或交办部门 -->
- <view class="cu-form-group margin-top" v-if="roleIds=='1910175386924417025'||roleIds=='1915280292672946177'||roleIds=='1910175949166673921'" >
- <view class="title">
- 预计办结时间
- </view>
- <picker mode="date" class="title2" @change="(e) => onDateChange(e, index2)" v-if="item.cansubmit" >
- <view class="input2">{{item.finishdate||'请选择'}}</view>
- </picker>
- <view class="input2" v-if="!item.cansubmit">{{item.finishdate||'请选择'}}</view>
- </view>
-
- <view v-if="item.showjbdw" class="cu-form-group margin-top" >
- <view class="title">
- 交办单位
- </view>
-
- <zqs-select
- class="input2"
- :multiple="true"
- :list="pickerData"
- label-key="label"
- value-key="value"
- placeholder=" 请选择"
- title="请选择交办单位"
- clearable
- v-model="item.checkUserList"
- @search="searchEvent"
- @change="selectChange2"
- ></zqs-select>
- </view>
-
- <view v-if="item.showjbdw2" class="cu-form-group margin-top" >
- <view class="title">
- 交办单位
- </view>
- <view class="input2" >{{item.des2||'请选择'}}</view>
- </view>
-
-
- <view class="cu-form-group margin-top" v-if="(roleIds=='1910175386924417025'||roleIds=='1915280292672946177')&&item.showjbdw">
- <view class="title">
- 交办要求
- </view>
- <textarea v-model="item.delyj" placeholder="请填写交办要求" ></textarea>
- </view>
-
- <view class="cu-form-group margin-top" v-if="(roleIds=='1910175386924417025'||roleIds=='1915280292672946177'||roleIds=='1910175949166673921')&&!item.showjbdw">
- <view class="title">
- 处理建议
- </view>
- <textarea v-model="item.delyj" placeholder="请填写处理建议" :disabled="!item.cansubmit" ></textarea>
- </view>
-
- <!-- <view class="cu-form-group2 margin-top" style="border-bottom: 3px solid #eee;">
- <view class="title">
- 附件:
- </view>
- <button @click="addfj" style="height: 30px;width: 240rpx;margin-left: 55rpx;" class="cu-btn block bg-blue margin-tb-sm lg">+上传附件</button>
- </view>
- <view v-for="(item3, index3) in item.fj">
- <view style="display: flex;background-color: #ffffff;justify-content: space-between; align-items: center;">
- <view class="titlebb">
- {{item3.fjname}}
- </view>
- <icon @click="del(index3)" type="cancel" style="padding-right: 15rpx;padding-top: 5rpx;padding-left: 100rpx;"></icon>
- </view>
- </view> -->
-
-
- <view class="cu-form-group margin-top" style="border-bottom: 3px solid #eee;" v-if="roleIds=='1910175386924417025'||roleIds=='1915280292672946177'||roleIds=='1910175949166673921'">
- <uni-file-picker style="margin-bottom: 10px;" limit="9" ref="picFile" v-model="item.picLists"
- fileMediatype="all" mode="grid" title="附件上传" :auto-upload="autoUpload" @select="(e) => select(e, index2)"
- @progress="progress" @success="success" @fail="fail" @change="onChange" @delete="(e) => deleteFile(e, index2)"
- :imageStyles="imageStyles" :disabled="!item.cansubmit">
- </uni-file-picker>
- </view>
-
-
-
- <!-- 流程展示 -->
- <view v-for="(record, index4) in item.oplist" :key="index4" class="record-item" @click="viewDetails(record)" style="border-bottom: 2px solid #eee;">
-
- <view style="display: flex; flex-direction:row;align-items: center; ">
- <view v-if="item.oplist.length!=1" :class="index4 === item.oplist.length - 1 ? 'record-p2' : 'record-p1'"></view>
- <view v-if="item.oplist.length==1" class="record-p1"></view>
- <text class="record-time">{{ record.opTypeName }}</text>
- </view>
-
- <view style="display: flex; flex-direction:row;align-items: center; ">
- <view class="submit-time">
- <text v-if="record.des6!=''&&record.des6!=undefined" >处理建议:{{ record.des6 }}</text>
- <text v-if="record.des5!=''&&record.des5!=undefined" >预计办结时间:{{ record.des5 }}</text>
- <text >{{ record.roleName }}-{{ record.des2 }} {{ record.updateDate }}</text>
- </view>
-
- </view>
-
- </view>
-
-
- <view v-if="canpj">
-
- <view class="cu-form-group margin-top" >
- <view class="title" style="color: #3c9cff;">
- 企业主要负责人知晓情况:
- </view>
- <radio-group @change="(e) => radioChange2(e, index2,1)" class="radiog radiog2">
- <label class="uni-list-cell uni-list-cell-pd" v-for="(item3, index3) in dels4" :key="item3">
- <view>
- <radio :value="item3" :checked="index3 === item.current" />
- </view>
- <view style="padding-left: 15rpx;place-self: center;padding-right: 18rpx;">{{item3}}</view>
- </label>
- </radio-group>
- </view>
-
- <view class="cu-form-group margin-top" >
- <view class="title" style="padding-right: 0;color: #3c9cff;">
- 满意度评价:
- </view>
- <radio-group @change="(e) => radioChange2(e, index2,2)" class="radiog radiog2">
- <label class="uni-list-cell uni-list-cell-pd" v-for="(item3, index3) in dels5" :key="item3">
- <view>
- <radio :value="item3" :checked="index3 === item.current" />
- </view>
- <view style="padding-left: 5rpx;place-self: center;padding-right: 9rpx;">{{item3}}</view>
- </label>
- </radio-group>
- </view>
-
-
- <view class="cu-form-group margin-top" v-if="item.showpjedit">
- <view class="title">
- 说明
- </view>
- <textarea v-model="item.delyj" placeholder="请填写说明" ></textarea>
- </view>
- </view>
-
- <view style="border-bottom: 8px solid #eee;">
-
- </view>
-
-
- </view>
- <!-- <view style="width: 400rpx;margin-left: 20rpx;">
- <button @click="addp" style="height: 30px;" class="cu-btn block bg-blue margin-tb-sm lg">+增加问题</button>
- </view> -->
-
- <view style="height: 40rpx;"></view>
- <view class="flexC" v-if="cansubmit">
- <button v-if="roleIds=='38a14f1f42ed424eab4cb5d489596b0d'" @click="save" class="bt1 block margin-tb-sm lg">暂存</button>
- <button form-type="submit" class="bt1 cu-btn block bg-blue margin-tb-sm lg">提交</button>
- </view>
-
- <view class="flexC" v-if="canpj">
- <button @click="pjsave" class="bt1 cu-btn block bg-blue margin-tb-sm lg">立即评价</button>
- </view>
- <view style="height: 40rpx;"></view>
- </form>
- </view>
- </template>
- <script>
- var graceChecker = require("@/common/graceChecker.js");
- import revenueListService from '@/api/revenue/revenueListService'
- import loginService from '@/api/auth/loginService.js'
- import * as $auth from "../../common/auth"
-
- export default {
- components: {
- },
-
- data() {
- return {
- title: '问题诉求情况',
- cansubmit: false,
- canpj:false,
- roleIds:'',
- uid:'',
- inputForm: {
- id:'',
- name: '',
- industry: '',
- lxr: '',
- phone: '',
-
- bz1: '',
- bz2: '',
- bz3: '',
- bz4: '',
- bz5: '',
- bz6: '',
-
- des1: '',
- des2: '',
- des3: '',
- des4: '',
- des6: '',
- des10: '',
- },
- t1: '可供产品',
- t1s: '请填写可供产品',
- t2: '可供数量',
- t2s: '请填写可供数量',
- t3: '详细描述',
- t3s: '请填写详细描述',
-
- autoUpload: false,
- imageStyles: {
- width: 90,
- height: 90
- },
- parkList: [ "用工人才", "资金需求", "土地厂房", "订单及配套", "政策兑现", "创新及品牌", "审批手续", "水电气供应", "安全环保消防", "其他(需详细说明)"],
- questionList:[{qname:"",qtype:"",qTypeindex:"",gaps:"",des:"",t1:"",t1s:"",picLists2:[]}],
- dels:["办结","反馈大走访活动办","正在办理","难以化解","持续跟踪","提请会办"],
- dels2:["办结","交办"],
- dels3:["办结","正在办理","难以化解","持续跟踪","提请会办"],
- dels4:["是","否"],
- dels5:["非常满意","满意","不满意"],
- index:0,
- ischeck: false,
-
- importUserId: [],
- pickerData: [],
- pickerDataOld: [],
- selectedValues: []
- }
- },
- computed: {
- // 动态计算选中的 label
- selectedLabels() {
- return this.item.checkUserList
- .map((value) => {
- const item = this.pickerData.find((option) => option.value === value);
- return item ? item.label : value; // 如果找不到,返回 value
- })
- .join(", ");
- },
- },
- onShow() {
- this.$auth.checkLogin()
-
- loginService.getDictList({
- dictTypeId:"1907700775364263937"
- }).then(({data}) => {
- this.pickerData = data
- this.pickerDataOld = data
- //默认第一个选项
- //this.checkUserList=this.pickerData[0].value;
-
- }).catch(e => {
- })
-
- },
- watch: {
- value2(val) {
- console.log('我是更新后的选中数据', val)
- },
- },
- created() {
- },
- mounted() {
- },
- async onLoad(query) {
- this.uid= $auth.getUserInfo().id;
- this.roleIds= $auth.getUserInfo().roleIds;
-
- if(query.ischeck!=undefined){
- //查看
- this.ischeck=true;
- let data2 = await loginService.getdzfQuestionqueryById({id:query.id})
-
- this.inputForm.id = data2.data.id;
- this.inputForm.name = data2.data.qyName;
- this.inputForm.qySd = data2.data.qySd;
- this.inputForm.lxr = data2.data.qyFzr;
- this.inputForm.phone = data2.data.phone;
- this.inputForm.bz5 = data2.data.officer;
-
-
- //判断是否显示提交,暂存按钮
- if(data2.data.states=='1'&&data2.data.des1.includes($auth.getUserInfo().loginName)){
- this.cansubmit=true;
- }
-
- //将流程的最后一步设置到查看(问题处理,预计办结时间,处理建议)
-
-
- for (let i = 0; i < data2.data.dzfQuestionDetilDTOList.length; i++) {
- let opsize=data2.data.dzfQuestionDetilDTOList[i].oplist.length;
-
- data2.data.dzfQuestionDetilDTOList[i].showpjedit=false
- for (let j = 0; j < opsize; j++) {
- data2.data.dzfQuestionDetilDTOList[i].showjbdw=false;
- data2.data.dzfQuestionDetilDTOList[i].showjbdw2=false;
- //当前登录人
- if (data2.data.dzfQuestionDetilDTOList[i].oplist[j].createBy.id === this.uid) {
- //问题处理
- console.log("问题:"+data2.data.dzfQuestionDetilDTOList[i].oplist[j].opType)
-
- if(data2.data.dzfQuestionDetilDTOList[i].oplist[j].opType=='3'){
- data2.data.dzfQuestionDetilDTOList[i].current=0
- data2.data.dzfQuestionDetilDTOList[i].showjbdw=false;
- data2.data.dzfQuestionDetilDTOList[i].showjbdw2=false;
- }else if(data2.data.dzfQuestionDetilDTOList[i].oplist[j].opType=='4'){
- data2.data.dzfQuestionDetilDTOList[i].current=1
- }else if(data2.data.dzfQuestionDetilDTOList[i].oplist[j].opType=='5'){
- //挂钩干部
- if(this.roleIds=='1915280292672946177'){
- data2.data.dzfQuestionDetilDTOList[i].current=2
- //交办部门
- }else{
- data2.data.dzfQuestionDetilDTOList[i].current=1
- }
- }else if(data2.data.dzfQuestionDetilDTOList[i].oplist[j].opType=='6'){
- //挂钩干部
- if(this.roleIds=='1915280292672946177'){
- data2.data.dzfQuestionDetilDTOList[i].current=3
- //交办部门
- }else{
- data2.data.dzfQuestionDetilDTOList[i].current=2
- }
- }else if(data2.data.dzfQuestionDetilDTOList[i].oplist[j].opType=='7'){
- //挂钩干部
- if(this.roleIds=='1915280292672946177'){
- data2.data.dzfQuestionDetilDTOList[i].current=4
- //交办部门
- }else{
- data2.data.dzfQuestionDetilDTOList[i].current=3
- }
- }else if(data2.data.dzfQuestionDetilDTOList[i].oplist[j].opType=='8'){
- //挂钩干部
- if(this.roleIds=='1915280292672946177'){
- data2.data.dzfQuestionDetilDTOList[i].current=5
- //交办部门
- }else{
- data2.data.dzfQuestionDetilDTOList[i].current=4
- }
- }
- //大走访办公室角色
- else if(data2.data.dzfQuestionDetilDTOList[i].oplist[j].opType=='9'){
- data2.data.dzfQuestionDetilDTOList[i].current=1
- data2.data.dzfQuestionDetilDTOList[i].showjbdw2=true;
- data2.data.dzfQuestionDetilDTOList[i].showjbdw=false;
- }
- //处理建议
- data2.data.dzfQuestionDetilDTOList[i].delyj=data2.data.dzfQuestionDetilDTOList[i].oplist[j].des6
-
- }
-
-
- }
-
- //办结时间就是显示最后一条处理意见的办结时间
- if(data2.data.dzfQuestionDetilDTOList[i].oplist[opsize-1].des5!=undefined&&data2.data.dzfQuestionDetilDTOList[i].oplist[opsize-1].des5!=''){
- data2.data.dzfQuestionDetilDTOList[i].finishdate=data2.data.dzfQuestionDetilDTOList[i].oplist[opsize-1].des5
- }
-
- //每条问题是否需要提交
- if(data2.data.dzfQuestionDetilDTOList[i].des1!=undefined){
- let nextuser=data2.data.dzfQuestionDetilDTOList[i].des1+",";
- if(nextuser.includes($auth.getUserInfo().loginName+",")){
- data2.data.dzfQuestionDetilDTOList[i].cansubmit=true;
- }else{
- data2.data.dzfQuestionDetilDTOList[i].cansubmit=false;
- }
- }else{
- data2.data.dzfQuestionDetilDTOList[i].cansubmit=false;
- }
-
-
- data2.data.dzfQuestionDetilDTOList[i].checkUserList=[];
- data2.data.dzfQuestionDetilDTOList[i].picLists=[];
- data2.data.dzfQuestionDetilDTOList[i].picLists2=[];
- data2.data.dzfQuestionDetilDTOList[i].picUrl=[];
- //初始化附件
- if (data2.data.dzfQuestionDetilDTOList[i].des6 != null) {
- var list = data2.data.dzfQuestionDetilDTOList[i].des6.split(",")
- list.forEach(item => {
- // data2.data.dzfQuestionDetilDTOList[i].picUrl.push({
- // 'url': "http://47.97.69.114:8089/yd_qycpfbWeb"+item,
- // 'uuid': "http://47.97.69.114:8089/yd_qycpfbWeb"+item
- // })
-
- let aa=item.split("&name=")
-
- data2.data.dzfQuestionDetilDTOList[i].picLists2.push({
- 'url': "http://47.97.69.114:8089/yd_qycpfbWeb"+item,
- 'uuid': item,
- 'name': aa[1]
- })
- })
- }
-
- }
-
- this.questionList=data2.data.dzfQuestionDetilDTOList;
- console.log(this.questionList)
-
- if(query.ischeck=='2'){
- this.title="诉求办理评价";
- this.canpj=true;
- }
-
- }else{
- //新增
- let data2 = await loginService.queryByUserName()
- this.inputForm = this.recover(this.inputForm, data2.data)
- this.inputForm.id="";
- }
-
- },
- methods: {
- //交办单位
- selectChange2() {
- // 此处为点击的事件
- this.pickerData=this.pickerDataOld;
- },
- searchEvent(val) {
- this.pickerData=this.filteredItems(val);
- },
- filteredItems(searchQuery) {
- const query = searchQuery.trim();
- if (!query) return this.pickerDataOld;
- return this.pickerDataOld.filter(item => {
- return item.label.toString().includes(query);
- });
- },
- //交办单位结束
-
-
-
- onDateChange(e,index2) {
- this.$set(this.questionList[index2], 'finishdate', e.detail.value);
- },
- radioChange: function(evt,index2) {
- //大走访办公室角色时
- if(this.roleIds=='1910175386924417025'){
- if(evt.detail.value=='办结'){
- this.questionList[index2].showjbdw=false;
- this.questionList[index2].delyj="";
- }else if(evt.detail.value=='交办'){
- this.questionList[index2].showjbdw=true;
- console.log(this.questionList[index2])
- this.questionList[index2].delyj="请2日内回应,10内反馈办理结果,如办结请上传加盖公章的书面材料";
-
-
-
- }
-
- for (let i = 0; i < this.dels2.length; i++) {
- if (this.dels2[i] === evt.detail.value) {
- this.questionList[index2].current = i;
- break;
- }
- }
- //挂钩干部
- }else if(this.roleIds=='1915280292672946177'){
-
- console.log("选择:"+evt.detail.value);
- for (let i = 0; i < this.dels.length; i++) {
- if (this.dels[i] === evt.detail.value) {
- this.questionList[index2].current = i;
- break;
- }
- }
- //交办部门
- }else if(this.roleIds=='1910175949166673921'){
-
- console.log("选择:"+evt.detail.value);
- for (let i = 0; i < this.dels3.length; i++) {
- if (this.dels3[i] === evt.detail.value) {
- this.questionList[index2].current = i;
- break;
- }
- }
- }
-
- },
- radioChange2: function(evt,index2,witch) {
-
- if(evt.detail.value=='非常满意'||evt.detail.value=='满意'){
- this.questionList[index2].showpjedit=false;
- this.questionList[index2].pjyj="";
- }else if(evt.detail.value=='不满意'){
- this.questionList[index2].showpjedit=true;
- }
- if(witch==1){
- for (let i = 0; i < this.dels4.length; i++) {
- if (this.dels4[i] === evt.detail.value) {
- this.questionList[index2].current1 = i;
- break;
- }
- }
- }else{
- for (let i = 0; i < this.dels5.length; i++) {
- if (this.dels5[i] === evt.detail.value) {
- this.questionList[index2].current2 = i;
- break;
- }
- }
- }
-
-
-
-
-
- },
-
-
- addfj(){
-
- },
- addp(){
- this.questionList.push({qname:"",qtype:"",qTypeindex:"",gaps:"",des:"",t1:"",t1s:""})
-
- },
- del(index2){
- this.questionList.splice(index2, 1);
- },
-
- bindPickerChange: function(e,index2) {
- if(e.detail.value==0){
- this.questionList[index2].t1='缺口数';
- this.questionList[index2].t1s= '请填写缺口数';
- this.questionList[index2].t1d= '人';
-
- }else if(e.detail.value==1){
- this.questionList[index2].t1='缺口数';
- this.questionList[index2].t1s= '请填写缺口数';
- this.questionList[index2].t1d= '万元';
- }else if(e.detail.value==2){
- this.questionList[index2].t1='缺口数';
- this.questionList[index2].t1s= '请填写缺口数';
- this.questionList[index2].t1d= '';
- }else{
- this.questionList[index2].t1='';
- this.questionList[index2].t1s= '';
- this.questionList[index2].t1d= '';
- }
-
- this.questionList[index2].qTypeindex = e.detail.value;
- this.questionList[index2].qtype=this.parkList[e.detail.value]
-
- },
-
- viewAttachment(attachment) {
- let aa=this.checkFileTypeByExtension(attachment.url);
- if(aa=='Image'){
- uni.previewImage({
- urls: [attachment.url], // 图片链接列表
- indicator: 'number', // 显示页码
- loop: true // 是否循环播放
- });
- }else{
- this.downloadFile(attachment.url);
- }
-
- },
- checkFileTypeByExtension(url) {
- const extension = url.substring(url.lastIndexOf('.') + 1).toLowerCase();
- if (['jpg', 'jpeg', 'png', 'gif'].includes(extension)) {
- return 'Image';
- } else if (['doc', 'docx', 'xls', 'xlsx', 'pdf'].includes(extension)) {
- return 'Document';
- } else {
- return 'Unknown';
- }
- },
-
- downloadFile(url) {
-
- const a = document.createElement('a');
- a.href = url; //filePath 这里的地址是 uni.downloadFile 中的返回值里的地址
- let aa=url.split("&name=")
- a.download = aa[1]; // 可以设置下载文件名,如果是空字符串,则使用服务器端设置的文件名
- a.click();
-
-
- // uni.downloadFile({
- // url: url,
- // success: (res) => {
- // if (res.statusCode === 200) {
- // const filePath = res.tempFilePath;
- // uni.saveFile({
- // tempFilePath: filePath,
- // success: (res) => {
- // uni.showToast({
- // title: '文件已保存:' + res.savedFilePath,
- // icon: 'none'
- // });
- // // 打开文档查看(仅支持Android)
- // if (plus.os.name === 'Android') {
- // uni.openDocument({
- // filePath: res.savedFilePath,
- // success: () => {
- // console.log('打开文档成功');
- // }
- // });
- // } else {
- // uni.showToast({
- // title: 'iOS系统请自行选择查看方式',
- // icon: 'none'
- // });
- // }
- // },
- // fail: () => {
- // uni.showToast({
- // title: '保存文件失败',
- // icon: 'none'
- // });
- // }
- // });
- // }
- // },
- // fail: () => {
- // uni.showToast({
- // title: '下载文件失败',
- // icon: 'none'
- // });
- // }
- // });
- },
-
- // 获取上传进度
- progress(e) {
- console.log('上传进度:', e)
- },
- // 上传成功
- success(e) {
- console.log('上传成功')
- },
- // 上传失败
- fail(e) {
- console.log('上传失败:', e)
- },
- onChange(e) {
- console.log(e); // 查看选择文件的详细信息
- },
- deleteFile(e,index2) {
- this.questionList[index2].picUrl.splice(e.index, 1)
- },
- // 获取上传状态
- select(e,index2) {
- console.log('选择文件:', e)
- var _this = this
- var i = 0
- upload()
- function upload() {
- if (i >= e.tempFiles.length) {
- return;
- }
- var item = e.tempFiles[i]
- e.tempFiles[i].progress = 100
- uni.showLoading({
- title: "上传中",
- mask: true
- });
- uni.uploadFile({
- url: '/yd_qycpfb/file/upload?uploadPath=userdir', // 仅为示例,非真实的接口地址
- filePath: item.url,
- name: 'file',
- formData: {
- 'fileName': item.name
- },
- header: {
- 'token': _this.$auth.getUserToken()
- },
- success: (res) => {
-
- var data = res.data
- if (typeof data['error'] != "undefined") {
- uni.showToast({
- icon: 'none',
- title: '上传失败,请联系开发!'
- });
- _this.$refs.picFile.clearFiles(_this.questionList[index2].picLists.length)
- } else {
- _this.questionList[index2].picUrl.push({
- url: data,
- uuid: item.uuid
- })
- i++;
- // _this.$refs.picFile.setProgress(100)
- //e.tempFiles[i].progress = 100
- console.log(_this.$refs.picFile)
-
- upload()
- }
- },
- fail: () => {
- uni.hideLoading();
- uni.showToast({
- icon: 'none',
- title: '上传失败,请联系开发!'
- });
- _this.$refs.picFile.clearFiles(_this.questionList[index2].picLists.length)
- },
- complete: function() {
- uni.hideLoading();
- }
- });
- }
- },
- save(){
- console.log("交办单位:"+this.checkUserList)
-
- // this.inputForm.des10="";
- // this.inputForm.dzfQuestionDetilDTOList=this.questionList;
- // this.checkinput();
- },
-
- pjsave(){
- let cansave=true;
- for (let i = 0; i < this.questionList.length; i++) {
-
- this.questionList[i].checkUserList="";
- if (this.questionList[i].current1 ==undefined||this.questionList[i].current2 ==undefined) {
- cansave=false;
- }
-
- }
-
- this.inputForm.dzfQuestionDetilDTOList=this.questionList;
- if(cansave){
- uni.showLoading()
- loginService.savepj(this.inputForm).then(({
- data
- }) => {
- uni.hideLoading();
- uni.showToast({
- title: "评价成功!",
- icon: "success"
- });
- uni.redirectTo({
- url: '/pages/question/questionList?w=2'
- })
- }).catch((e) => {
- uni.hideLoading();
- })
- }else{
- uni.showToast({
- title: "评价意见还未填写!",
- icon: "success"
- });
- }
-
- },
- formSubmit: function(e) {
- //将交办单位的名称带出
- for (let i = 0; i < this.questionList.length; i++) {
-
- if (this.questionList[i].checkUserList != []) {
-
- this.questionList[i].checkUserListName=this.questionList[i].checkUserList.map((value) => {
- const item = this.pickerData.find((option) => option.value === value);
- return item ? item.label : value; // 如果找不到,返回 value
- })
- .join(",");
- }
- this.questionList[i].checkUserList=this.questionList[i].checkUserList.join(",");
-
-
- //附件处理
- this.questionList[i].des6 = [];
-
- //将原先附件放入
- if(this.questionList[i].picLists2.length>0){
- for (let ai = 0; ai < this.questionList[i].picLists2.length; ai++) {
- this.questionList[i].des6.push(this.questionList[i].picLists2[ai].uuid)
- }
- }
-
- this.questionList[i].picUrl.forEach(item => {
- this.questionList[i].des6.push(item.url)
-
- })
- this.questionList[i].des6 = this.questionList[i].des6.toString();
-
- }
-
- this.inputForm.dzfQuestionDetilDTOList=this.questionList;
- this.checkinput();
- },
- checkinput(){
- if(this.hasDuplicateQName(this.questionList)){
- uni.showToast({
- icon: 'none',
- title: '问题名称不能重复!'
- });
- }else{
-
-
-
-
- uni.showLoading()
- loginService.save2OpRecord(this.inputForm).then(({
- data
- }) => {
- uni.hideLoading();
- uni.showToast({
- title: "提交成功!",
- icon: "success"
- });
- uni.redirectTo({
- url: '/pages/question/questionList'
- })
- }).catch((e) => {
- uni.hideLoading();
- })
-
- }
-
-
- },
- hasDuplicateQName(array) {
- const seen = new Set();
- for (const item of array) {
- if (seen.has(item.qname)) {
- return true; // 找到重复的 qName
- }
- seen.add(item.qname);
- }
- return false; // 没有重复的 qName
- }
-
-
- }
- }
- </script>
- <style>
- /* .file-title) {
- font-size: 17px !important;
- } */
- input,textarea{
- color: #8799a3;
- }
- .input1{
- background-color: #ffffff;
- padding: 1upx 40upx;
- display: flex;
- align-items: center;
- padding-top: 20upx;
- border-bottom: 1px solid #eee;
- }
- .input1 .title {
- text-align: justify;
- padding-right: 30upx;
- font-size: 30upx;
- position: relative;
- height: 60upx;
- line-height: 60upx;
- border: ;
- }
- .title2{
- width: 75%;
- text-align: left;
- }
- .input2 {
- flex: 1;
- font-size: 30upx;
- color: #555;
- padding-right: 20upx;
- width: 100%;
- }
- .uni-input{
-
- }
-
- .textbg{
- display: flex;
- background-color: white;
- padding-top: 29rpx;
- }
- .text12{
- width: 200rpx;
- margin-left: 30rpx;
- color: #000000;
- font-size: 29rpx;
- }
-
- .text2{
- flex: 1;
- color: #000000;
- font-size: 30rpx;
- padding-bottom: 2rpx;
- }
- .text22{
- flex: 1;
- color: #666666;
- font-size: 29rpx;
- padding-bottom: 2rpx;
- align-self: flex-end;
- }
- .titlebg2{
- display: flex;
- background-color: white;
- padding-left: 22rpx;
- padding-top: 35rpx;
- padding-bottom: 25rpx;
- margin-bottom: 2rpx;
- }
- .titlet1{
- width: 7rpx;
- margin-top: 7rpx;
- margin-bottom: 7rpx;
- background-color: #2752eb;
- margin-right: 8rpx;
- }
- .titlet2{
- font-weight: 800;
- color: #2752eb;
- }
-
- .titlebb{
- color: #000000;
- font-weight: 800;
- padding-left: 40rpx;
- background-color: #ffffff;
- padding-top: 20rpx;
-
- }
- .titlebb2{
- color: #000000;
- padding-left: 40rpx;
- background-color: #ffffff;
- padding-top: 20rpx;
-
- }
- .flexC{
- display: flex;
- }
- .bt1{
- flex:1;
- margin: 30rpx;
- }
- .bt2{
- flex:1;
- margin: 30rpx;
- }
-
- .radiog{
- flex:1;
- margin: 10rpx;
- }
- .radiog2{
- display: flex;
- }
- .uni-list-cell{
- display: flex;
-
- }
- .cu-form-group{
- background-color: #ffffff;
- padding: 0.5px 22px;
- display: flex;
- align-items: center;
- min-height: 44px;
- }
- .modal-content {
- padding: 20px;
- }
-
- .record-item {
- background-color: #fff;
- border-radius: 10rpx;
- padding: 20rpx;
- box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
- display: flex;
- flex-direction: column;
- }
-
- .record-p1{
- width: 10px;
- height: 10px;
- border-radius: 100px;
- background-color: rgb(60, 156, 255);
- }
-
- .record-p2{
-
- width: 10px;
- height: 10px;
- border-radius: 100px;
- background-color: rgb(150, 151, 153);
- }
- .record-x1{
-
- width: 20rpx;
- height: 100%;
- background-color: rgb(150, 151, 153);
- }
-
- .record-name {
- font-size: 32rpx;
- font-weight: bold;
- margin-bottom: 10rpx;
- margin-left: 10rpx;
- }
-
- .record-time {
- font-size: 28rpx;
- margin-left: 10rpx;
- color: #666;
- margin-bottom: 10rpx;
- }
- .submit-time {
- font-size: 14px;
- color: #666;
- margin-left: 28rpx;
- position: relative;
-
- display: flex;
- flex-direction:column;
-
-
- }
-
- .submit-time::before {
- content: '';
- position: absolute;
- left: -10px;
- top: 0;
- height: 100%;
- width: 1px;
- background-color:rgb(150, 151, 153);
- }
-
- .attachment-item {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 10px;
- }
- </style>
|