carry-spot-checks.vue 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929
  1. <template>
  2. <div>
  3. <HcDrawer v-model="isDrawer" to-id="carry-spot-checks-layout-target" ui="hc-carry-spot-checks-target" flex @close="onCarrySpotChecksDrawerClose">
  4. <div class="hc-carry-spot-checks-pdf">
  5. <div v-loading="pdfLoading" class="h-full">
  6. <HcPdf v-if="ishowPdf" :src="pdfUrl" />
  7. </div>
  8. <el-tooltip :disabled="!isBubble" content="展开/收起 右侧目录" placement="top">
  9. <div class="hc-csc-pdf-btn" @click="onCarryDataShow">
  10. <HcIcon v-show="isCarryDataShow" name="arrow-right-s" />
  11. <HcIcon v-show="!isCarryDataShow" name="arrow-left-s" />
  12. </div>
  13. </el-tooltip>
  14. </div>
  15. <div v-show="isCarryDataShow" class="hc-carry-spot-checks-data">
  16. <div class="hc-csc-switch">
  17. <HcNewSwitch :datas="tabTypeTab" :keys="tabTypeKey" :round="false" size="default" @change="tabTypeChange" />
  18. </div>
  19. <div class="hc-csc-info-box">
  20. <el-scrollbar>
  21. <div class="hc-info-text-item">
  22. <div class="title">案卷题名:</div>
  23. <div class="content">{{ fileInfo.name }}</div>
  24. </div>
  25. <div class="hc-info-text-item">
  26. <div class="title">
  27. <span>密</span>
  28. <span class="ml-7">级:</span>
  29. </div>
  30. <div class="content"> {{ fileInfo.secretLevelValue }}</div>
  31. </div>
  32. <div class="hc-info-text-item">
  33. <div class="title">保管期限:</div>
  34. <div class="content"> {{ fileInfo.storageTimeValue }}</div>
  35. </div>
  36. <div class="hc-info-text-item">
  37. <div class="title">卷内文件:</div>
  38. <div class="content"> {{ fileInfo.pageNumber }}</div>
  39. </div>
  40. <div class="hc-info-text-item">
  41. <div class="title">起止日期:</div>
  42. <div v-if="fileInfo?.endDate !== '' || fileInfo?.startDate !== null" class="content">
  43. {{ `${splitDate(fileInfo?.startDate)}~${splitDate(fileInfo?.endDate)}` }}
  44. </div>
  45. <div v-else class="content" />
  46. </div>
  47. <div class="hc-info-text-item">
  48. <div class="title">立卷单位:</div>
  49. <div class="content"> {{ fileInfo.unit }}</div>
  50. </div>
  51. </el-scrollbar>
  52. </div>
  53. <div :style="{ height: checkId ? '' : 'calc(100% - 363px)' }" class="hc-csc-data-box">
  54. <HcTable
  55. v-if="tabTypeKey === 'tab1'" :column="cscTableColumn1" :datas="cscTableData1"
  56. :index-style="{ width: 60 }" :is-index="false" :loading="cscTableLoading" is-new
  57. >
  58. <template #name="{ row }">
  59. <div :class="row.id === checkId ? 'bg-orange-400' : 'text-hover'" @click="changePdf(row)">{{ row?.fileName }}</div>
  60. </template>
  61. </HcTable>
  62. <HcTable v-if="tabTypeKey === 'tab2'" :column="cscTableColumn2" :datas="cscTableData2" :is-index="false" :loading="cscTableLoading" is-new>
  63. <template #name="{ row }">
  64. <div :class="row.id === 2 ? 'text-link' : 'text-hover'">{{ row?.name }}</div>
  65. </template>
  66. </HcTable>
  67. <HcTable
  68. v-if="tabTypeKey === 'tab3'" :column="cscTableColumn3" :datas="cscTableData3"
  69. :is-index="false" :loading="cscTableLoading" is-new
  70. >
  71. <template #name="{ row }">
  72. <div :class="row.id === 2 ? 'text-link' : 'text-hover'">{{ row?.name }}</div>
  73. </template>
  74. </HcTable>
  75. <HcTable
  76. v-if="tabTypeKey === 'tab4'" :column="cscTableColumn4" :datas="cscTableData4"
  77. :is-index="false" :loading="cscTableLoading" is-new
  78. >
  79. <template #name="{ row }">
  80. <div :class="row.id === 2 ? 'text-link' : 'text-hover'" class="hc-csc-associated-row">
  81. <el-tag effect="dark">{{ row?.tag }}</el-tag>
  82. <span class="ml-3">{{ row?.name }}</span>
  83. </div>
  84. </template>
  85. </HcTable>
  86. <MetaTable
  87. v-if="tabTypeKey === 'tab5'" :ishow-file="ishowFile"
  88. :loading="cscmetaTableLoading" :meta-data-table="cscmetaDataTabledata"
  89. />
  90. <HcTable
  91. v-if="tabTypeKey === 'tab6'" :column="cscTableColumn5" :datas="cscTableData5"
  92. :loading="cscTableLoading" is-new
  93. />
  94. <el-tooltip
  95. v-if="tabTypeKey === 'tab6' || tabTypeKey === 'tab5'" :disabled="!isBubble"
  96. content="使用弹窗查看数据"
  97. placement="top"
  98. >
  99. <div class="hc-table-info-btn" @click="cscTableDataModalShow">
  100. <HcIcon name="airplay" />
  101. </div>
  102. </el-tooltip>
  103. </div>
  104. <div v-if="checkId" class="hc-csc-action-box">
  105. <div class="header-box">
  106. <div class="title">抽检意见:</div>
  107. <!-- <div class="extra">
  108. <el-checkbox v-model="reform.type" class="size-xl">需要整改</el-checkbox>
  109. </div> -->
  110. </div>
  111. <div class="textarea-box">
  112. <div v-if="ishowAllopinion">
  113. <el-input
  114. v-model="reform.content" :autosize="{ minRows: 5 }" placeholder="请填写抽检意见" resize="none"
  115. type="textarea" @focus="contentClick"
  116. />
  117. </div>
  118. <div v-else>
  119. <el-input
  120. ref="saveTagInput" v-model="reform.myOpinion" :autosize="{ minRows: 5 }"
  121. placeholder="请填写抽检意见" resize="none" type="textarea"
  122. />
  123. </div>
  124. </div>
  125. <div class="btn-box">
  126. <el-button hc-btn style="height: 40px; padding: 0 15px;" type="warning" @click="onCarrySpotChecksDrawerClose">
  127. <HcIcon name="close" />
  128. <span>{{ closeText }}</span>
  129. </el-button>
  130. <el-button :loading="submitLoading" hc-btn type="primary" style="height: 40px; padding: 0 15px;" @click="submitOpinion">
  131. <HcIcon name="check" />
  132. <span>{{ checkText }}</span>
  133. </el-button>
  134. </div>
  135. </div>
  136. <div v-if="checkId.length == 0" class="btn-box" style="text-align: center;">
  137. <el-button hc-btn style="height: 40px; padding: 0 15px;" type="warning" @click="onCarrySpotChecksDrawerClose">
  138. <HcIcon name="close" />
  139. <span>取消查阅</span>
  140. </el-button>
  141. </div>
  142. </div>
  143. </HcDrawer>
  144. <!-- 使用弹窗查看数据 -->
  145. <hc-new-dialog
  146. v-model="cscTableDataModal" :footer="false" :title="cscTableDataTitle" is-table widths="1080px"
  147. @close="cscTableDataModalClose"
  148. >
  149. <MetaTable
  150. v-if="tabTypeKey === 'tab5'" :ishow-file="ishowFile"
  151. :loading="cscmetaTableLoading" :meta-data-table="cscmetaDataTabledata"
  152. />
  153. <HcTable
  154. v-if="tabTypeKey === 'tab6'" :column="cscTableColumn51" :datas="cscTableData5"
  155. :index-style="{ width: 60 }" :loading="cscTableLoading" is-new
  156. />
  157. </hc-new-dialog>
  158. </div>
  159. </template>
  160. <script setup>
  161. import { nextTick, onMounted, ref, watch } from 'vue'
  162. import { useAppStore } from '~src/store'
  163. import MetaTable from './meta-table.vue'
  164. import archiveQueryApi from '~api/using/query.js'
  165. import { getArrValue, getObjValue, getRandom } from 'js-fast-way'
  166. import tuningApi from '~api/archiveConfig/tuning.js'
  167. import initialgApi from '~api/initial/initial'
  168. //参数
  169. const props = defineProps({
  170. projectId: {
  171. type: [String, Number],
  172. default: '',
  173. },
  174. contractId: {
  175. type: [String, Number],
  176. default: '',
  177. },
  178. show: {
  179. type: Boolean,
  180. default: false,
  181. },
  182. closeText: {
  183. type: [String, Number],
  184. default: '取消查阅',
  185. },
  186. checkText: {
  187. type: [String, Number],
  188. default: '保存抽检意见',
  189. },
  190. fileId: {
  191. type: [String, Number],
  192. default: '', //案卷ID
  193. },
  194. fileInfo: {
  195. type: Object,
  196. default: () => ({}),
  197. },
  198. isOpinion: {
  199. type: Boolean,
  200. default: false,
  201. },
  202. currentId: {
  203. type: [String, Number],
  204. default: '',
  205. },
  206. })
  207. //事件
  208. const emit = defineEmits(['close', 'check'])
  209. const useAppState = useAppStore()
  210. //变量
  211. const projectId = ref(props.projectId)
  212. const contractId = ref(props.contractId)
  213. const isOpinion = ref(props.isOpinion)
  214. const isBubble = ref(useAppState.getBubble)
  215. const isDrawer = ref(props.show)
  216. const fileId = ref(props.fileId)//案卷ID
  217. const fileInfo = ref(props.fileInfo)//案卷ID
  218. const userInfo = ref(useAppState.getUserInfo)
  219. const currentId = ref(props.currentId)
  220. //监听
  221. watch(() => [
  222. props.show,
  223. useAppState.getBubble,
  224. props.fileId,
  225. props.fileInfo,
  226. props.projectId,
  227. props.isOpinion,
  228. props.currentId,
  229. ], ([show, bubble, FileId, FileInfo, ProjectId, isO, curId]) => {
  230. isDrawer.value = show
  231. isBubble.value = bubble
  232. fileId.value = FileId
  233. fileInfo.value = FileInfo
  234. projectId.value = ProjectId
  235. isOpinion.value = isO
  236. currentId.value = curId
  237. if (fileId.value && isDrawer.value) {
  238. getArchiveFileListData()
  239. // let url
  240. // viewPdf(fileId.value).then((res) => {
  241. // console.log(res, 'res')
  242. // url = res
  243. // pdfUrl.value = url
  244. // if (pdfUrl.value && pdfUrl?.value.length > 0) {
  245. // setTimeout(() => {
  246. // if (isDrawer.value) {
  247. // serReviewFile()
  248. // }
  249. // }, 30000)
  250. // }
  251. // })
  252. }
  253. if (isO) {
  254. // checkId.value = fileInfo.value.fileId || ''
  255. checkId.value = fileInfo.value.id || ''
  256. ishowAllopinion.value = true
  257. getopiniondata()
  258. } else {
  259. checkId.value = ''
  260. }
  261. })
  262. onMounted(() => {
  263. console.log(fileId.value, 'fileId.value')
  264. })
  265. //类型tab数据和相关处理
  266. const tabTypeKey = ref('tab1')
  267. const tabTypeTab = ref([
  268. { key: 'tab1', name: '卷内文件' },
  269. { key: 'tab2', name: '竣工资料' },
  270. { key: 'tab3', name: '计量资料' },
  271. { key: 'tab4', name: '关联资料' },
  272. { key: 'tab5', name: '元数据' },
  273. { key: 'tab6', name: '验签包' },
  274. ])
  275. const tabTypeChange = ({ key }) => {
  276. tabTypeKey.value = key
  277. }
  278. const cscTableLoading = ref(false)
  279. //卷内目录
  280. const cscTableColumn1 = [
  281. { key: 'name', name: '卷内文件题名', align: 'center' },
  282. ]
  283. const cscTableData1 = ref([])
  284. //获取卷内文件数据
  285. const getArchiveFileListData = async () => {
  286. cscTableLoading.value = true
  287. const { error, code, msg, data } = await archiveQueryApi.getArchiveFileList({
  288. id: fileId.value, //案卷id
  289. })
  290. cscTableLoading.value = false
  291. //处理返回数据
  292. if (!error && code === 200) {
  293. // fileInfo.value = data
  294. fileInfo.value.pageNumber = data.pageNumber
  295. fileInfo.value.storageTimeValue = data.storageTimeValue
  296. fileInfo.value.secretLevelValue = data.secretLevelValue
  297. fileInfo.value.endDate = data.endDate
  298. fileInfo.value.startDate = data.startDate
  299. fileInfo.value.name = data.name
  300. fileInfo.value.unit = data.unit
  301. cscTableData1.value = getArrValue(data['approvalFileList'])
  302. if (cscTableData1.value.length > 0) {
  303. checkmetaFileId.value = cscTableData1.value[0].id
  304. // pdfUrl.value = cscTableData1.value[0].pdfFileUrl
  305. let rawUrl = cscTableData1.value[0].pdfFileUrl
  306. const encodedUrl = encodeURIComponent(rawUrl)
  307. pdfUrl.value = encodedUrl
  308. if (pdfUrl.value && pdfUrl?.value.length > 0) {
  309. setTimeout(() => {
  310. if (isDrawer.value) {
  311. serReviewFile()
  312. }
  313. }, 30000)
  314. }
  315. checkId.value = cscTableData1.value[0].id
  316. getmetaInfo()
  317. }
  318. } else {
  319. cscTableData1.value = []
  320. pdfUrl.value = ''
  321. checkId.value = ''
  322. }
  323. }
  324. const ishowFile = ref(false)
  325. const pdfLoading = ref(false)
  326. const pdfUrl = ref('')
  327. const ishowPdf = ref(true)
  328. const checkId = ref('')
  329. const checkmetaFileId = ref('')
  330. const ishowAllopinion = ref(false)
  331. const saveTagInput = ref(null)
  332. const contentClick = () => {
  333. console.log(11111)
  334. ishowAllopinion.value = false
  335. nextTick(() => {
  336. saveTagInput.value?.focus()
  337. })
  338. }
  339. const changePdf = (row) => {
  340. console.log(row, 'row')
  341. ishowFile.value = true
  342. pdfLoading.value = false
  343. ishowPdf.value = false
  344. setTimeout(() => {
  345. ishowPdf.value = true
  346. }, 100)
  347. // pdfUrl.value = row['pdfFileUrl'] || ''
  348. let rawUrl = row['pdfFileUrl'] || ''
  349. const encodedUrl = encodeURIComponent(rawUrl)
  350. pdfUrl.value = encodedUrl
  351. checkId.value = row.id
  352. checkmetaFileId.value = row.id
  353. getmetaInfo()
  354. ishowAllopinion.value = true
  355. getopiniondata()
  356. if (pdfUrl.value && pdfUrl?.value.length > 0) {
  357. setTimeout(() => {
  358. if (isDrawer.value) {
  359. serReviewFile()
  360. }
  361. }, 30000)
  362. }
  363. }
  364. //设置为已查阅
  365. const serReviewFile = async () => {
  366. const { error, code, data, msg } = await initialgApi.updateInspectStatus({
  367. archiveId: fileId.value,
  368. projectId: projectId.value,
  369. conclusionId: currentId.value,
  370. })
  371. if (!error && code === 200) {
  372. window.$message.success(msg)
  373. } else {
  374. window.$message.error(msg)
  375. }
  376. }
  377. const opid = ref('')
  378. //获取抽检意见
  379. const getopiniondata = async () => {
  380. const { error, code, data, msg } = await initialgApi.getArchiveFileOpinion({
  381. fileId: checkId.value,
  382. projectId: projectId.value,
  383. conclusionId: currentId.value,
  384. })
  385. if (!error && code === 200) {
  386. console.log(data, 'data')
  387. let opiniondata = getObjValue(data)
  388. reform.value.content = opiniondata?.allOpinion
  389. // reform.value.type = opiniondata?.allOpinion?.length > 0 ? true : false
  390. reform.value.myOpinion = opiniondata?.opinion
  391. opid.value = opiniondata?.id
  392. }
  393. }
  394. //获取元数据信息
  395. //获取元数据
  396. const cscmetaTableLoading = ref(false)
  397. const cscmetaDataTabledata = ref([])
  398. const getmetaInfo = async (fileId) => {
  399. cscmetaTableLoading.value = true
  400. const { error, code, data } = await tuningApi.getMetadataFileByid({
  401. fileId: checkmetaFileId.value,
  402. })
  403. cscmetaTableLoading.value = false
  404. if (!error && code === 200) {
  405. cscmetaDataTabledata.value = getArrValue(data)
  406. } else {
  407. cscmetaDataTabledata.value = []
  408. }
  409. }
  410. //竣工资料
  411. const cscTableColumn2 = [
  412. { key: 'name', name: '竣工图资料', align: 'center' },
  413. ]
  414. const cscTableData2 = ref([
  415. // {id: 1, name: 'S6-3-2-Q-8-32 箱梁梁底支座垫石钢筋构造图111-箱梁梁底调平垫块及支座垫石钢筋构造图.pdf'},
  416. // {id: 2, name: 'J6-3-2-Q-8-34 桥墩一般构造图(1-9).pdf'},
  417. // {id: 3, name: 'S6-3-2-Q-8-32 箱梁梁底支座垫石钢筋构造图111-箱梁梁底调平垫块及支座垫石钢筋构造图.pdf'},
  418. // {id: 4, name: 'J6-3-2-Q-8-34 桥墩一般构造图(1-9).pdf'},
  419. // {id: 5, name: 'J6-3-2-Q-8-34 桥墩一般构造图(1-9).pdf'},
  420. // {id: 6, name: 'S6-3-2-Q-8-32 箱梁梁底支座垫石钢筋构造图111-箱梁梁底调平垫块及支座垫石钢筋构造图.pdf'},
  421. // {id: 7, name: 'S6-3-2-Q-8-32 箱梁梁底支座垫石钢筋构造图111-箱梁梁底调平垫块及支座垫石钢筋构造图.pdf'}
  422. ])
  423. //计量资料
  424. const cscTableColumn3 = [
  425. { key: 'name', name: '计量资料', align: 'center' },
  426. ]
  427. const cscTableData3 = ref([
  428. // {id: 1, name: 'ZB2-17.pdf'},
  429. // {id: 2, name: 'ZB2-18.pdf'},
  430. // {id: 3, name: 'ZB2-19.pdf'},
  431. // {id: 4, name: 'ZB2-20.pdf'},
  432. // {id: 5, name: 'ZB2-21.pdf'},
  433. // {id: 6, name: 'ZB2-22.pdf'},
  434. // {id: 7, name: 'ZB2-23.pdf'}
  435. ])
  436. //计量资料
  437. const cscTableColumn4 = [
  438. { key: 'name', name: '关联文件', align: 'center' },
  439. ]
  440. const cscTableData4 = ref([
  441. // {id: 1, name: 'xxxxxxxxxxxxxxxxxxx.pdf', tag: '开工'},
  442. // {id: 2, name: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.pdf', tag: '工序'},
  443. // {id: 3, name: 'xxxxxxxxxxxxxxxxxxxxxxxxxx.pdf', tag: '评定'},
  444. // {id: 4, name: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxx.pdf', tag: '交工'},
  445. // {id: 5, name: '', tag: '抽检'},
  446. // {id: 6, name: '', tag: '隐蔽'}
  447. ])
  448. //验签包
  449. const cscTableColumn5 = [
  450. { key: 'user', name: '签名者' },
  451. { key: 'time', name: '签名时间' },
  452. { key: 'val', name: '摘要' },
  453. ]
  454. const cscTableColumn51 = [
  455. { key: 'user', name: '签名者', width: 300 },
  456. { key: 'time', name: '签名时间', width: 200 },
  457. { key: 'val', name: '摘要' },
  458. ]
  459. const cscTableData5 = ref([
  460. // {
  461. // id: 1,
  462. // user: '051@王海军@0422431197502148151@1',
  463. // time: '2022-05-13 08:54:15',
  464. // val: '签名有效。由051@王海军@0422431197502148151@1签名。自应用本签名以来,文档未被修改过。签名者身份有效。'
  465. // },
  466. // {
  467. // id: 2,
  468. // user: '051@王海军@0422431197502148151@1',
  469. // time: '2022-05-13 08:54:15',
  470. // val: '签名有效。由051@王海军@0422431197502148151@1签名。自应用本签名以来,文档未被修改过。签名者身份有效。'
  471. // },
  472. // {
  473. // id: 3,
  474. // user: '051@王海军@0422431197502148151@1',
  475. // time: '2022-05-13 08:54:15',
  476. // val: '签名有效。由051@王海军@0422431197502148151@1签名。自应用本签名以来,文档未被修改过。签名者身份有效。'
  477. // },
  478. // {
  479. // id: 4,
  480. // user: '051@王海军@0422431197502148151@1',
  481. // time: '2022-05-13 08:54:15',
  482. // val: '签名有效。由051@王海军@0422431197502148151@1签名。自应用本签名以来,文档未被修改过。签名者身份有效。'
  483. // },
  484. // {
  485. // id: 5,
  486. // user: '051@王海军@0422431197502148151@1',
  487. // time: '2022-05-13 08:54:15',
  488. // val: '签名有效。由051@王海军@0422431197502148151@1签名。自应用本签名以来,文档未被修改过。签名者身份有效。'
  489. // },
  490. // {
  491. // id: 6,
  492. // user: '051@王海军@0422431197502148151@1',
  493. // time: '2022-05-13 08:54:15',
  494. // val: '签名有效。由051@王海军@0422431197502148151@1签名。自应用本签名以来,文档未被修改过。签名者身份有效。'
  495. // }
  496. ])
  497. //抽检意见
  498. const reform = ref({
  499. // type: false,
  500. content: '',
  501. })
  502. //显示右侧目录
  503. const isCarryDataShow = ref(true)
  504. const onCarryDataShow = () => {
  505. isCarryDataShow.value = !isCarryDataShow.value
  506. }
  507. //使用弹窗查看数据
  508. const cscTableDataModal = ref(false)
  509. const cscTableDataTitle = ref('')
  510. //显示弹窗
  511. const cscTableDataModalShow = () => {
  512. const key = tabTypeKey.value
  513. if (key === 'tab5') {
  514. cscTableDataTitle.value = '元数据'
  515. } else if (key === 'tab6') {
  516. cscTableDataTitle.value = '验签包'
  517. }
  518. cscTableDataModal.value = true
  519. }
  520. //关闭弹窗
  521. const cscTableDataModalClose = () => {
  522. cscTableDataModal.value = false
  523. }
  524. //关闭抽查
  525. const onCarrySpotChecksDrawerClose = () => {
  526. isDrawer.value = false
  527. ishowFile.value = false
  528. checkmetaFileId.value = ''
  529. checkId.value = ''
  530. pdfUrl.value = ''
  531. cscTableData1.value = []
  532. emit('close', false)
  533. }
  534. const checkClick = () => {
  535. emit('check')
  536. }
  537. const submitLoading = ref(false)
  538. const submitOpinion = async () => {
  539. submitLoading.value = true
  540. const { error, code, data, msg } = await initialgApi.saveInspect({
  541. fileId: checkId.value,
  542. archiveId: fileId.value,
  543. // opinion:reform.value.content,
  544. opinion: reform.value.myOpinion,
  545. projectId: projectId.value,
  546. userId: userInfo.value.user_id,
  547. archiveName: fileInfo.value.name,
  548. id: opid.value || null,
  549. conclusionId: currentId.value,
  550. })
  551. submitLoading.value = false
  552. if (!error && code === 200) {
  553. window.$message.success(msg)
  554. serReviewFile()
  555. } else {
  556. window.$message?.error(msg || '操作失败')
  557. }
  558. // addOpinion
  559. }
  560. //截取日期
  561. const splitDate = (val) => {
  562. if (val) {
  563. return val?.substring(0, 10)
  564. } else {
  565. return ''
  566. }
  567. }
  568. //查阅案卷pdf
  569. const viewPdf = async (id) => {
  570. window.$message?.info('预览案卷需要合并pdf,需要一点时间')
  571. pdfLoading.value = true
  572. const { error, code, data, msg } = await tuningApi.printArchive({
  573. id: id,
  574. })
  575. pdfLoading.value = false
  576. if (!error && code === 200) {
  577. if (data) {
  578. return data
  579. } else {
  580. window.$message?.warning('文件不存在')
  581. }
  582. }
  583. }
  584. </script>
  585. <style lang="scss" scoped>
  586. .hc-carry-spot-checks-pdf {
  587. position: relative;
  588. flex: 1 1 auto;
  589. height: 100%;
  590. transition: 0.2s;
  591. .hc-csc-pdf-btn {
  592. position: absolute;
  593. right: 0;
  594. top: 50%;
  595. color: white;
  596. font-size: 25px;
  597. z-index: 111;
  598. cursor: pointer;
  599. width: 36px;
  600. height: 40px;
  601. display: flex;
  602. padding-left: 6px;
  603. align-items: center;
  604. justify-content: center;
  605. border-radius: 150px 0 0 150px;
  606. background: linear-gradient(to right, var(--el-color-primary-light-5), var(--el-color-primary), var(--el-color-primary-dark-2));
  607. box-shadow: -2px 0 10px 0 rgba(32, 37, 50, 0.03), 0 10px 21px 20px rgba(32, 37, 50, 0.03);
  608. background-size: 200%;
  609. transition: background-position 0.5s;
  610. &:hover {
  611. background-position: 100% 0;
  612. }
  613. }
  614. }
  615. .hc-carry-spot-checks-data {
  616. position: relative;
  617. height: 100%;
  618. width: 480px;
  619. padding-left: 14px;
  620. border-left: 1px solid #e9e9e9;
  621. transition: 0.2s;
  622. .hc-csc-switch {
  623. position: relative;
  624. margin-bottom: 10px;
  625. }
  626. .hc-csc-info-box {
  627. position: relative;
  628. background: #E7EEF4;
  629. border-radius: 10px;
  630. padding: 12px;
  631. height: 244px;
  632. margin-bottom: 20px;
  633. .hc-info-text-item {
  634. position: relative;
  635. font-size: 14px;
  636. display: flex;
  637. align-items: flex-start;
  638. .title {
  639. font-weight: bold;
  640. }
  641. .content {
  642. flex: 1;
  643. position: relative;
  644. color: #101010;
  645. }
  646. }
  647. .hc-info-text-item + .hc-info-text-item {
  648. margin-top: 8px;
  649. }
  650. }
  651. .hc-csc-data-box {
  652. position: relative;
  653. background: #E7EEF4;
  654. border-radius: 10px;
  655. padding: 12px;
  656. height: calc(100% - 562px);
  657. margin-bottom: 16px;
  658. .hc-csc-associated-row {
  659. position: relative;
  660. text-align: left;
  661. display: flex;
  662. align-items: center;
  663. }
  664. .hc-table-info-btn {
  665. position: absolute;
  666. right: -5px;
  667. top: -12px;
  668. color: white;
  669. font-size: 20px;
  670. z-index: 111;
  671. cursor: pointer;
  672. border-radius: 50px;
  673. width: 34px;
  674. height: 34px;
  675. display: flex;
  676. align-items: center;
  677. justify-content: center;
  678. background: linear-gradient(to right, var(--el-color-primary-light-5), var(--el-color-primary), var(--el-color-primary-dark-2));
  679. box-shadow: -2px 0 10px 0 rgba(32, 37, 50, 0.03), 0 10px 21px 20px rgba(32, 37, 50, 0.03);
  680. background-size: 200%;
  681. transition: background-position 0.5s;
  682. &:hover {
  683. background-position: 100% 0;
  684. }
  685. }
  686. }
  687. .hc-csc-action-box {
  688. position: relative;
  689. background: white;
  690. border-radius: 10px;
  691. padding: 12px;
  692. height: 240px;
  693. .header-box {
  694. position: relative;
  695. display: flex;
  696. align-items: center;
  697. .title {
  698. flex: 1;
  699. color: #9A9A9A;
  700. font-size: 15px;
  701. }
  702. }
  703. .textarea-box {
  704. margin-top: 12px;
  705. }
  706. .btn-box {
  707. position: relative;
  708. margin-top: 20px;
  709. text-align: center;
  710. }
  711. }
  712. }
  713. </style>
  714. <style lang="scss">
  715. .hc-carry-spot-checks-target.el-overlay {
  716. position: absolute;
  717. margin: -24px;
  718. height: revert;
  719. background-color: transparent;
  720. .hc-drawer-box.el-drawer {
  721. --el-drawer-bg-color: transparent;
  722. .el-drawer__body {
  723. padding: 24px;
  724. overflow: hidden;
  725. .el-card__body {
  726. padding: 10px;
  727. }
  728. .hc-card-main-box {
  729. display: flex;
  730. }
  731. }
  732. }
  733. }
  734. .hc-csc-action-box .btn-box {
  735. .el-button + .el-button {
  736. margin-left: 50px;
  737. }
  738. }
  739. html.dark {
  740. .hc-carry-spot-checks-pdf {
  741. position: relative;
  742. flex: 1 1 auto;
  743. height: 100%;
  744. transition: 0.2s;
  745. .hc-csc-pdf-btn {
  746. position: absolute;
  747. right: 0;
  748. top: 50%;
  749. color: white;
  750. font-size: 25px;
  751. z-index: 111;
  752. cursor: pointer;
  753. width: 36px;
  754. height: 40px;
  755. display: flex;
  756. padding-left: 6px;
  757. align-items: center;
  758. justify-content: center;
  759. border-radius: 150px 0 0 150px;
  760. background: linear-gradient(to right, var(--el-color-primary-light-5), var(--el-color-primary), var(--el-color-primary-dark-2));
  761. box-shadow: -2px 0 10px 0 rgba(32,37,50,0.03), 0 10px 21px 20px rgba(32,37,50,0.03);
  762. background-size: 200%;
  763. transition: background-position 0.5s;
  764. &:hover {
  765. background-position: 100% 0;
  766. }
  767. }
  768. }
  769. .hc-carry-spot-checks-data {
  770. position: relative;
  771. height: 100%;
  772. width: 480px;
  773. padding-left: 14px;
  774. border-left: 1px solid #e9e9e9;
  775. transition: 0.2s;
  776. .hc-csc-switch {
  777. position: relative;
  778. margin-bottom: 10px;
  779. }
  780. .hc-csc-info-box {
  781. position: relative;
  782. // background: #E7EEF4;
  783. border: 1px solid var(--el-color-primary);
  784. color: white;
  785. background: transparent;
  786. border-radius: 10px;
  787. padding: 12px;
  788. height: 244px;
  789. margin-bottom: 20px;
  790. .hc-info-text-item {
  791. position: relative;
  792. font-size: 14px;
  793. display: flex;
  794. align-items: flex-start;
  795. .title {
  796. font-weight: bold;
  797. }
  798. .content {
  799. flex: 1;
  800. position: relative;
  801. color: white;
  802. }
  803. }
  804. .hc-info-text-item + .hc-info-text-item {
  805. margin-top: 8px;
  806. }
  807. }
  808. .hc-csc-data-box {
  809. position: relative;
  810. // background: #E7EEF4;
  811. background: transparent;
  812. border-radius: 10px;
  813. padding: 12px;
  814. height: calc(100% - 562px);
  815. margin-bottom: 16px;
  816. .hc-csc-associated-row {
  817. position: relative;
  818. text-align: left;
  819. display: flex;
  820. align-items: center;
  821. }
  822. .hc-table-info-btn {
  823. position: absolute;
  824. right: -5px;
  825. top: -12px;
  826. color: white;
  827. font-size: 20px;
  828. z-index: 111;
  829. cursor: pointer;
  830. border-radius: 50px;
  831. width: 34px;
  832. height: 34px;
  833. display: flex;
  834. align-items: center;
  835. justify-content: center;
  836. background: linear-gradient(to right, var(--el-color-primary-light-5), var(--el-color-primary), var(--el-color-primary-dark-2));
  837. box-shadow: -2px 0 10px 0 rgba(32,37,50,0.03), 0 10px 21px 20px rgba(32,37,50,0.03);
  838. background-size: 200%;
  839. transition: background-position 0.5s;
  840. &:hover {
  841. background-position: 100% 0;
  842. }
  843. }
  844. }
  845. .hc-csc-action-box {
  846. position: relative;
  847. background: transparent;
  848. border-radius: 10px;
  849. padding: 12px;
  850. height: 240px;
  851. .header-box {
  852. position: relative;
  853. display: flex;
  854. align-items: center;
  855. .title {
  856. flex: 1;
  857. color: #9A9A9A;
  858. font-size: 15px;
  859. }
  860. }
  861. .textarea-box {
  862. margin-top: 12px;
  863. }
  864. .btn-box {
  865. position: relative;
  866. margin-top: 20px;
  867. text-align: center;
  868. }
  869. }
  870. }
  871. }
  872. </style>