toExamine.vue 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318
  1. <template>
  2. <!-- 笔记审核 -->
  3. <view class="container to-examine" v-if="detailDataForm.HasPermission == 1">
  4. <view class="content-item">
  5. <view class="author-name">
  6. <view class="img-box">
  7. <image :src="detailDataForm.HeadImg" @click="goDetailPages"></image>
  8. </view>
  9. <text style="margin-left: 10rpx">{{ detailDataForm.NickName }}</text>
  10. </view>
  11. <view class="type-time">
  12. <view class="type"> {{ detailDataForm.Type == 1 ? "笔 记" : "观 点" }} </view>
  13. <view class="time">{{ detailDataForm.PublishTime }}</view>
  14. </view>
  15. <view class="title-item global_title"> {{ detailDataForm.Title }}</view>
  16. <view class="text-conten">
  17. <mp-html :content="detailDataForm.Content" />
  18. </view>
  19. <block v-if="detailDataForm.Docs && detailDataForm.Docs.length > 0">
  20. <view @click="goFilePages(item)" class="file-item text_oneLine" v-for="(item, index) in detailDataForm.Docs" :key="index"> <image :src="item.DocIcon"></image> {{ item.DocName }} </view>
  21. </block>
  22. <view class="image-conten">
  23. <image v-for="key in dataProcessing(detailDataForm.ImgUrl)" :key="key" :src="key" @click="previewImageMediahandler(key)"></image>
  24. </view>
  25. <view class="lable-conten">
  26. <view class="item" v-for="key in dataProcessing(detailDataForm.Tags)" :key="key">{{ key }}</view>
  27. </view>
  28. <block v-if="detailDataForm.IsShowExamine">
  29. <image v-if="detailDataForm.ExamineStatus == 3" class="label-image" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/pass_through.png"></image>
  30. <image v-if="detailDataForm.ExamineStatus == 4" class="label-image" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/overrule_icon.png"></image>
  31. </block>
  32. </view>
  33. <view class="bottom-btn" v-if="detailDataForm.ExamineStatus == 2 && isShow">
  34. <view @click="rejectTextShow = true">驳回</view>
  35. <view @click="passRhrouhg">通过</view>
  36. </view>
  37. <u-modal
  38. v-model="rejectTextShow"
  39. :show-title="false"
  40. show-cancel-button
  41. confirm-text="确定"
  42. cancel-text="取消"
  43. :content-style="{ fontSize: '32rpx' }"
  44. :cancel-style="{ borderRight: '1rpx solid #EBEBEB' }"
  45. :confirm-style="{ fontWeight: '700' }"
  46. @confirm="confirmModal"
  47. @cancel="cancelModal"
  48. >
  49. <view class="slot-content slot-content-text">
  50. <text class="add-lable-txt">驳回理由</text>
  51. <input v-model="rejectText" placeholder="请输入驳回理由" />
  52. </view>
  53. </u-modal>
  54. <Loading />
  55. </view>
  56. <view class="nodata" v-else>
  57. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/act_search.png" mode="" class="nodata_ico"></image>
  58. <text>报告加急审核中,请耐心等待~</text>
  59. </view>
  60. </template>
  61. <script>
  62. import { purchaserApi } from "@/config/api";
  63. export default {
  64. data() {
  65. return {
  66. rejectTextShow: false,
  67. rejectText: "",
  68. detailDataForm: "",
  69. detailId: 0,
  70. isShow: false,
  71. };
  72. },
  73. methods: {
  74. previewImageMediahandler(key) {
  75. uni.previewImage({
  76. urls: [key], //查看图片的数组
  77. });
  78. },
  79. passRhrouhg() {
  80. uni.showModal({
  81. title: "提醒",
  82. content: "确定通过此内容在小程序展示吗?",
  83. confirmColor: "#376cbb",
  84. cancelColor: "#606266",
  85. success: async (res) => {
  86. if (res.confirm) {
  87. const res = await purchaserApi.yanxuanSpecialEnable({
  88. Id: this.detailId,
  89. Status: 1, //1通过2驳回
  90. });
  91. if (res.Ret === 200) {
  92. this.$util.toast("审核通过");
  93. uni.navigateBack({
  94. fail() {
  95. uni.navigateTo({
  96. url: "/pages-purchaser/specialColumn/specialColumn",
  97. });
  98. },
  99. });
  100. }
  101. }
  102. },
  103. });
  104. },
  105. // 数据处理
  106. dataProcessing(item) {
  107. return item ? item.split(",") : [];
  108. },
  109. // 弹框关闭事件
  110. cancelModal() {
  111. this.rejectTextShow = false;
  112. this.rejectText = "";
  113. },
  114. // 弹框确定事件
  115. async confirmModal() {
  116. const res = await purchaserApi.yanxuanSpecialEnable({
  117. Id: this.detailId,
  118. Status: 2, //1通过2驳回
  119. Reason: this.rejectText,
  120. });
  121. if (res.Ret === 200) {
  122. this.cancelModal();
  123. uni.navigateBack({
  124. fail() {
  125. uni.navigateTo({
  126. url: "/pages-purchaser/specialColumn/specialColumn",
  127. });
  128. },
  129. });
  130. }
  131. },
  132. // 获取专栏详情
  133. async getDetaliData() {
  134. const res = await purchaserApi.yanxuanSpecialDetail({
  135. Id: this.detailId,
  136. IsSendWx: 1,
  137. });
  138. if (res.Ret === 200) {
  139. this.detailDataForm = res.Data;
  140. }
  141. },
  142. // 去往预览文件
  143. goFilePages(item) {
  144. wx.downloadFile({
  145. // 示例 url,并非真实存在
  146. url: item.DocUrl,
  147. success: function (res) {
  148. const filePath = res.tempFilePath;
  149. wx.openDocument({
  150. filePath: filePath,
  151. });
  152. },
  153. });
  154. },
  155. goDetailPages() {
  156. uni.navigateTo({ url: "/pages-purchaser/columnDetail/columnDetail?id=" + this.detailDataForm.UserId });
  157. },
  158. },
  159. onLoad(options) {
  160. this.detailId = Number(options.id) || 0;
  161. this.isShow = options.isMessage == "模板" ? true : false;
  162. this.detailId > 0 && this.getDetaliData();
  163. },
  164. };
  165. </script>
  166. <style lang="scss" scope>
  167. .to-examine {
  168. padding: 30rpx;
  169. background: $uni-bg-color;
  170. .content-item {
  171. position: relative;
  172. padding: 40rpx;
  173. background-color: #fff;
  174. border-radius: 16rpx;
  175. .type-time {
  176. display: flex;
  177. align-items: center;
  178. justify-content: space-between;
  179. color: #666666;
  180. .type {
  181. width: 110rpx;
  182. height: 42rpx;
  183. line-height: 42rpx;
  184. text-align: center;
  185. border-radius: 38rpx;
  186. color: #928563;
  187. background-color: #fff6de;
  188. font-weight: 500;
  189. }
  190. }
  191. .title-item {
  192. margin: 10rpx 0 20rpx;
  193. line-height: 46rpx;
  194. }
  195. .text-conten {
  196. font-size: 32rpx;
  197. line-height: 44rpx;
  198. }
  199. .file-item {
  200. width: 100%;
  201. height: 42rpx;
  202. margin: 20rpx 0;
  203. display: flex;
  204. align-items: center;
  205. background-color: #f8f8fa;
  206. color: #376cbb;
  207. image {
  208. margin-right: 15rpx;
  209. width: 27rpx;
  210. height: 27rpx;
  211. }
  212. }
  213. .image-conten {
  214. display: flex;
  215. flex-wrap: wrap;
  216. image {
  217. width: 144rpx;
  218. height: 144rpx;
  219. margin-right: 20rpx;
  220. }
  221. }
  222. .lable-conten {
  223. display: flex;
  224. flex-wrap: wrap;
  225. margin: 20rpx 0;
  226. font-size: 24rpx;
  227. .item {
  228. display: flex;
  229. align-items: center;
  230. height: 34rpx;
  231. border-radius: 44rpx;
  232. padding: 0 35rpx;
  233. background-color: #f0f1f3;
  234. margin: 0 20rpx 20rpx 0;
  235. }
  236. }
  237. .collect-conten {
  238. display: flex;
  239. justify-content: flex-end;
  240. align-items: center;
  241. color: #666666;
  242. image {
  243. width: 27rpx;
  244. height: 26rpx;
  245. margin-right: 8rpx;
  246. }
  247. }
  248. .author-name {
  249. display: flex;
  250. align-items: center;
  251. margin-bottom: 50rpx;
  252. .img-box {
  253. width: 48rpx;
  254. height: 48rpx;
  255. overflow: hidden;
  256. font-size: 28rpx;
  257. color: #333;
  258. image {
  259. width: 100%;
  260. height: 100%;
  261. }
  262. }
  263. }
  264. }
  265. .bottom-btn {
  266. position: fixed;
  267. bottom: 0;
  268. left: 0;
  269. width: 100%;
  270. background-color: #fff;
  271. padding: 48rpx 25rpx;
  272. padding-bottom: constant(safe-area-inset-bottom);
  273. padding-bottom: env(safe-area-inset-bottom);
  274. display: flex;
  275. view {
  276. width: 345rpx;
  277. height: 84rpx;
  278. display: flex;
  279. align-items: center;
  280. justify-content: center;
  281. border-radius: 9rpx;
  282. background-color: #2ba471;
  283. color: #fff;
  284. font-weight: 600;
  285. }
  286. view:nth-child(1) {
  287. background-color: #d54941;
  288. margin-right: 12rpx;
  289. }
  290. }
  291. .add-lable-txt {
  292. color: #000;
  293. font-size: 36rpx;
  294. flex-wrap: 600;
  295. margin-bottom: 30rpx;
  296. width: 100%;
  297. text-align: center;
  298. }
  299. .slot-content-text {
  300. text-align: left;
  301. input {
  302. height: 96rpx;
  303. background-color: #f8f8fa;
  304. }
  305. }
  306. .label-image {
  307. position: absolute;
  308. top: 0;
  309. right: 0;
  310. z-index: 9;
  311. width: 222rpx;
  312. height: 222rpx;
  313. }
  314. }
  315. </style>