checkInfo.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374
  1. <template>
  2. <rx-layout>
  3. <div slot="center" style>
  4. <div class="mainContent">
  5. <breadcrumb firstLevel="点评管理" lastLevel="审核详情" />
  6. <div class="body">
  7. <div class="content">
  8. <!-- 待点评内容 -->
  9. <div class="wait-check-info">
  10. <div>{{ showCheck ? '待审核点评内容' : '点评信息' }}</div>
  11. <a-collapse v-model="collapseCheckKey">
  12. <template #expandIcon>
  13. <a-icon type="none" />
  14. </template>
  15. <a-collapse-panel key="1">
  16. <!-- head -->
  17. <div v-if="parentInfo" slot="header" class="collapse-check">
  18. <div>
  19. <img :src="'/api/api-system/system/core/sysFile/previewFile?fileId='+parentInfo.createPhoto" style="width:20px;height:20px;border-radius:50%;" alt="">
  20. <span>{{ parentInfo.createName }}</span>
  21. </div>
  22. <div>
  23. {{ parentInfo.content }}
  24. </div>
  25. <div>
  26. <span>{{ parentInfo.createTime }}</span>
  27. </div>
  28. </div>
  29. <!-- body -->
  30. <div :slot="!parentInfo ? 'header' : null" style="padding-right: 6px;color: #1890ff;" class="collapse-check">
  31. <div>
  32. <img :src="'/api/api-system/system/core/sysFile/previewFile?fileId='+childrenInfo.createPhoto" style="width:20px;height:20px;border-radius:50%;" alt="">
  33. <span>{{ childrenInfo.createName }}</span>
  34. </div>
  35. <div>
  36. {{ childrenInfo.content }}
  37. </div>
  38. <div>
  39. <span>{{ childrenInfo.createTime }}</span>
  40. <span v-if="childrenInfo.state == 0" style="color:orange;">待审核</span>
  41. <span v-else-if="childrenInfo.state == 1" style="color:green;">审核通过</span>
  42. <span v-else style="color:red;">审核未通过</span>
  43. </div>
  44. </div>
  45. </a-collapse-panel>
  46. </a-collapse>
  47. </div>
  48. <a-divider />
  49. <!-- 点评审批 -->
  50. <template v-if="showCheck">
  51. <div class="album-check">
  52. <div>点评审批</div>
  53. <a-radio-group v-model="auditForm.result" style="margin-bottom: 16px;">
  54. <a-radio value="1">通过</a-radio>
  55. <a-radio value="0">驳回</a-radio>
  56. </a-radio-group>
  57. <a-input v-model="auditForm.remark" type="textarea" :autosize="{minRows: 3, maxRows: 6}" :maxLength="200" placeholder="请输入审批意见" />
  58. <a-row :gutter="24" type="flex" justify="end" style="margin-top: 20px;padding-right:12px;">
  59. <a-button style="margin-right: 20px;" @click="$router.back()">取消</a-button>
  60. <a-button type="primary" :loading="saveLoading" @click="handleSaveClick">保存</a-button>
  61. </a-row>
  62. </div>
  63. <a-divider />
  64. </template>
  65. <!-- 专辑基本信息 -->
  66. <div class="body-head">
  67. <div class="body-head-title">
  68. 专辑基本信息
  69. </div>
  70. <div class="body-head-details">
  71. <div>
  72. <span>专辑名称: {{ baseInfo.name }}</span>
  73. <span>专辑负责人: {{ baseInfo.owner }}</span>
  74. <span>创建时间: {{ baseInfo.createTime }}</span>
  75. </div>
  76. <div>
  77. <span>所属公司: {{ baseInfo.ownerCompany }}</span>
  78. <span>所属部门: {{ baseInfo.ownerDepartment }}</span>
  79. <span>专辑分类: {{ baseInfo.categoryName }}</span>
  80. </div>
  81. <div>
  82. <span>阅读数量: {{ baseInfo.views }}</span>
  83. <span>点评数量: {{ baseInfo.yelpTotal }}</span>
  84. <span>发布状态: {{ baseInfo.versionStateName }}</span>
  85. </div>
  86. </div>
  87. </div>
  88. <a-divider />
  89. <!-- 专辑审批记录 -->
  90. <div class="album-check-record">
  91. <div>专辑审批记录</div>
  92. <div>
  93. <a-table :columns="approverColumns" :data-source="approverData" :pagination="false">
  94. </a-table>
  95. </div>
  96. </div>
  97. <template v-if="!showCheck">
  98. <a-row :gutter="24" type="flex" justify="end" style="margin-top: 20px;padding-right:12px;">
  99. <a-button style="margin-right: 20px;" @click="$router.back()">取消</a-button>
  100. </a-row>
  101. </template>
  102. </div>
  103. </div>
  104. </div>
  105. </div>
  106. </rx-layout>
  107. </template>
  108. <script>
  109. import breadcrumb from '../components/breadcrumb'
  110. import api from '@/api/knowledge/album/checkInfo'
  111. import commentAuditApi from '@/api/knowledge/album/commentAudit'
  112. export default {
  113. name: 'checkInfo',
  114. components: {
  115. breadcrumb
  116. },
  117. data() {
  118. return {
  119. saveLoading: false,
  120. api,
  121. // 点评id
  122. pkId: '',
  123. showCheck: false,
  124. baseInfo: {
  125. name: '',
  126. owner: '',
  127. createTime: '',
  128. ownerCompany: '',
  129. ownerDepartment: '',
  130. categoryName: '',
  131. views: '',
  132. yelpTotal: '',
  133. versionStateName: '',
  134. },
  135. // 父级点评信息
  136. parentInfo: {},
  137. // 子集点评信息
  138. childrenInfo: {},
  139. collapseCheckKey: '1',
  140. approverColumns: [
  141. {
  142. title: '流程节点',
  143. align: 'center',
  144. dataIndex: 'name',
  145. },
  146. {
  147. title: '审批人',
  148. align: 'center',
  149. dataIndex: 'actualApproverName',
  150. },
  151. {
  152. title: '审批状态',
  153. align: 'center',
  154. dataIndex: 'approvalStatus',
  155. },
  156. {
  157. title: '审批备注',
  158. align: 'center',
  159. dataIndex: 'comment',
  160. },
  161. {
  162. title: '时间',
  163. align: 'center',
  164. dataIndex: 'approvalTime',
  165. },
  166. ],
  167. approverData: [],
  168. auditForm: {
  169. pkIds: [],
  170. result: '1',
  171. remark: ''
  172. }
  173. }
  174. },
  175. created() {
  176. this.auditForm = Object.assign({},this.$options.data().auditForm)
  177. // pkId state: 专辑状态 versionState: 版本状态
  178. this.pkId = this.$route.query.pkId
  179. this.showCheck = this.$route.query.showCheck
  180. // this.versionState = this.$route.query.versionState
  181. this.init()
  182. },
  183. methods: {
  184. async init() {
  185. let detailData = await api.info({pkId: this.pkId})
  186. let detailInfo = detailData.data
  187. this.parentInfo = detailInfo.yelp
  188. if(!this.parentInfo) {
  189. let collapseNode = document.querySelector('.ant-collapse-content')
  190. collapseNode.style.display = 'none'
  191. }
  192. this.childrenInfo = {
  193. createPhoto: detailInfo.createPhoto,
  194. createName: detailInfo.createName,
  195. content: detailInfo.content,
  196. createTime: detailInfo.createTime,
  197. state: detailInfo.state
  198. }
  199. this.baseInfo = { ...detailInfo.ablum }
  200. this.approverData = detailInfo.flows
  201. },
  202. handleSaveClick() {
  203. this.handleSaveClick = false
  204. this.auditForm.pkIds = [ this.pkId ]
  205. commentAuditApi.approve(this.auditForm).then(res => {
  206. if(res.code == 200) {
  207. setTimeout(() =>
  208. {
  209. this.$router.back()
  210. this.saveLoading = false
  211. }
  212. ,1000)
  213. }
  214. })
  215. }
  216. }
  217. }
  218. </script>
  219. <style lang="less" scoped>
  220. @gary: #f8f8f8;
  221. @white: #fff;
  222. @fontSize: 17px;
  223. .mainContent {
  224. min-height: 100%;
  225. width: 100%;
  226. padding: 40px;
  227. background: #f8f8f8;
  228. position: relative;
  229. .ant-breadcrumb {
  230. position:absolute;
  231. top:10px;
  232. }
  233. .body {
  234. height: 100%;
  235. background: @white;
  236. .content {
  237. height: 100%;
  238. background: @white;
  239. padding: 20px 15px 20px 40px;
  240. .wait-check-info {
  241. >div:first-child {
  242. font-size: @fontSize;
  243. margin-bottom: 20px;
  244. }
  245. .collapse-check {
  246. padding-right: 20px;
  247. >div:nth-child(1) {
  248. display: flex;
  249. align-items: center;
  250. img {
  251. width:20px;
  252. height:20px;
  253. border-radius:50%;
  254. }
  255. span {
  256. margin-left: 15px;
  257. }
  258. }
  259. >div:nth-child(2) {
  260. margin: 10px 0 15px;
  261. }
  262. >div:nth-child(3) {
  263. display: flex;
  264. justify-content: space-between;
  265. align-items: flex-start;
  266. >span:nth-child(2) {
  267. cursor: pointer;
  268. }
  269. }
  270. }
  271. }
  272. .album-check {
  273. width: 95%;
  274. >div:first-child {
  275. font-size: @fontSize;
  276. margin-bottom: 20px;
  277. }
  278. }
  279. .body-head {
  280. height: 100%;
  281. background: @white;
  282. .body-head-title {
  283. font-size: @fontSize;
  284. }
  285. .body-head-details {
  286. margin-top: 10px;
  287. div {
  288. height: 40px;
  289. line-height: 40px;
  290. display: flex;
  291. span {
  292. display: inline-block;
  293. width: 100%;
  294. white-space: pre-line;
  295. }
  296. }
  297. }
  298. }
  299. .album-check-record {
  300. >div:first-child {
  301. font-size: @fontSize;
  302. margin-bottom: 20px;
  303. }
  304. >div:last-child {
  305. width: 70%;
  306. }
  307. }
  308. }
  309. }
  310. }
  311. .clearBtn {
  312. background: none;
  313. color: #3294F7;
  314. text-shadow: none;
  315. padding: 0px 6px;
  316. border: none;
  317. box-shadow: none;
  318. }
  319. </style>
  320. <style scoped>
  321. /deep/.ant-btn > .anticon + span {
  322. margin-left: 0;
  323. }
  324. /deep/ .ant-tabs-bar {
  325. padding-left: 0;
  326. }
  327. /deep/ .ant-collapse {
  328. border-radius: 0px;
  329. }
  330. /deep/ .ant-collapse > .ant-collapse-item > .ant-collapse-header .ant-collapse-arrow {
  331. top: 24px;
  332. }
  333. /deep/ .ant-collapse-content {
  334. border: none;
  335. }
  336. /deep/ .ant-collapse-content > .ant-collapse-content-box {
  337. padding: 20px 30px 20px 50px;
  338. }
  339. /deep/ .ant-input {
  340. border-radius: 0;
  341. }
  342. /deep/ .ant-pagination {
  343. margin: 1px;
  344. }
  345. /deep/.ant-table-thead > tr > th {
  346. text-align: center;
  347. height: 54px;
  348. }
  349. /deep/ .ant-table-tbody > tr > td {
  350. height: 54px;
  351. }
  352. </style>