popup.vue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056
  1. <template>
  2. <view>
  3. <!-- 弹窗 -->
  4. <view class="bgbox" @click="getClose" v-if="type"></view>
  5. <!-- 弹窗 -->
  6. <view class="fixedbox" v-if="type==1">
  7. <image :src="closeimg" class="choseimg" @click="getClose"></image>
  8. <view class="top">
  9. 暂缓/销号
  10. </view>
  11. <view class="boxs">
  12. <view class="box">
  13. <view class="flexcc boxcen" :class="zanflag?'act':''" @click="zanflag=true">
  14. <image :src="checkimg" v-if="zanflag"></image>
  15. <image :src="checknimg" v-else></image>
  16. <view>暂缓</view>
  17. </view>
  18. <view class="flexcc boxcen" :class="zanflag?'':'act'" @click="zanflag=false">
  19. <image :src="checknimg" v-if="zanflag"></image>
  20. <image :src="checkimg" v-else></image>
  21. <view>销号</view>
  22. </view>
  23. </view>
  24. </view>
  25. <view class="fixedbtn" @click="getSubmit">提交</view>
  26. </view>
  27. <!-- 审核意见 -->
  28. <view class="fixedbox" v-if="type==2">
  29. <image :src="closeimg" class="choseimg" @click="getClose"></image>
  30. <view class="top">审核意见</view>
  31. <view class="boxs">
  32. <view class="mb30">
  33. <view class="f16 fw mb10">是否通过</view>
  34. <view class="flexc">
  35. <view class="flexc boxcen" :class="shenflag?'act':''" @click="shenflag=true">
  36. <image :src="gcheckimg" v-if="shenflag"></image>
  37. <image :src="checknimg" v-else></image>
  38. <view :class="shenflag?'co28':''">通过</view>
  39. </view>
  40. <view class="flexc boxcen" :class="shenflag?'':'act'" @click="shenflag=false">
  41. <image :src="checknimg" v-if="shenflag"></image>
  42. <image :src="gcheckimg" v-else></image>
  43. <view :class="shenflag?'':'co28'">不通过</view>
  44. </view>
  45. </view>
  46. </view>
  47. <view class="flexcj mb16">
  48. <view class="f16 fw">反馈意见</view>
  49. <view class="flexc speech" @click="getSeep">
  50. <image :src="speechimgs"></image>
  51. <view>语音输入</view>
  52. </view>
  53. </view>
  54. <textarea @blur="getBlur" style="height: 256rpx;" v-model="psnr" placeholder="选择不通过必须填写反馈意见,限1000 字内…" maxlength="1000" class="textar"></textarea>
  55. </view>
  56. <view class="fixedbtn" @click="getyjSubmit">提交</view>
  57. </view>
  58. <!-- 批示弹窗 -->
  59. <view class="fixedbox" v-if="type==3">
  60. <image :src="closeimg" class="choseimg" @click="getClose"></image>
  61. <view class="top">批示</view>
  62. <view class="chebox" v-if="status=='update'&&checkPermi(['system:ldps:delete'])" @click="getDelFn">
  63. <image :src="cheimg"></image>
  64. <view>撤回</view>
  65. </view>
  66. <view class="boxs">
  67. <view class="flexcj mb16">
  68. <view class="f16 fw">批示详情</view>
  69. <view class="flexc speech" @click="getSeep">
  70. <image :src="speechimgs"></image>
  71. <view>语音输入</view>
  72. </view>
  73. </view>
  74. <textarea @blur="getBlur" v-model="psnr" placeholder="批示详情,限1000 字内…" maxlength="1000" class="textar"></textarea>
  75. </view>
  76. <!-- 判断权限 -->
  77. <block v-if="(status=='update'&&checkPermi(['system:ldps:update']))||(status=='add'&&checkPermi(['system:ldps:add']))">
  78. <view class="fixedbtn btn1" @click='getLinSubmit(0)'>暂存</view>
  79. <view class="fixedbtn" @click="getLinSubmit(1)">提交</view>
  80. </block>
  81. </view>
  82. <!-- 项目进展弹窗 -->
  83. <view class="fixedbox inform" v-if="type==4">
  84. <image :src="closeimg" class="choseimg" @click="getClose"></image>
  85. <view class="top">对接模块</view>
  86. <view class="boxs">
  87. <view class="flexcj mb16">
  88. <view class="f16 fw">对接情况</view>
  89. <view class="flexc speech" @click="getSeep">
  90. <image :src="speechimgs"></image>
  91. <view>语音输入</view>
  92. </view>
  93. </view>
  94. <textarea @blur="getBlur" v-model="psnr" placeholder="对接情况,限1000 字内…" maxlength="1000" class="textar mb30"></textarea>
  95. <view class="flexc infolist mb6">
  96. <view class="f16 fw c34 flex0 pr">附件</view>
  97. <view class="infolist_a co28">
  98. <!-- 上传附件 -->
  99. <lsj-upload
  100. ref="lsjUpload"
  101. childId="upload1"
  102. :width="width"
  103. :height="height"
  104. :option="option"
  105. :size="size"
  106. :formats="formats"
  107. :debug="debug"
  108. :instantly="instantly"
  109. @progress=""
  110. @uploadEnd="onuploadEnd" >
  111. <view class="btn" :style="{width: width,height: height}">选择附件</view>
  112. </lsj-upload>
  113. </view>
  114. </view>
  115. <!-- 附件展示 -->
  116. <view class=" cldelistbf" v-for="(ite,idx) in filelist" :key='idx'>
  117. <view class="flext f15 c6" @click="getDown(ite.path)">
  118. <view class="imgl"><image :src="wimg" ></image></view>
  119. <view>{{ite.fjName}}</view>
  120. </view>
  121. <!-- 删除 -->
  122. <view class="delimg flex0" @click.stop="getDelFj(idx)">
  123. <image :src="delimg"></image>
  124. </view>
  125. </view>
  126. <view class="infolist_b"><text>*</text>请上传大小不超过<text>100MB</text>格式为<text>doc/xls/ppt/txt/pdf/zip/rar/word</text>的文件</view>
  127. </view>
  128. <view class="fixedbtn" @click="getXmSubmit">提交</view>
  129. </view>
  130. <!-- 专班跟进 -->
  131. <view class="fixedbox" v-if="type==5">
  132. <image :src="closeimg" class="choseimg" @click="getClose"></image>
  133. <view class="top">专班跟进</view>
  134. <view class="boxs">
  135. <view class="mb30">
  136. <view class="f16 fw mb10">是否专班跟进</view>
  137. <view class="flexc">
  138. <view class="flexc boxcen" :class="zbflag?'act':''" @click="zbflag=true">
  139. <image :src="gcheckimg" v-if="zbflag"></image>
  140. <image :src="checknimg" v-else></image>
  141. <view :class="zbflag?'co28':''">是</view>
  142. </view>
  143. <view class="flexc boxcen" :class="zbflag?'':'act'" @click="zbflag=false">
  144. <image :src="checknimg" v-if="zbflag"></image>
  145. <image :src="gcheckimg" v-else></image>
  146. <view :class="zbflag?'':'co28'">否</view>
  147. </view>
  148. </view>
  149. </view>
  150. </view>
  151. <view class="fixedbtn" @click="getzbSubmit">提交</view>
  152. </view>
  153. <!-- 重点项目进展 -->
  154. <view class="fixedbox inform" v-if="type==6">
  155. <image :src="closeimg" class="choseimg" @click="getClose"></image>
  156. <view class="top">上报进度</view>
  157. <view class="boxs">
  158. <view class="flexcj mb16">
  159. <view class="f16 fw">项目进展情况</view>
  160. <view class="flexc speech" @click="getSeep">
  161. <image :src="speechimgs"></image>
  162. <view>语音输入</view>
  163. </view>
  164. </view>
  165. <textarea @blur="getBlur" style="height: 200rpx;" v-model="psnr" placeholder="项目进展情况,限1000 字内…" maxlength="1000" class="textar mb30"></textarea>
  166. <view class="flexcj mb16">
  167. <view class="f16 fw">施工力量</view>
  168. <view class="flexc speech" @click="getSeep('sgll')">
  169. <image :src="speechimgs"></image>
  170. <view>语音输入</view>
  171. </view>
  172. </view>
  173. <textarea @blur="getBlur" style="height: 200rpx;" v-model="sgll" placeholder="请输入施工力量(包含人、材、机)…" maxlength="1000" class="textar mb30"></textarea>
  174. <view class="flexc infolist mb6">
  175. <view class="f16 fw c34 flex0 pr">附件</view>
  176. <view class="infolist_a co28">
  177. <!-- 上传附件 -->
  178. <lsj-upload
  179. ref="lsjUpload"
  180. childId="upload1"
  181. :width="width"
  182. :height="height"
  183. :option="option"
  184. :size="size"
  185. :formats="formats"
  186. :debug="debug"
  187. :instantly="instantly"
  188. @progress=""
  189. @uploadEnd="onuploadEnd" >
  190. <view class="btn" :style="{width: width,height: height}">选择附件</view>
  191. </lsj-upload>
  192. </view>
  193. </view>
  194. <!-- 附件展示 -->
  195. <view class=" cldelistbf" v-for="(ite,idx) in filelist" :key='idx'>
  196. <view class="flext f15 c6" @click="getDown(ite.path)">
  197. <view class="imgl"><image :src="wimg" ></image></view>
  198. <view>{{ite.fjName}}</view>
  199. </view>
  200. <!-- 删除 -->
  201. <view class="delimg flex0" @click.stop="getDelFj(idx)">
  202. <image :src="delimg"></image>
  203. </view>
  204. </view>
  205. <view class="infolist_b"><text>*</text>请上传大小不超过<text>100MB</text>格式为<text>doc/xls/ppt/txt/pdf/zip/rar/word</text>的文件</view>
  206. </view>
  207. <view class="fixedbtn" @click="getXmSubmitzd">提交</view>
  208. </view>
  209. <!-- 重点领导批示 -->
  210. <view class="fixedbox" v-if="type==7">
  211. <image :src="closeimg" class="choseimg" @click="getClose"></image>
  212. <view class="top">批示</view>
  213. <view class="chebox" v-if="status=='update'&&checkPermi(['fgw:ldps:remove'])" @click="getDelFn">
  214. <image :src="cheimg"></image>
  215. <view>撤回</view>
  216. </view>
  217. <view class="boxs">
  218. <view class="flexcj mb16">
  219. <view class="f16 fw">批示详情</view>
  220. <view class="flexc speech" @click="getSeep">
  221. <image :src="speechimgs"></image>
  222. <view>语音输入</view>
  223. </view>
  224. </view>
  225. <textarea @blur="getBlur" v-model="psnr" placeholder="批示详情,限1000 字内…" maxlength="1000" class="textar"></textarea>
  226. </view>
  227. <!-- 判断权限 -->
  228. <block v-if="(status=='update'&&checkPermi(['fgw:ldps:edit']))||(status=='add'&&checkPermi(['fgw:ldps:add']))">
  229. <view class="fixedbtn btn1" @click='getLinSubmit(0)'>暂存</view>
  230. <view class="fixedbtn" @click="getLinSubmit(1)">提交</view>
  231. </block>
  232. </view>
  233. <!-- 重点项目 一键催报 -->
  234. <!-- 语音识别 -->
  235. <view class="bgbox bgvoice" v-if="voiceflag" @click="getClosevoice"></view>
  236. <view class="voice" v-if="voiceflag">
  237. <image :src="closeimg" class="choseimg" @click="getClosevoice"></image>
  238. <view v-if="isShow">
  239. <view v-if="sendLock" class="tip">
  240. <view class="txt">试试这样说</view>
  241. <view class="txt-bt">科技项目</view>
  242. </view>
  243. <view v-else>
  244. <!-- @click="resultClick" -->
  245. <view class="res-txt" >
  246. <!-- 实时翻译 -->
  247. <text :style="{
  248. color: (resultText == '正在识别中2...' || resultText == '未检测到语音,请重试') ?
  249. '#919098' :
  250. '#2979ff'}">
  251. {{resultText}}
  252. </text>
  253. <!-- <image v-if="resultText != '正在识别中.1..' && resultText != '未检测到语音,请重试'"
  254. src="/static/img/xiaoshou.png" mode="widthFix"></image> -->
  255. </view>
  256. </view>
  257. </view>
  258. <view v-else class="tip">
  259. <view v-if="!sendLock" class="tipbox">{{voicetext}}</view>
  260. <view v-html="text" class="txt" style="color: #8e8d9a;"></view>
  261. <view v-if="!sendLock" class="prompt-loader">
  262. <view class="em" :style="randomRgb()" v-for="(item,index) in 30" :key="index"></view>
  263. </view>
  264. <view v-else class="prompt-loader"></view>
  265. </view>
  266. <view class="btn" @longpress="handleRecordStart" @touchmove="handleTouchMove" @touchend="handleRecordStop">
  267. <view class="btn-cont">
  268. 长按开始语音搜索
  269. </view>
  270. </view>
  271. </view>
  272. </view>
  273. </template>
  274. <script>
  275. import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
  276. const recorderManager = uni.getRecorderManager();
  277. //播放录音
  278. const innerAudioContext = uni.createInnerAudioContext();
  279. innerAudioContext.autoplay = true;
  280. import config from '@/config'
  281. const baseUrl = config.baseUrl
  282. import { getToken } from '@/utils/auth'
  283. export default{
  284. props:{
  285. type: {
  286. type: Number,
  287. default () {
  288. return 0
  289. }
  290. },
  291. status:{
  292. type: String,
  293. default () {
  294. return 'add'
  295. }
  296. },
  297. iteminfo:{},
  298. xmjzinfo:{},
  299. },
  300. data(){
  301. return{
  302. //附件
  303. option: {
  304. // 上传服务器地址,需要替换为你的接口地址
  305. url: baseUrl+'/common/upload', // 该地址非真实路径,需替换为你项目自己的接口地址
  306. // 上传附件的key
  307. name: 'file',
  308. // 根据你接口需求自定义请求头,默认不要写content-type,让浏览器自适配
  309. header: {
  310. // 示例参数可删除
  311. 'Authorization': 'Bearer ' + getToken(),
  312. },
  313. // 根据你接口需求自定义body参数
  314. formData: {
  315. }
  316. },
  317. // 选择文件后是否立即自动上传,true=选择后立即上传
  318. instantly: true,
  319. // 必传宽高且宽高应与slot宽高保持一致
  320. width: '',
  321. height: '48rpx',
  322. // 限制允许上传的格式,空串=不限制,默认为空
  323. formats: 'doc,docx,xls,ppt,txt,pdf,zip,rar,word',
  324. // 文件上传大小限制
  325. size: 100,
  326. // 文件数量限制 默认10
  327. count: 5,
  328. // 文件回显列表
  329. files: new Map(),
  330. // 微信小程序Map对象for循环不显示,所以转成普通数组,不要问为什么,我也不知道
  331. wxFiles: [],
  332. // 是否打印日志
  333. debug: false,
  334. filelist:[],
  335. delimg:require("@/static/images/mine/del.png"),
  336. checkimg:require("@/static/images/mine/oicon.png"),
  337. checknimg:require("@/static/images/mine/jnicon.png"),
  338. gcheckimg:require("@/static/images/mine/jicon.png"),
  339. upimg:require('@/static/images/index/up.png'),
  340. wimg:require('@/static/images/index/wicon.png'),
  341. downimg:require('@/static/images/index/down.png'),
  342. speechimgs:require('@/static/images/index/speechs.png'),
  343. cheimg:require('@/static/images/index/cheicon.png'),
  344. closeimg:require('@/static/images/close.png'),
  345. wimg:require('@/static/images/index/wicon.png'),
  346. downimg:require('@/static/images/index/down.png'),
  347. zanflag:true,
  348. shenflag:true,
  349. shyj:'',//审核意见
  350. psnr:'',//领导批示
  351. jzqk:'',//项目进展
  352. sgll:'',//施工力量
  353. voiceflag:false,
  354. voiceToken: '',
  355. timer: null,
  356. text: '',
  357. resultText: '正在识别中...',
  358. startPoint: {},
  359. sendLock: true,
  360. isShow: true,
  361. adioFileData: '',
  362. adioSize: '',
  363. resContent: '',
  364. luyinStatus: true,
  365. voicetext:'',
  366. options: {}, // 语音转文字的设置
  367. partialResult:'',//临时语音
  368. zbflag:true,
  369. cursor:0,
  370. seeptype:'',//重点项目进展
  371. }
  372. },
  373. watch:{
  374. iteminfo(val){
  375. var that=this;
  376. that.psnr='';
  377. // console.log(val,0)
  378. if(val.zcpsnr){
  379. that.psnr=val.zcpsnr;
  380. }else if(val.psnr){
  381. that.psnr=val.psnr;
  382. }
  383. // console.log(that.psnr,8855)
  384. // if(val.psnr){
  385. // }else if(val.zcpsnr){
  386. // }
  387. },
  388. xmjzinfo(val){
  389. var that=this;
  390. if(that.type==6){
  391. that.psnr=val.jzqk||'';
  392. that.sgll=val.sgll||'';
  393. that.filelist=[];
  394. if(val.fjList&&val.fjList.length){
  395. that.filelist=JSON.parse(JSON.stringify(val.fjList))
  396. }
  397. }
  398. },
  399. sendLock(newVal, oldVal) {
  400. var that=this;
  401. recorderManager.onStop(res => {
  402. if (newVal) return //上锁不发送
  403. //解锁发送网络请求
  404. setTimeout(function(res){
  405. if(!that.voicetext&&!that.partialResult){
  406. that.resultText='未检测到语音,请重试'
  407. }else{
  408. that.resultText=that.voicetext||that.partialResult;
  409. var cursor=that.cursor;
  410. if(cursor==0){
  411. if(that.seeptype=='sgll'){
  412. that.sgll=that.sgll+that.resultText;
  413. }else{
  414. that.psnr=that.psnr+that.resultText;
  415. }
  416. }else{
  417. if(that.seeptype=='sgll'){
  418. that.sgll=that.sgll.slice(0,cursor)+that.resultText+that.sgll.slice(cursor);
  419. }else{
  420. that.psnr=that.psnr.slice(0,cursor)+that.resultText+that.psnr.slice(cursor);
  421. }
  422. }
  423. that.voiceflag=false;
  424. }
  425. that.sendLock=true;
  426. },1000)
  427. // console.log(res.tempFilePath, '获取录音文件')
  428. });
  429. },
  430. },
  431. onShow() {
  432. },
  433. mounted() {
  434. var that=this;
  435. // #ifdef APP-PLUS
  436. // 监听语音识别事件
  437. plus.speech.addEventListener('recognizing', this.onRecognizing, false);
  438. // #endif
  439. recorderManager.onStop(function(res) {
  440. //录音后的回调函数
  441. if(!this.sendLock){
  442. console.log(that.voicetext,that.partialResult)
  443. }
  444. console.log('recorder stop' + JSON.stringify(res));
  445. });
  446. },
  447. methods:{
  448. checkPermi, checkRole,
  449. getBlur(e){
  450. this.cursor=e.detail.cursor;
  451. },
  452. // 语音转文字
  453. getClosevoice(){
  454. this.voiceflag=false
  455. },
  456. onRecognizing(e){
  457. this.partialResult=e.partialResult;
  458. },
  459. // 录音转文字
  460. handleVoice() {
  461. // console.log('语音输入')
  462. let _this = this;
  463. // _this.psnr = '';
  464. this.options.engine = 'baidu'
  465. // this.options.timeout = 60 * 1000; //超时时间
  466. this.options.continue = true;//语音识别是否采用持续模式
  467. this.options.punctuation = true; // 是否需要标点符号
  468. this.options.userInterface = false; // 是否显示语音界面
  469. plus.speech.startRecognize(this.options, (s) => {
  470. _this.voicetext+=s;
  471. console.log(s,9)
  472. // plus.speech.stopRecognize(); // 关
  473. });
  474. },
  475. //长按录音方法
  476. handleRecordStart(e) {
  477. this.voicetext='';
  478. this.partialResult='';
  479. this.startPoint = e.touches[0]; //记录长按时开始点信息,后面用于计算上划取消时手指滑动的距离。
  480. recorderManager.start({duration: 60000}); //开始录音
  481. this.handleVoice()
  482. this.text = `<text style="color:#333">上划取消搜索</text>`;
  483. this.sendLock = false; //长按时不上锁。
  484. this.isShow = false;
  485. this.resultText = '正在识别中...';
  486. // 按钮
  487. // console.log(67)
  488. },
  489. //结束录音 (手指松开)时触发
  490. handleRecordStop(e) {
  491. var that=this;
  492. this.isShow = true;
  493. setTimeout(function(){
  494. plus.speech.stopRecognize();
  495. recorderManager.stop(); //结束录音
  496. },1300)
  497. },
  498. //上划取消搜索
  499. handleTouchMove(e) {
  500. let moveLenght = e.touches[e.touches.length - 1].clientY - this.startPoint.clientY;
  501. if (Math.abs(moveLenght) > 50) {
  502. this.text = `松开手指,<text style="color:#333">取消搜索</text>`;
  503. this.sendLock = true; //触发了上滑取消搜索,上锁
  504. this.isShow = false;
  505. } else {
  506. this.text = `<text style="color:#333">上划取消搜索</text>`;
  507. this.sendLock = false; //上划距离不足,可以搜索,不上锁
  508. this.isShow = false;
  509. }
  510. },
  511. //获取录音结果子传父
  512. resultClick() {
  513. if (this.resultText == '正在识别中...' || this.resultText == '未检测到语音,请重试') return;
  514. this.$emit('voiceResult', this.resultText)
  515. },
  516. //弹窗关闭之后的操作,点击遮罩层或关闭按钮
  517. // afterHide() {
  518. // this.sendLock = true;
  519. // this.$emit('closePopup');
  520. // clearInterval(this.timer);
  521. // this.resultText = '正在识别中...';
  522. // },
  523. randomRgb() {
  524. let R = Math.floor(Math.random() * 130 + 110);
  525. let G = Math.floor(Math.random() * 130 + 110);
  526. let B = Math.floor(Math.random() * 130 + 110);
  527. return {
  528. background: `rgb(${R},${G},${B}, 1)`
  529. };
  530. },
  531. // 语音转文字
  532. getSeep(e){
  533. this.seeptype=e||'';
  534. this.voicetext='';
  535. this.partialResult='';
  536. this.voiceflag=true;
  537. },
  538. ontStart() {
  539. // recorderManager.start();
  540. console.log('startRecognize');
  541. },
  542. onEnd() {
  543. // recorderManager.stop();
  544. console.log('endRecognize');
  545. },
  546. getClose(){
  547. this.$emit("getClose")
  548. },
  549. // 专班
  550. getzbSubmit(){
  551. var that=this;
  552. var zanstr='N'
  553. if(that.zbflag){
  554. zanstr='Y'
  555. }else{
  556. zanstr='N'
  557. }
  558. uni.showModal({
  559. title: '确认信息',
  560. content: "确认是否专班跟进",
  561. cancelText: '取消',
  562. confirmText: '确认',
  563. success: function(res) {
  564. if (res.confirm) {
  565. that.$emit("getzbSubmit",zanstr)
  566. } else if (res.cancel) {
  567. // console.log('用户点击取消');
  568. }
  569. }
  570. });
  571. },
  572. // 暂缓提交
  573. getSubmit(){
  574. var str='';
  575. var that=this;
  576. if(this.zanflag){
  577. str='暂缓'
  578. }else{
  579. str='销号'
  580. }
  581. uni.showModal({
  582. title: '确认'+str,
  583. content: "是否确认"+str+"该条线索",
  584. cancelText: '取消'+str,
  585. confirmText: '确认'+str,
  586. success: function(res) {
  587. if (res.confirm) {
  588. that.$emit("getzanFn",that.zanflag)
  589. } else if (res.cancel) {
  590. // console.log('用户点击取消');
  591. }
  592. }
  593. });
  594. },
  595. // 意见
  596. getyjSubmit(){
  597. var data={};
  598. var that=this;
  599. var str=""
  600. if(!this.shenflag){
  601. data.shjg='3';
  602. str='不通过'
  603. if(!this.psnr){
  604. this.$toast('请输入反馈意见')
  605. return
  606. }else{
  607. data.shyj=this.psnr
  608. }
  609. }else{
  610. str='通过'
  611. data.shjg='2',
  612. data.shyj=this.psnr
  613. }
  614. // 确认框
  615. uni.showModal({
  616. title: '确认审核',
  617. content: "是否确认"+str+'审核',
  618. cancelText: '取消',
  619. confirmText: '确认',
  620. success: function(res) {
  621. if (res.confirm) {
  622. that.$emit("getyjSubmit",data)
  623. } else if (res.cancel) {
  624. // console.log('用户点击取消');
  625. }
  626. }
  627. });
  628. },
  629. // 领导批示
  630. getLinSubmit(e){
  631. if(!this.psnr){
  632. this.$toast('请输入批示详情')
  633. }else{
  634. var newObj={
  635. type:e,
  636. psnr:this.psnr
  637. }
  638. this.$emit("getLinSubmit",newObj)
  639. }
  640. },
  641. //撤销批示
  642. getDelFn(){
  643. var that=this;
  644. uni.showModal({
  645. title: '确认撤回',
  646. content: "是否撤回该条批示",
  647. cancelText: '取消撤回',
  648. confirmText: '确认撤回',
  649. success: function(res) {
  650. if (res.confirm) {
  651. that.$emit("getldDelFn")
  652. } else if (res.cancel) {
  653. // console.log('用户点击取消');
  654. }
  655. }
  656. });
  657. },
  658. // 项目进展
  659. getXmSubmit(){
  660. var that=this;
  661. if(!this.psnr){
  662. this.$toast('请输入对接情况')
  663. }else{
  664. var obj={
  665. jzqk:this.psnr
  666. }
  667. obj.zsyzFjList=JSON.parse(JSON.stringify(this.filelist))
  668. uni.showModal({
  669. title: '确认添加',
  670. content: "是否添加对接情况",
  671. cancelText: '取消',
  672. confirmText: '确认',
  673. success: function(res) {
  674. if (res.confirm) {
  675. that.$emit("getXmSubmitFn",obj)
  676. } else if (res.cancel) {
  677. // console.log('用户点击取消');
  678. }
  679. }
  680. });
  681. }
  682. },
  683. //重点项目进展
  684. getXmSubmitzd(){
  685. var that=this;
  686. if(!this.psnr){
  687. this.$toast('请输入项目进展情况')
  688. }else{
  689. var obj={
  690. jzqk:this.psnr,
  691. sgll:this.sgll
  692. }
  693. obj.fjList=JSON.parse(JSON.stringify(this.filelist))
  694. uni.showModal({
  695. title: '确认添加',
  696. content: "是否确认添加上报进度",
  697. cancelText: '取消',
  698. confirmText: '确认',
  699. success: function(res) {
  700. if (res.confirm) {
  701. that.$emit("getXmSubmitFn",obj)
  702. } else if (res.cancel) {
  703. // console.log('用户点击取消');
  704. }
  705. }
  706. });
  707. }
  708. },
  709. // 某文件上传结束回调(成功失败都回调)
  710. onuploadEnd(item) {
  711. var newobj={}
  712. var responseText=JSON.parse(item.responseText)
  713. newobj.fjName=responseText.originalFilename;
  714. newobj.path=responseText.fileName;
  715. if(this.type==6){
  716. newobj.xmId=this.xmjzinfo.xmId;
  717. newobj.xmmc=this.xmjzinfo.xmmc;
  718. newobj.type=18;
  719. }
  720. this.filelist.push(newobj)
  721. },
  722. getDelFj(idx){
  723. this.filelist.splice(idx,1)
  724. },
  725. getDown(e){
  726. var url=baseUrl+e;
  727. uni.showLoading({
  728. title: '加载中'
  729. });
  730. uni.downloadFile({
  731. url: url,//文件的下载路径
  732. success(result) {
  733. uni.hideLoading()
  734. var filePath = result.tempFilePath;
  735. uni.openDocument({
  736. filePath: filePath,
  737. showMenu: true,
  738. success: function (res) {
  739. console.log('打开文档成功');
  740. }
  741. });
  742. },
  743. fail(res) {
  744. uni.hideLoading()
  745. }
  746. })
  747. },
  748. }
  749. }
  750. </script>
  751. <style lang="scss" scoped>
  752. // 弹窗
  753. .fixedbox{position: fixed;left: 66rpx;right: 66rpx;background: #fff;border-radius: 10rpx;min-height: 468rpx;top: 50%;transform: translateY(-50%);z-index: 20;padding: 48rpx 56rpx 68rpx;max-height: calc(100vh - 300rpx);overflow: auto;box-sizing: border-box;
  754. .choseimg{width: 34rpx;height: 34rpx;position: absolute;left: 36rpx;top: 54rpx;z-index: 22;}
  755. .chebox{position: absolute;right: 36rpx;top:54rpx;display: flex;align-items: center;
  756. image{width: 30rpx;height: 32rpx;margin-right: 12rpx;}
  757. view{font-size: 32rpx;font-weight: 500;color: #F13800;;}
  758. }
  759. .top{position: relative;text-align: center;font-size: 34rpx;font-weight: bold;color: #343434;}
  760. .boxs{padding: 60rpx 0;
  761. .box{display: flex;align-items: center;min-height:100rpx;}
  762. .boxcen{flex:1;
  763. &.act{
  764. view{color: #FF6400;}
  765. }
  766. image{width: 32rpx;height: 32rpx;margin-right: 20rpx;}
  767. view{font-size: 32rpx;font-weight: 500;
  768. color: #666666;}
  769. }
  770. // 语音
  771. .speech{
  772. image{width: 26rpx;height: 34rpx;margin-right: 10rpx;}
  773. view{font-size: 32rpx;font-weight: 500;color: #20ABCE;}
  774. }
  775. .textar{width: 100%;border: 2rpx solid #FF6400;border-radius: 10rpx;padding: 26rpx 30rpx;font-size: 30rpx;color: #343434;height: 376rpx;}
  776. }
  777. .fixedbtn{width:100%;height: 80rpx;background: #FF6400;
  778. border-radius: 10rpx;display: flex;align-items: center;justify-content: center;font-size: 32rpx;font-weight: bold;color: #FFFFFF;
  779. &.btn1{background-color: #20ACCF;margin-bottom: 36rpx;}
  780. }
  781. }
  782. .delimg{width: 40rpx;height:40rpx;margin-left: 16rpx;display: flex;align-items: center;justify-content: center;
  783. image{width: 30rpx;height: 30rpx;}
  784. }
  785. // 附件
  786. .infolist_a{height: 44rpx;flex: 1;text-align: right;font-size: 32rpx;color: #343434;}
  787. .bgvoice{z-index: 1900;}
  788. .choseimg{width: 34rpx;height: 34rpx;position: absolute;left: 36rpx;top: 54rpx;}
  789. .voice {
  790. min-height: 500rpx;
  791. padding: 100rpx 60rpx 0 60rpx;
  792. position: relative;
  793. background-color: #fff;
  794. position: fixed;
  795. left:0;right:0;bottom:0;z-index: 2000;
  796. padding-bottom: 180rpx;
  797. .res-txt {
  798. text-align: center;
  799. margin-top: 40rpx;
  800. font-size: 36rpx;
  801. color: #919098;
  802. image {
  803. display: block;
  804. margin: auto;
  805. margin-top: 10rpx;
  806. width: 60rpx;
  807. animation: bounce-down 2.6s linear infinite;
  808. }
  809. }
  810. .tip {
  811. margin-top: 15rpx;
  812. text-align: center;
  813. .txt {
  814. font-size: 36rpx;
  815. color: #151823;
  816. }
  817. .txt-bt {
  818. margin-top: 20rpx;
  819. color: #919098;
  820. }
  821. }
  822. .btn {
  823. width: 50%;
  824. height: 80rpx;
  825. display: flex;
  826. align-items: center;
  827. justify-content: center;
  828. color: #fff;
  829. border-radius: 50rpx;
  830. background: #3484fd;
  831. position: absolute;
  832. bottom: 80rpx;
  833. left: 50%;
  834. transform: translateX(-50%);
  835. .btn-cont {
  836. display: flex;
  837. align-items: center;
  838. }
  839. }
  840. }
  841. @-webkit-keyframes bounce-down {
  842. 25% {
  843. -webkit-transform: translateY(-10px);
  844. }
  845. 50%,
  846. 100% {
  847. -webkit-transform: translateY(0);
  848. }
  849. 75% {
  850. -webkit-transform: translateY(13px);
  851. }
  852. }
  853. .content{background-color: #f5f5f5;position: fixed;left: 0;right: 0;bottom: 0;z-index: 10000;height: 500rpx;}
  854. /* 语音动画 */
  855. .prompt-loader {
  856. width: 100%;
  857. height: 35px;
  858. display: flex;
  859. align-items: center;
  860. justify-content: space-between;
  861. margin: 30rpx auto;
  862. }
  863. .prompt-loader .em {
  864. height: 15%;
  865. width: 2px;
  866. float: left;
  867. display: block;
  868. background: #333333;
  869. }
  870. .prompt-loader .em:last-child {
  871. margin-right: 0px;
  872. }
  873. .prompt-loader .em:nth-child(1) {
  874. animation: load 1.3s 0.4s infinite linear;
  875. }
  876. .prompt-loader .em:nth-child(2) {
  877. animation: load 1.3s 0.2s infinite linear;
  878. }
  879. .prompt-loader .em:nth-child(3) {
  880. animation: load 1.3s 0.6s infinite linear;
  881. }
  882. .prompt-loader .em:nth-child(4) {
  883. animation: load 1.3s 0.8s infinite linear;
  884. }
  885. .prompt-loader .em:nth-child(5) {
  886. animation: load 1.3s 0.6s infinite linear;
  887. }
  888. .prompt-loader .em:nth-child(6) {
  889. animation: load 1.3s 0.4s infinite linear;
  890. }
  891. .prompt-loader .em:nth-child(7) {
  892. animation: load 1.3s 0.2s infinite linear;
  893. }
  894. .prompt-loader .em:nth-child(8) {
  895. animation: load 1.3s 0.6s infinite linear;
  896. }
  897. .prompt-loader .em:nth-child(9) {
  898. animation: load 1.3s 0.2s infinite linear;
  899. }
  900. .prompt-loader .em:nth-child(10) {
  901. animation: load 1.3s 0.4s infinite linear;
  902. }
  903. .prompt-loader .em:nth-child(11) {
  904. animation: load 1.3s 0.6s infinite linear;
  905. }
  906. .prompt-loader .em:nth-child(12) {
  907. animation: load 1.3s 0.8s infinite linear;
  908. }
  909. .prompt-loader .em:nth-child(13) {
  910. animation: load 1.3s 1s infinite linear;
  911. }
  912. .prompt-loader .em:nth-child(14) {
  913. animation: load 1.3s 0.2s infinite linear;
  914. }
  915. .prompt-loader .em:nth-child(15) {
  916. animation: load 1.3s 0.6s infinite linear;
  917. }
  918. .prompt-loader .em:nth-child(16) {
  919. animation: load 1.3s 0.6s infinite linear;
  920. }
  921. .prompt-loader .em:nth-child(17) {
  922. animation: load 1.3s 0.8s infinite linear;
  923. }
  924. .prompt-loader .em:nth-child(18) {
  925. animation: load 1.3s 0.2s infinite linear;
  926. }
  927. .prompt-loader .em:nth-child(19) {
  928. animation: load 1.3s 0.4s infinite linear;
  929. }
  930. .prompt-loader .em:nth-child(20) {
  931. animation: load 1.3s 0.6s infinite linear;
  932. }
  933. .prompt-loader .em:nth-child(21) {
  934. animation: load 1.3s 0.5s infinite linear;
  935. }
  936. .prompt-loader .em:nth-child(22) {
  937. animation: load 1.3s 0.2s infinite linear;
  938. }
  939. .prompt-loader .em:nth-child(23) {
  940. animation: load 1.3s 0.4s infinite linear;
  941. }
  942. .prompt-loader .em:nth-child(24) {
  943. animation: load 1.3s 0.6s infinite linear;
  944. }
  945. .prompt-loader .em:nth-child(25) {
  946. animation: load 1.3s 0.8s infinite linear;
  947. }
  948. .prompt-loader .em:nth-child(26) {
  949. animation: load 1.3s 0.2s infinite linear;
  950. }
  951. .prompt-loader .em:nth-child(27) {
  952. animation: load 1.3s 0.4s infinite linear;
  953. }
  954. .prompt-loader .em:nth-child(28) {
  955. animation: load 1.3s 0.1s infinite linear;
  956. }
  957. .prompt-loader .em:nth-child(29) {
  958. animation: load 1.3s 0.3s infinite linear;
  959. }
  960. .prompt-loader .em:nth-child(30) {
  961. animation: load 1.3s 0.6s infinite linear;
  962. }
  963. @keyframes load {
  964. 0% {
  965. height: 15%;
  966. }
  967. 50% {
  968. height: 100%;
  969. }
  970. 100% {
  971. height: 15%;
  972. }
  973. }
  974. </style>