meetingNotice.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736
  1. <template>
  2. <view class="oa-notice-detail">
  3. <view class="covers-body covers-uploader oa-uploader">
  4. <view class="input-title">
  5. <view class="contentTitle">会议时间:</view>
  6. <view class="contentDetail">{{content.meetingTime}}</view>
  7. </view>
  8. <view class="input-title">
  9. <view class="contentTitle">会议地点:</view>
  10. <view class="contentDetail">{{content.meetingPlace}}</view>
  11. </view>
  12. <view class="input-title">
  13. <view class="contentTitle">紧急程度:</view>
  14. <view class="contentDetail">{{content.ponderance}}</view>
  15. </view>
  16. <view class="input-title">
  17. <view class="contentTitle">会议类别:</view>
  18. <view class="contentDetail">{{content.securityClass}}</view>
  19. </view>
  20. <view class="input-title">
  21. <view class="contentTitle">承办股室:</view>
  22. <view class="contentDetail">{{content.office}}</view>
  23. </view>
  24. <view class="input-title" v-if="zhshow">
  25. <view class="contentTitle">出席领导:</view>
  26. <view class="contentDetail">{{content.referenceNumber}}</view>
  27. </view>
  28. <view class="input-title">
  29. <view class="contentTitle">会议内容:</view>
  30. <view class="contentDetail">{{content.fwtitle}}</view>
  31. </view>
  32. <!-- <view class="input-title">
  33. <view class="contentTitle">正&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;文:</view>
  34. <view class="uni-uploader contentDetail">
  35. <view class="uni-uploader-body" v-for="(item,i) in contentFile" :key="i">
  36. <view class="uni-uploader_files" @click="showFile(item.path)">
  37. <block>
  38. <view class="uni-uploader__file" style="position: relative; text-decoration: underline;">
  39. {{item.name}}
  40. </view>
  41. </block>
  42. </view>
  43. </view>
  44. </view>
  45. </view> -->
  46. <view class="input-title">
  47. <view class="contentTitle">其他事项:</view>
  48. <view class="contentDetail">{{content.opinion}}</view>
  49. </view>
  50. <view class="input-title" v-if="cardshow">
  51. <view class="contentTitle">附&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;件:</view>
  52. <view class="uni-uploader contentDetail">
  53. <view class="uni-uploader-body" v-for="(item,i) in cardFile" :key="i">
  54. <view class="uni-uploader_files" @click="showFile(item.path)">
  55. <block>
  56. <view class="uni-uploader__file" style="position: relative; text-decoration: underline;">
  57. {{item.name}}
  58. </view>
  59. </block>
  60. </view>
  61. </view>
  62. </view>
  63. </view>
  64. <view class="input-title" v-if="zgldshow">
  65. <view class="contentTitle">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注:</view>
  66. <view class="contentDetail">{{content.leaderOpinion}}</view>
  67. </view>
  68. <view class="input-title" v-if="!isme">
  69. <view class="contentTitle">发送人:</view>
  70. <view class="contentDetail">{{content.applyUser}}</view>
  71. </view>
  72. <view class="input-title" v-if="!isme">
  73. <view class="contentTitle">发送时间:</view>
  74. <view class="contentDetail">{{content.createTime}}</view>
  75. </view>
  76. <view class="input-title" v-if="!isme && examineshow">
  77. <view class="contentTitle">签收意见:</view>
  78. <view class="contentDetail">{{content.examineMe[0].examine}}</view>
  79. </view>
  80. <!-- 进度条 -->
  81. <view>
  82. <rfLoadProgress :progress="progress" :height="0"></rfLoadProgress>
  83. </view>
  84. <!-- <view class="input-title">
  85. <view class="contentTitle">附件:</view>
  86. <view class="uni-uploader contentDetail">
  87. <view class="uni-uploader-body" v-for="(item,i) in file" :key="i">
  88. <view class="uni-uploader_files" @click="showFile(item.path)">
  89. <block>
  90. <view class="uni-uploader__file" style="position: relative;">
  91. {{item.name}}
  92. </view>
  93. </block>
  94. </view>
  95. </view>
  96. </view>
  97. </view> -->
  98. </view>
  99. <view class="covers-body covers-uploader oa-uploader" v-if="ismine&&isme">
  100. <view class="input-title">签收详情:</view>
  101. <view class="uni-timeline">
  102. <view class="uni-timeline-item" :class="[
  103. item.signfor === '未签收' ? `text-${themeColor.name} uni-timeline-first-item` : 'uni-timeline-last-item']"
  104. v-for="(item, index) in approveDetail" :key="index">
  105. <view class="uni-timeline-item-content">
  106. <view v-if="item.signfor=='未签收'">
  107. {{ item.userName }} ----- {{ item.signfor }}
  108. </view>
  109. <view v-if="item.signfor=='已签收'">
  110. <!-- {{ item.userName }} ----- {{ item.signfor }} -->
  111. {{ item.userName }} 签收意见: {{ item.examine }}
  112. </view>
  113. <view class="datetime" v-if="item.signforDate!=null">
  114. {{ item.signforDate|time}}
  115. </view>
  116. </view>
  117. </view>
  118. </view>
  119. </view>
  120. <!-- <view class="footer" v-if="qianshou">
  121. <view class="input-title">
  122. <text>签收时间:</text>
  123. <text>{{content.updateTime|time}}</text>
  124. </view>
  125. </view> -->
  126. <!-- <view class="covers-body covers-uploader oa-uploader" v-else-if="ismine===false">
  127. <view v-for="(item, index) in radioList" :key="index">
  128. <button class="action-btn" :class="'text-' + themeColor.name" @tap="handleWorksOperation(item.key)">
  129. {{item.value}}
  130. </button>
  131. </view>
  132. </view> -->
  133. <view class="covers-body covers-uploader oa-uploader" v-else-if="ismine===false">
  134. <view v-for="(item, index) in radioList" :key="index">
  135. <button class="action-btn" :class="'text-' + themeColor.name" @tap="openDialog()">
  136. {{item.value}}
  137. </button>
  138. </view>
  139. </view>
  140. <popup-layer ref="popupRef">
  141. <view class="zidingyiBox">
  142. <view class="input-title">
  143. <view class="input-content">签收意见:</view>
  144. </view>
  145. <view class="input-item">
  146. <text class="tit"></text>
  147. <!-- <input v-model="examine" placeholder="请输入签收意见" style="height: 40px;line-height: 40px;"/> -->
  148. <textarea v-model="examine" placeholder="请输入签收意见">
  149. </textarea>
  150. </view>
  151. <view>
  152. <button class="action-btn action-btn1" @tap="handleWorksOperation()">
  153. 签收
  154. </button>
  155. </view>
  156. </view>
  157. </popup-layer>
  158. </view>
  159. </template>
  160. <script>
  161. import moment from '@/common/moment';
  162. import { toastMsg } from '@/pages/toast/toast.js';
  163. export default {
  164. data() {
  165. return {
  166. id: '',
  167. businessKey: '',
  168. taskid: '',
  169. definitionId:'',
  170. content: {},
  171. cardFile: {},
  172. zhshow:false,
  173. cardshow:false,
  174. zgldshow:false,
  175. examineshow:false,
  176. contentFile: {},
  177. file: {},
  178. qianshou: false,
  179. ismine: false,
  180. isme: false,
  181. approveDetail: [],
  182. radioList: [{
  183. "key": "/fw/updateInfo",
  184. "value": "签收"
  185. }],
  186. examine:'',
  187. progress:0,
  188. }
  189. },
  190. filters: {
  191. time(val) {
  192. var date = new Date(val);
  193. return moment(date).format('YYYY-MM-DD HH:mm:ss');
  194. },
  195. },
  196. onLoad: function(opt) {
  197. this.businessKey = opt.businessKey;
  198. if (opt.qianshou == "true") this.qianshou = true;
  199. if (opt.ismine == "true") this.ismine = true;
  200. if (opt.isme == "true") this.isme = true;
  201. this.initData();
  202. },
  203. methods: {
  204. // 数据初始化
  205. initData() {
  206. this.getContent();
  207. uni.setNavigationBarColor({
  208. frontColor: '#ffffff',
  209. backgroundColor: this.themeColor.color,
  210. animation: {
  211. duration: 400,
  212. timingFunc: 'easeIn'
  213. }
  214. })
  215. },
  216. getContent() {
  217. var url = this.$mConfig.baseUrl + '/fw/getFormData';
  218. var token = this.$preToken + ' ' + this.$store.state.accessToken;
  219. var that = this;
  220. this.$http.request({
  221. url: url,
  222. header: {
  223. 'content-type': 'application/json',
  224. 'Authorization': token
  225. },
  226. data: {
  227. formkey: this.businessKey
  228. }
  229. }).then(r => {
  230. if (r.code == "200") {
  231. that.content = r.data;
  232. that.id = r.data.id;
  233. that.taskid = r.data.taskid;
  234. that.definitionId = r.data.instanceid;
  235. if(r.data.ponderance=='1'){
  236. r.data.ponderance='普通'
  237. }else{
  238. r.data.ponderance='加急'
  239. }
  240. that.examineshow=false
  241. if(that.content.examineMe[0]){
  242. that.examineshow=true
  243. }
  244. //console.log(JSON.stringify(r.data))
  245. //字号
  246. that.zhshow=false
  247. if(r.data.referenceNumber){
  248. that.zhshow=true
  249. }
  250. that.zgldshow=false
  251. if(r.data.leaderOpinion){
  252. that.zgldshow=true
  253. }
  254. //阅文卡
  255. that.cardshow=false
  256. //console.log(JSON.stringify(r.data))
  257. if(r.data.cardFilePath!=undefined){
  258. that.cardshow=true
  259. var cardarr = [];
  260. var name=r.data.cardFileName.split(",")
  261. var path=r.data.cardFilePath.split(",")
  262. for (let i=0;i<name.length-1;i++){
  263. cardarr.push({
  264. "name": name[i],
  265. "path": path[i]
  266. })
  267. }
  268. /* cardarr.push({
  269. "name": r.data.cardFileInfo.fileName,
  270. "path": r.data.cardFileInfo.filePath+".png"
  271. }); */
  272. }
  273. /* var arr = [];
  274. arr.push({
  275. "name": r.data.fileInfo.fileName,
  276. "path": r.data.fileInfo.filePath+".pdf"
  277. }); */
  278. /* if (r.data.content) var contentfilelist = r.data.content.substr(0, r.data
  279. .content.length - 1).split(',');
  280. else var contentfilelist = [];
  281. for (var i = 0; i < contentfilelist.length; i++) {
  282. arr.push({
  283. "name": contentfilelist[i],
  284. "path": r.data.contentPath.substr(0, r.data.contentPath.length - 1).split(
  285. ',')[i]
  286. });
  287. } */
  288. that.cardFile = cardarr;
  289. //that.contentFile = arr;
  290. //附件文件
  291. /* var filearr = [];
  292. if (r.data.fileName) var filelist = r.data.fileName.substr(0, r.data.fileName
  293. .length - 1).split(',');
  294. else var filelist = [];
  295. for (var i = 0; i < filelist.length; i++) {
  296. filearr.push({
  297. "name": filelist[i],
  298. "path": r.data.filePath.substr(0, r.data.filePath.length - 1).split(',')[i]
  299. });
  300. }
  301. that.file = filearr; */
  302. } else {
  303. }
  304. }).then(res => {
  305. if (that.ismine) {
  306. var detailUrl = this.$mConfig.baseUrl + '/fw/signFor';
  307. this.$http.request({
  308. url: detailUrl,
  309. header: {
  310. 'content-type': 'application/json',
  311. 'Authorization': token
  312. },
  313. params: {
  314. businessKey: that.businessKey,
  315. id: that.definitionId
  316. }
  317. }).then(r => {
  318. if (r.code == "200") {
  319. that.approveDetail = r.rows;
  320. }
  321. })
  322. }
  323. })
  324. },
  325. openDialog() {
  326. this.$refs.popupRef.show();
  327. },
  328. showFile(path) {
  329. var type = path.split('.')[1].toLocaleLowerCase();
  330. var url = this.$mConfig.baseUrl + path;
  331. if (type == 'jpg' || type == 'jpeg' || type == 'bmp' || type == 'gif' || type == 'png') {
  332. console.log("2");
  333. var arr = [];
  334. arr.push(url);
  335. uni.previewImage({
  336. urls: arr
  337. });
  338. } else if (type == 'doc' || type == 'xls' || type == 'ppt' || type == 'pdf' || type == 'docx' || type ==
  339. 'xlsx' || type == 'pptx') {
  340. let watiting = plus.nativeUI.showWaiting("下载文件....");
  341. const downloadTask = uni.downloadFile({
  342. url: url,
  343. success: function(res) {
  344. var filePath = res.tempFilePath;
  345. uni.openDocument({
  346. filePath: filePath,
  347. success: function(res) {
  348. console.log(res);
  349. }
  350. });
  351. }
  352. });
  353. downloadTask.onProgressUpdate((res) => {undefined
  354. if(res.progress>90){undefined
  355. this.percent = res.progress
  356. }
  357. if(res.progress==100){undefined
  358. setTimeout(function () {undefined
  359. uni.hideLoading();
  360. /* uni.showToast({undefined,
  361. title:"保存成功",
  362. icon:"success"
  363. }); */
  364. }, 4000);
  365. }
  366. watiting.setTitle("下载进度:" + res.progress + "%");
  367. this.progress = res.progress;
  368. if (res.progress === 100) {
  369. watiting.close();
  370. this.progress = 0;
  371. }
  372. /* console.log('下载进度' + res.progress);
  373. console.log('已经下载的数据长度' + res.totalBytesWritten);
  374. console.log('预期需要下载的数据总长度' + res.totalBytesExpectedToWrite); */
  375. });
  376. } else {
  377. console.log(type)
  378. if(type=='rar' || type=='zip'){
  379. this.$mHelper.toast('请在电脑上下载查看压缩包');
  380. return;
  381. }
  382. uni.downloadFile({
  383. url: url,
  384. success: (res) => {
  385. if (res.statusCode === 200) {
  386. var tempFilePaths = res.tempFilePath;
  387. uni.saveFile({
  388. tempFilePath: tempFilePaths[0],
  389. success: function(res) {
  390. var savedFilePath = res.savedFilePath;
  391. toastMsg('success', "已保存文件至:" + savedFilePath);
  392. }
  393. });
  394. }
  395. }
  396. })
  397. }
  398. },
  399. handleWorksOperation(path) {
  400. if(this.examine==''){
  401. toastMsg('warning', '请填写签收意见')
  402. return false;
  403. }
  404. var url = this.$mConfig.baseUrl + "/fw/updateInfo";
  405. var qianshouUrl = this.$mConfig.baseUrl + '/fw/submitToDoItem/' + this.taskid+","+this.examine;
  406. var token = this.$preToken + ' ' + this.$store.state.accessToken;
  407. var that = this;
  408. /* this.$http.request({
  409. url: qianshouUrl,
  410. method: "PUT",
  411. header: {
  412. 'content-type': 'application/json',
  413. 'Authorization': token
  414. },
  415. data: {
  416. SelectUserType: "end",
  417. sendUser: "",
  418. sendUserRealName: ""
  419. }
  420. }).then(res => {
  421. if (res.code == "200") {
  422. toastMsg('success', '签收成功');
  423. that.qianshou = true;
  424. that.content.updateTime = new Date();
  425. that.ismine='';
  426. that.$refs.popupRef.close();
  427. that.getTabBarBadge();
  428. //重新查询列表数量
  429. }
  430. }) */
  431. this.$http.request({
  432. url: url,
  433. method: "POST",
  434. header: {
  435. 'content-type': 'application/json',
  436. 'Authorization': token
  437. },
  438. params: {
  439. id: that.id,
  440. taskid: that.definitionId
  441. }
  442. }).then(r => {
  443. if (r.code = "200") {
  444. this.$http.request({
  445. url: qianshouUrl,
  446. method: "PUT",
  447. header: {
  448. 'content-type': 'application/json',
  449. 'Authorization': token
  450. },
  451. data: {
  452. SelectUserType: "end",
  453. sendUser: "",
  454. sendUserRealName: ""
  455. }
  456. }).then(res => {
  457. if (res.code == "200") {
  458. /* that.qianshou = true;
  459. that.content.updateTime = new Date();
  460. that.ismine='';
  461. that.getTabBarBadge(); */
  462. //重新查询列表数量
  463. toastMsg('success', '签收成功');
  464. that.qianshou = true;
  465. that.content.updateTime = new Date();
  466. that.ismine='';
  467. that.$refs.popupRef.close();
  468. that.getTabBarBadge();
  469. //重新查询列表数量
  470. }
  471. })
  472. }
  473. })
  474. }
  475. }
  476. }
  477. </script>
  478. <style lang="scss">
  479. .oa-notice-detail {
  480. .uni-timeline {
  481. padding: $spacing-lg;
  482. background-color: $color-white;
  483. }
  484. .feedback-title {
  485. display: flex;
  486. flex-direction: row;
  487. justify-content: space-between;
  488. align-items: center;
  489. padding: $spacing-base;
  490. margin-top: $spacing-base;
  491. font-size: $font-base;
  492. }
  493. .feedback-star-view.feedback-title {
  494. justify-content: flex-start;
  495. margin: 0;
  496. }
  497. .feedback-quick {
  498. position: relative;
  499. padding-right: 40upx;
  500. .iconfont {
  501. font-size: $font-sm;
  502. }
  503. }
  504. .feedback-body {
  505. background: $color-white;
  506. padding: $spacing-sm $spacing-base;
  507. .gender-item {
  508. margin-right: 20upx;
  509. .gender-item-text {
  510. padding-left: 10upx;
  511. }
  512. radio .wx-radio-input.wx-radio-input-checked {
  513. background: $uni-color-primary;
  514. border-color: $uni-color-primary;
  515. }
  516. }
  517. }
  518. .feedback-textare {
  519. height: 200upx;
  520. font-size: 34upx;
  521. line-height: 50upx;
  522. width: 100%;
  523. box-sizing: border-box;
  524. padding: 20upx 30upx 0;
  525. }
  526. .footer {
  527. position: fixed;
  528. left: 0;
  529. top: 0;
  530. z-index: 98;
  531. width: 100%;
  532. background-color: $color-white;
  533. color: $font-color-base;
  534. box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.1);
  535. display: flex;
  536. justify-content: flex-end;
  537. align-items: center;
  538. padding: 15upx $spacing-base;
  539. .action-btn {
  540. font-size: $font-sm;
  541. margin: 0 0 0 15upx;
  542. padding: 0 $spacing-lg;
  543. text-align: center;
  544. height: 60upx;
  545. line-height: 60upx;
  546. }
  547. }
  548. .banner {
  549. overflow: hidden;
  550. position: relative;
  551. background-color: #ccc;
  552. .banner-img {
  553. height: 300upx;
  554. width: 100%;
  555. }
  556. .banner-title {
  557. max-height: 84upx;
  558. overflow: hidden;
  559. position: absolute;
  560. bottom: 0;
  561. width: 100%;
  562. font-size: 32upx;
  563. font-weight: 400;
  564. line-height: 42upx;
  565. color: white;
  566. z-index: 11;
  567. background-color: rgba(0, 0, 0, 0.25);
  568. padding: 4upx 20upx;
  569. }
  570. }
  571. .banner-title {
  572. padding: $spacing-lg $spacing-lg 0;
  573. font-size: $font-lg;
  574. }
  575. .article-meta {
  576. padding: 20upx 40upx;
  577. display: flex;
  578. flex-direction: row;
  579. justify-content: flex-start;
  580. color: gray;
  581. .article-text {
  582. font-size: 26upx;
  583. line-height: 50upx;
  584. margin: 0 20upx;
  585. }
  586. .article-author,
  587. .article-time {
  588. font-size: 30upx;
  589. }
  590. }
  591. .article-content {
  592. padding: 0 30upx;
  593. overflow: hidden;
  594. font-size: 30upx;
  595. margin-bottom: 30upx;
  596. }
  597. .input-title {
  598. display: flex;
  599. flex-direction: row;
  600. justify-content: flex-start;
  601. align-items: center;
  602. padding: $spacing-base;
  603. margin-top: $spacing-base;
  604. font-size: $font-base;
  605. width: 100%;
  606. }
  607. .contentTitle {
  608. width: 30%;
  609. }
  610. .contentDetail {
  611. width: 60%;
  612. }
  613. .input-body {
  614. background: $color-white;
  615. padding: $spacing-sm $spacing-base;
  616. }
  617. .covers-title {
  618. display: flex;
  619. flex-direction: row;
  620. justify-content: space-between;
  621. align-items: center;
  622. padding: $spacing-base;
  623. margin-top: $spacing-base;
  624. font-size: $font-base;
  625. }
  626. .covers-body {
  627. background: $color-white;
  628. padding: $spacing-sm $spacing-base;
  629. .gender-item {
  630. margin-right: 20upx;
  631. .gender-item-text {
  632. padding-left: 10upx;
  633. }
  634. radio .wx-radio-input.wx-radio-input-checked {
  635. background: $uni-color-primary;
  636. border-color: $uni-color-primary;
  637. }
  638. }
  639. }
  640. .covers-uploader {
  641. padding: 22upx 20upx;
  642. margin: 22upx 20upx;
  643. }
  644. .tit {
  645. height: 40px;
  646. width:7vw;
  647. text-align: right;
  648. float:left;
  649. line-height: 40px;
  650. font-size: $font-sm + 2upx;
  651. color: $font-color-base;
  652. }
  653. textarea {
  654. border: 1px solid #b9b9b9;
  655. height: 200rpx;
  656. width: 90%;
  657. margin-left:5%;
  658. word-wrap : break-word;
  659. }
  660. }
  661. .action-btn1{
  662. background: #0081FF !important;
  663. color: #fff;
  664. margin:50upx 30upx;
  665. }
  666. </style>