records.vue 43 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373
  1. <template>
  2. <div class="hc-page-layout-box">
  3. <div class="hc-layout-left-box" :style="'width:' + leftWidth + 'px;'">
  4. <div class="hc-project-box">
  5. <div class="hc-project-icon-box">
  6. <HcIcon name="stack"/>
  7. </div>
  8. <div class="ml-2 project-name-box">
  9. <span class="text-xl text-cut project-alias">{{projectInfo['projectAlias']}}</span>
  10. <div class="text-xs text-cut project-name">{{projectInfo['name']}}</div>
  11. </div>
  12. </div>
  13. <div class="hc-tree-box" v-loading="treeLoading" element-loading-text="加载中...">
  14. <el-scrollbar>
  15. <HcTree :projectId="projectId" :contractId="contractId" :autoExpandKeys="treeAutoExpandKeys" @nodeTap="projectTreeClick" @nodeLoading="treeNodeLoading" @menuTap="ElTreeMenuClick"/>
  16. </el-scrollbar>
  17. </div>
  18. <!--左右拖动-->
  19. <div class="horizontal-drag-line" @mousedown="onmousedown"/>
  20. </div>
  21. <div class="hc-page-content-box">
  22. <HcCard>
  23. <template #header>
  24. <div class="w-64 ml-2">
  25. <el-input v-model="searchForm.queryValue" size="large" placeholder="请输入案卷题名、档号进行搜索" clearable @keyup="keyUpEvent"/>
  26. </div>
  27. <div class="ml-2 mr-5">
  28. <el-button type="primary" hc-btn @click="searchClick">
  29. <HcIcon name="search-2"/>
  30. <span>搜索</span>
  31. </el-button>
  32. </div>
  33. <HcTooltip keys="file_records_btn_download">
  34. <el-button hc-btn :disabled="tableCheckedKeys.length <= 0" :loading="downloadLoading" @click="batchDownload">
  35. <HcIcon name="download"/>
  36. <span>下载</span>
  37. </el-button>
  38. </HcTooltip>
  39. <HcTooltip keys="file_records_btn_edit">
  40. <el-button hc-btn :disabled="tableCheckedKeys.length <= 0" @click="batchEditClick">
  41. <HcIcon name="edit"/>
  42. <span>编辑</span>
  43. </el-button>
  44. </HcTooltip>
  45. <HcTooltip keys="file_records_btn_del">
  46. <el-button hc-btn :disabled="tableCheckedKeys.length <= 0" @click="delModalClick">
  47. <HcIcon name="delete-bin"/>
  48. <span>删除</span>
  49. </el-button>
  50. </HcTooltip>
  51. </template>
  52. <template #extra>
  53. <HcTooltip keys="file_records_btn_upload_scanned_files">
  54. <el-button type="primary" hc-btn @click="uploadModalClick">
  55. <HcIcon name="qr-scan"/>
  56. <span>扫描上传案卷</span>
  57. </el-button>
  58. </HcTooltip>
  59. <HcTooltip keys="file_records_btn_moves">
  60. <el-button type="primary" hc-btn @click="movesClick">
  61. <HcIcon name="arrow-left-right"/>
  62. <span>跨目录移动</span>
  63. </el-button>
  64. </HcTooltip>
  65. </template>
  66. <HcTable ref="tableRef" :column="tableColumn" :datas="tableData" :loading="tableLoading" isCheck @selection-change="tableSelection">
  67. <template #table-column-header-num>
  68. <HcTooltip keys="file_records_btn_sort">
  69. <span class="text-link text-lg" @click="tableSortClick">
  70. <HcIcon name="arrow-up-down"/>
  71. </span>
  72. </HcTooltip>
  73. </template>
  74. <template #name="{row}">
  75. <span class="text-link" @click="tableRowName(row)">{{row?.name}}</span>
  76. </template>
  77. <template #secretLevel="{row}">
  78. {{row.secretLevelValue}}
  79. </template>
  80. <template #storageTime="{row}">
  81. {{row.storageTimeValue}}
  82. </template>
  83. <template #dates="{row}">
  84. {{row.dates[0].substring(0,10)}}~{{row.dates[1].substring(0,10)}}
  85. </template>
  86. </HcTable>
  87. <template #action>
  88. <HcPages :pages="searchForm" @change="pageChange" :sizes="[5,10,20,30,40,50]"/>
  89. </template>
  90. </HcCard>
  91. </div>
  92. <!--跨目录移动-->
  93. <HcDialog :show="movesModal" title="跨目录移动" widths="990px" isTable @close="movesModalClose" @save="movesModalSave" :loading="movesModalLoading">
  94. <div class="hc-moves-transfer-box">
  95. <div class="hc-moves-transfer-panel">
  96. <div class="panel-header">
  97. <div class="panel-header-label">
  98. <el-checkbox class="size-xl space" v-model="movesCheckAll" :indeterminate="isIndeterminate" @change="handleCheckAllChange">选择需要迁移的文件</el-checkbox>
  99. </div>
  100. <div class="panel-header-extra">{{checkedMoves.length}}/{{fileDatasList.length}}</div>
  101. </div>
  102. <div class="panel-body">
  103. <el-scrollbar>
  104. <el-checkbox-group v-model="checkedMoves" @change="handleCheckedMovesChange">
  105. <div class="hc-file-checkbox" v-for="item in fileDatasList" :key="item.id">
  106. <el-checkbox class="size-xl space" :label="item.id">{{item.name}}</el-checkbox>
  107. </div>
  108. </el-checkbox-group>
  109. </el-scrollbar>
  110. </div>
  111. </div>
  112. <div class="hc-moves-transfer-buttons">
  113. <!-- <el-button hc-btn _icon size="small"
  114. :type="fileDatasList.length <= 0 || checkedMoves.length <= 0 ? '' : 'primary'"
  115. :disabled="fileDatasList.length <= 0 || checkedMoves.length <= 0">
  116. <HcIcon name="arrow-right"/>
  117. </el-button> -->
  118. <HcIcon type="primary" name="arrow-right-double" style="font-size: 22px;"/>
  119. </div>
  120. <div class="hc-moves-transfer-panel">
  121. <div class="panel-header">选择移动目录</div>
  122. <div class="panel-body" v-loading="treePanelLoading">
  123. <el-scrollbar>
  124. <HcTree idPrefix="hc-tree-moves-" ref="movesTreeRef" :projectId="projectId" :contractId="contractId" isRadio
  125. @radioChange="radioChange" :showRadioFun="showRadioFun" @nodeLoading="panelTreeLoading"/>
  126. </el-scrollbar>
  127. </div>
  128. </div>
  129. </div>
  130. </HcDialog>
  131. <!--调整排序-->
  132. <HcDialog :show="sortModal" title="调整排序" widths="980px" isTable isRowFooter @close="sortModalClose">
  133. <el-alert title="可拖动排序,也可在后面点击图标,切换排序" type="error" :closable="false"/>
  134. <div class="hc-table-h">
  135. <HcTable ui="hc-table-row-drop" :column="sortTableColumn" :datas="sortTableData" :loading="sortTableLoading" isRowDrop @row-drop="sortTableRowDrop">
  136. <template #key2="{row}">
  137. <span class="text-link">{{row?.key2}}</span>
  138. </template>
  139. <template #action="{index}">
  140. <span class="text-link text-xl" @click="upSortClick(index)">
  141. <HcIcon name="arrow-up" fill/>
  142. </span>
  143. <span class="text-link text-xl ml-2" @click="downSortClick(index)">
  144. <HcIcon name="arrow-down" fill/>
  145. </span>
  146. </template>
  147. </HcTable>
  148. </div>
  149. <template #leftRowFooter>
  150. <el-button hc-btn @click="sortModalClose">
  151. <HcIcon name="close"/>
  152. <span>取消</span>
  153. </el-button>
  154. <el-button type="primary" hc-btn :loading="sortModalLoading" @click="sortModalSave">
  155. <HcIcon name="check"/>
  156. <span>确认</span>
  157. </el-button>
  158. </template>
  159. <template #rightRowFooter>
  160. <HcPages :pages="sortSearchForm" :sizes="[10, 20, 50, 100, 200, 300, 400, 500, 600]" @change="sortPageChange"/>
  161. </template>
  162. </HcDialog>
  163. <!--新增编辑文件-->
  164. <el-dialog v-model="showUploadModal" :title="tableUploadType === 'add'?'上传文件':'修改案卷基础信息'" width="80vw" class="hc-modal-border hc-modal-table" @close="uploadModalClose" :close-on-click-modal="false">
  165. <div class="batch-set" v-if="tableUploadType === 'add'">
  166. <span>批量设置</span>
  167. <span class="ml-10">档号:</span>
  168. <span>前缀:</span>
  169. <span><el-input v-model="batchSet.prefix" placeholder="输入档号前缀"/></span>
  170. <span class="ml-5">流水号:</span>
  171. <span><el-input v-model="batchSet.numberStart" placeholder="起号" class="batch-set-input"/></span>
  172. <span>~</span>
  173. <span><el-input v-model="batchSet.numberEnd" placeholder="止号" class="batch-set-input"/></span>
  174. <span class="ml-5">密级:</span>
  175. <span>
  176. <el-select v-model="batchSet.securityLevel">
  177. <el-option v-for="item in securityLevel" :key="item['dictKey']" :label="item['dictValue']" :value="item['dictKey']"/>
  178. </el-select>
  179. </span>
  180. <span class="ml-5">保管期限:</span>
  181. <span>
  182. <el-select v-model="batchSet.storagePeriod">
  183. <el-option v-for="item in storagePeriod" :key="item['dictKey']" :label="item['dictValue']" :value="item['dictKey']"/>
  184. </el-select>
  185. </span>
  186. <span class="ml-5">立卷单位:</span>
  187. <span><el-input v-model="batchSet.filingUnit" placeholder="输入立卷单位"/></span>
  188. <span class="ml-5">
  189. <el-button type="primary" @click="batchSetHandle">设置</el-button>
  190. </span>
  191. </div>
  192. <HcTable ui="hc-form-table" :column="tableUploadColumn" :datas="tableUploadData" :loading="uploadSaveLoading" :isIndex="false" :class="{'set-table': tableUploadType === 'add'}">
  193. <template #no="{index}">
  194. {{index+1}}
  195. <template v-if="tableUploadType === 'add'">
  196. <span class="text-link text-lg">
  197. <HcIcon name="arrow-up" @click="upUpSortClick(index)"/>
  198. </span>
  199. <span class="text-link text-lg">
  200. <HcIcon name="arrow-down" @click="downUpSortClick(index)"/>
  201. </span>
  202. </template>
  203. </template>
  204. <template #fileNumber="{row}">
  205. <el-input v-model="row.fileNumber" type="textarea"/>
  206. </template>
  207. <template #name="{row}">
  208. <el-input v-model="row.name" type="textarea"/>
  209. </template>
  210. <template #secretLevel="{row}">
  211. <el-select v-model="row.secretLevel">
  212. <el-option v-for="item in securityLevel" :key="item['dictKey']" :label="item['dictValue']" :value="item['dictKey']"/>
  213. </el-select>
  214. </template>
  215. <template #storageTime="{row}">
  216. <el-select v-model="row.storageTime">
  217. <el-option v-for="item in storagePeriod" :key="item['dictKey']" :label="item['dictValue']" :value="item['dictKey']"/>
  218. </el-select>
  219. </template>
  220. <template #filingUnit="{row}">
  221. <el-input v-model="row.filingUnit" type="textarea"/>
  222. </template>
  223. <template #dates="{row}">
  224. <el-date-picker v-model="row.dates" value-format="YYYY-MM-DD HH:mm:ss" type="daterange"/>
  225. </template>
  226. <template #action="{row,index}" v-if="tableUploadType === 'add'">
  227. <el-button type="danger" plain size="small" :loading="row['delBtnLoading']" @click="delUploadData(row,index)">删除</el-button>
  228. </template>
  229. </HcTable>
  230. <template #footer>
  231. <div class="lr-dialog-footer">
  232. <div class="left flex items-center">
  233. <el-button type="primary" hc-btn @click="uploadFileClick">
  234. <HcIcon name="add-circle"/>
  235. <span>新增上传</span>
  236. </el-button>
  237. <el-alert title="提示:每次不超过10份,文件量越多,响应容易超时" type="error" :closable="false"/>
  238. </div>
  239. <div class="right">
  240. <el-button size="large" @click="batchUploadCancel" :disabled="uploadsLoading">
  241. <HcIcon name="close"/>
  242. <span>取消</span>
  243. </el-button>
  244. <el-button type="primary" hc-btn :disabled="uploadsLoading" :loading="uploadSaveLoading" @click="batchUploadSave">
  245. <HcIcon name="save"/>
  246. <span>提交保存</span>
  247. </el-button>
  248. </div>
  249. </div>
  250. </template>
  251. </el-dialog>
  252. <HcUploadFile ref="HcUploadFileRef"
  253. @fileProgress="HcUploadFileProgress"
  254. @fileSuccess="HcUploadFileSuccess"
  255. @filesChange="HcUploadFileChange"/>
  256. </div>
  257. </template>
  258. <script setup>
  259. import {ref, watch, onMounted,nextTick } from "vue";
  260. import {useAppStore} from "~src/store";
  261. import HcTree from "~src/components/tree/hc-tree.vue"
  262. import notableform from '~src/assets/view/notableform.svg';
  263. import {delMessage, rowsToId, rowsToIdNumArr} from "~uti/tools";
  264. import {getArrValue, deepClone, downloadBlob, getObjVal} from "js-fast-way"
  265. import tasksApi from '~api/tasks/data';
  266. import ossApi from "~api/oss";
  267. import archiveFileApi from "~api/archiveFile/archiveFileAuto.js";
  268. import {getStoreValue, setStoreValue} from '~src/utils/storage'
  269. //变量
  270. const useAppState = useAppStore()
  271. const projectId = ref(useAppState.getProjectId);
  272. const contractId = ref(useAppState.getContractId);
  273. const projectInfo = ref(useAppState.getProjectInfo);
  274. const isCollapse = ref(useAppState.getCollapse)
  275. const userInfo = ref(useAppState.getUserInfo)
  276. //上传变量
  277. const HcUploadFileRef = ref(null)
  278. const uploadsLoading = ref(false)
  279. //监听
  280. watch(() => [
  281. useAppState.getCollapse
  282. ], ([Collapse]) => {
  283. isCollapse.value = Collapse
  284. })
  285. //渲染完成
  286. onMounted(() => {
  287. treeLoading.value = true
  288. setTableColumns()
  289. getStoragePeriod()
  290. getSecurityLevel()
  291. })
  292. //打开文件选择框
  293. const uploadFileClick = () => {
  294. HcUploadFileRef?.value.btnUpload()
  295. }
  296. // 文件上传进度
  297. const HcUploadFileProgress = (res) => {
  298. uploadsLoading.value = res
  299. }
  300. // 文件上传成功的回调
  301. const HcUploadFileSuccess = (res) => {
  302. console.log('文件上传成功', res)
  303. uploadsChange(res)
  304. }
  305. // 文件全部上传成功
  306. const HcUploadFileChange = () => {
  307. console.log('文件全部上传成功')
  308. HcUploadFileRef?.value.close()
  309. }
  310. //树加载
  311. const treeLoading = ref(false)
  312. const treeNodeLoading = () => {
  313. treeLoading.value = false
  314. }
  315. const treePanelLoading = ref(false)
  316. const panelTreeLoading = () => {
  317. treePanelLoading.value = false
  318. }
  319. //审批状态
  320. const approvalStatus = ref([
  321. {label: '未上报', value: '1'},
  322. {label: '待审批', value: '2'},
  323. {label: '已审批', value: '3'}
  324. ])
  325. //认证状态
  326. const certifiedStatus = ref([
  327. {label: '已认证', value: '1'},
  328. {label: '未认证', value: '2'}
  329. ])
  330. //搜索表单
  331. const searchForm = ref({
  332. nodeIds:'',
  333. approval: null, certified: null, queryValue: null,
  334. current: 1, size: 5, total: 0
  335. })
  336. //树相关的变量
  337. const primaryKeyId = ref('')
  338. const isBuiltDrawing = ref(0)
  339. const isStorageNode = ref(0)
  340. const nodeIds = ref('')
  341. const treeAutoExpandKeys = ref(getStoreValue('wbsTreeExpandKeys') || [])
  342. const projectTreeClick = ({node, data, keys, key}) => {
  343. setStoreValue('wbsTreeExpandKeys', keys)
  344. treeAutoExpandKeys.value = keys || []
  345. nodeIds.value = data.id || '';
  346. isStorageNode.value = data['isStorageNode'] || 0;
  347. //设置搜索数据
  348. searchForm.value.current = 1;
  349. searchForm.value.nodeIds = data.id || '';
  350. sortSearchForm.value.nodeIds = data.id || '';
  351. getTableData()
  352. }
  353. //树菜单被点击
  354. const ElTreeMenuClick = async ({key, node, data, keys}) => {
  355. setStoreValue('wbsTreeExpandKeys', keys)
  356. treeAutoExpandKeys.value = keys || []
  357. }
  358. //回车搜索
  359. const keyUpEvent = (e) => {
  360. if (e.key === "Enter") {
  361. searchForm.value.current = 1;
  362. getTableData()
  363. }
  364. }
  365. //搜索
  366. const searchClick = () => {
  367. searchForm.value.current = 1;
  368. getTableData()
  369. }
  370. //分页被点击
  371. const pageChange = ({current, size}) => {
  372. searchForm.value.current = current
  373. searchForm.value.size = size
  374. getTableData()
  375. }
  376. //表格数据
  377. const tableRef = ref(null)
  378. const tableColumn = ref([])
  379. //设置表头
  380. const setTableColumns = () => {
  381. tableColumn.value = [
  382. {key:'fileNumber', name: '档号', width: 160},
  383. {key:'name', name: '案卷题名'},
  384. {key:'secretLevel', name: '密级', width: 100},
  385. {key:'storageTime', name: '保管期限', width: 100},
  386. {key:'pageN', name: '页数', width: 100},
  387. {key:'filingUnit', name: '立卷单位'},
  388. {key:'dates', name: '起止日期', width: 190}
  389. ]
  390. }
  391. const tableData = ref([])
  392. //获取数据
  393. const tableLoading = ref(false)
  394. const getTableData = async () => {
  395. tableLoading.value = true
  396. const { error, code, data } = await archiveFileApi.getarchiveFilePage({
  397. ...searchForm.value,
  398. projectId: projectId.value,
  399. contractId: contractId.value,
  400. isAutoFile:1,
  401. isArchive : 1
  402. })
  403. tableLoading.value = false
  404. if (!error && code === 200) {
  405. tableData.value = getArrValue(data['records'])
  406. tableData.value.forEach((element)=>{
  407. element.dates = [element.startDate,element.endDate]
  408. })
  409. searchForm.value.total = data['total'] || 0
  410. } else {
  411. tableData.value = []
  412. searchForm.value.total = 0
  413. }
  414. }
  415. //多选
  416. const tableCheckedKeys = ref([]);
  417. const tableSelection = (rows) => {
  418. tableCheckedKeys.value = rows
  419. }
  420. //分盒整理
  421. const sortingModal = ref(false)
  422. const sortingClick = async() => {
  423. if (nodeIds.value && isStorageNode.value === 1) {
  424. const { error, code, data } = await archiveFileApi.getBoxNameAndBoxNumber({
  425. nodeId:nodeIds.value
  426. })
  427. if (!error && code === 200) {
  428. if(data.length > 0){
  429. sortingActiveKey.value = [];
  430. sortingModal.value = true
  431. sortingItemData.value = getArrValue(data)
  432. sortingOldData.value = deepClone(sortingItemData.value)
  433. }else{
  434. sortingNoneModal.value = true
  435. }
  436. }
  437. } else {
  438. window?.$message?.warning('请先选择一个子节点')
  439. }
  440. }
  441. const sortingNoneModal = ref(false)//无数据显示的弹窗
  442. const toSortingModal = ()=>{
  443. sortingNoneModal.value = false;
  444. sortingActiveKey.value = [];
  445. sortingModal.value = true
  446. }
  447. const sortingItemData = ref([])
  448. const sortingOldData = ref([])//旧数据,用来对比是否修改名字
  449. //获取数据
  450. const sortingItemLoading = ref(false)
  451. const getSortingItemData = () => {
  452. }
  453. //校验
  454. const tableIsInput = (val, row, key) => {
  455. //console.log(!val);
  456. //检测是否改过案卷名字
  457. if(key == 'isName'){
  458. row.isChange = true;
  459. }
  460. row[key] = !val;
  461. }
  462. //选择文件
  463. // const sortingActiveKey = ref('')
  464. // const sortingSelectFile = (row, index) => {
  465. // //取当前展开组的key
  466. // const key = sortingActiveKey.value;
  467. // const keys = key ? key.split('-') : [];
  468. // const active = keys.length > 0 ? keys[1]: -1;
  469. // if (Number(active) === index) {
  470. // sortingActiveKey.value = null;
  471. // } else {
  472. // sortingActiveKey.value = `item-${index}`;
  473. // }
  474. // }
  475. const sortingActiveKey = ref([])
  476. const sortingSelectFile = (row, index) => {
  477. const key = `item-${index}`;
  478. const indexNum = sortingActiveKey.value.indexOf(key);
  479. if(indexNum > -1){
  480. sortingActiveKey.value.splice(indexNum,1);
  481. }else{
  482. sortingActiveKey.value.push(key);
  483. if(!(row.list && row.list.length > 0)){
  484. getSortingTableData(row, index)
  485. }
  486. }
  487. }
  488. //表格
  489. const sortingTableColumn = [
  490. {key:'name', name: '文件名称'},
  491. ];
  492. const sortingTableData = ref([])
  493. //获取数据
  494. const sortingTableLoading = ref(false)
  495. const getSortingTableData = async(row, index) => {
  496. sortingTableLoading.value = true
  497. const { error, code, data } = await archiveFileApi.pageByBoxName({
  498. size: 99999,
  499. current: 1,
  500. projectId: projectId.value,
  501. contractId: contractId.value,
  502. nodeIds:nodeIds.value,
  503. boxName:row.boxName?row.boxName:''
  504. })
  505. sortingTableLoading.value = false
  506. if (!error && code === 200) {
  507. row.list = getArrValue(data['records'])
  508. setTableCheck(row, index)
  509. } else {
  510. row.list = []
  511. }
  512. }
  513. //表格ref
  514. const sorTableRef = ref([]);
  515. //回显勾选
  516. const setTableCheck = async(row, index) => {
  517. //console.log(row)
  518. if(row.ids){
  519. const keys = row.ids.split(',');
  520. row.list.forEach(async (item)=>{
  521. if(keys.indexOf(item.id) > -1){
  522. item.checked = true;
  523. await nextTick();
  524. sorTableRef.value[index].toggleRowSelection(item,true);
  525. }
  526. })
  527. }
  528. }
  529. //多选
  530. const sortingTableKeys = ref([]);
  531. const sortingTableSelection = (rows,list,event) => {
  532. //console.log(event)
  533. list.forEach(element => {
  534. element.checked = false;
  535. });
  536. rows.forEach((element)=>{
  537. element.checked = true;
  538. })
  539. }
  540. //删除
  541. const sortingDelData = (row,index) => {
  542. sortingItemData.value.splice(index,1);
  543. }
  544. //添加分盒
  545. const addSortingModalClick = () => {
  546. sortingItemData.value.push({
  547. boxName: ''
  548. })
  549. }
  550. //确认保存
  551. const sortingModalLoading = ref(false)
  552. const sortingModalSave = async() => {
  553. sortingModalLoading.value = true
  554. //检测案卷名是否重复
  555. let nameRes = await checkNames();
  556. //console.log(nameRes)
  557. //return;
  558. for (let i = 0; i < nameRes.length; i++) {
  559. if(typeof nameRes[i].data == 'string'){
  560. window.$message?.error(nameRes[i].data+',案卷名重复')
  561. sortingModalLoading.value = false
  562. return;
  563. }
  564. }
  565. //组装数据
  566. let rows = [];
  567. sortingItemData.value.forEach((item,index)=>{
  568. let obj = {
  569. ids:'',
  570. boxName:item.boxName,
  571. boxNumber:index+1,
  572. };
  573. let list = [];
  574. if(item.list){
  575. item.list.forEach((item2)=>{
  576. if(item2.checked){
  577. list.push(item2.id)
  578. }
  579. })
  580. obj.ids = list.join(',');
  581. }else{
  582. obj.ids = item.ids;
  583. }
  584. rows.push(obj)
  585. })
  586. const { error, code, data } = await archiveFileApi.allocation({
  587. list: rows
  588. })
  589. if (!error && code === 200) {
  590. window.$message?.success('保存成功')
  591. sortingModal.value = false
  592. } else {
  593. window.$message?.error('保存失败')
  594. }
  595. sortingModalLoading.value = false
  596. }
  597. const checkNames =() =>{
  598. const arr = [];
  599. sortingItemData.value.forEach((item)=>{
  600. if(item.boxNumber){
  601. if(item.isChange){
  602. //是否修改过
  603. //对比旧的数据,是否相同
  604. for (let i = 0; i < sortingOldData.value.length; i++) {
  605. if(sortingOldData.value[i].boxNumber == item.boxNumber){
  606. if(sortingOldData.value[i].boxName != item.boxName){
  607. arr.push(
  608. archiveFileApi.getIsBoxName({
  609. boxName:item.boxName
  610. })
  611. )
  612. }
  613. return;
  614. }
  615. }
  616. }
  617. }else{
  618. arr.push(
  619. archiveFileApi.getIsBoxName({
  620. boxName:item.boxName
  621. })
  622. )
  623. }
  624. })
  625. return Promise.all(arr);
  626. }
  627. //关闭
  628. const sortingModalClose = () => {
  629. sortingModal.value = false
  630. }
  631. //删除
  632. const delModalClick = () => {
  633. delMessage(async () => {
  634. let ids = [];
  635. tableCheckedKeys.value.forEach((element)=>{
  636. ids.push(element.id)
  637. })
  638. const { error, code, data } = await archiveFileApi.remove({
  639. ids:ids.join(',')
  640. })
  641. //处理数据
  642. if (!error && code === 200) {
  643. window.$message?.success('操作成功')
  644. getTableData()
  645. }
  646. })
  647. }
  648. //跨目录移动
  649. const movesModal = ref(false)
  650. const movesClick = async() => {
  651. movesModal.value = true
  652. treePanelLoading.value = true
  653. const { error, code, data } = await archiveFileApi.getarchiveFilePage({
  654. ...searchForm.value,
  655. size:9999,
  656. projectId: projectId.value,
  657. contractId: contractId.value,
  658. isArchive:1,
  659. isAutoFile:1
  660. })
  661. if (!error && code === 200) {
  662. fileDatasList.value = getArrValue(data['records'])
  663. } else {
  664. fileDatasList.value = []
  665. }
  666. }
  667. //选择需要迁移的文件
  668. const movesCheckAll = ref(false)
  669. const isIndeterminate = ref(true)
  670. const checkedMoves = ref([])
  671. //左侧待迁移文件
  672. const fileDatasList = ref([])
  673. //全选
  674. const handleCheckAllChange = (val) => {
  675. const checked = fileDatasList.value
  676. const keys = rowsToIdNumArr(checked);
  677. checkedMoves.value = val ? keys : []
  678. isIndeterminate.value = false
  679. }
  680. //勾选
  681. const handleCheckedMovesChange = (value) => {
  682. const keys = fileDatasList.value
  683. const checkedCount = value.length
  684. movesCheckAll.value = checkedCount === keys.length
  685. isIndeterminate.value = checkedCount > 0 && checkedCount < keys.length
  686. }
  687. //右侧radio
  688. const movesTreeRef = ref(null)
  689. let radioNode = ref(null)
  690. const radioChange = (id)=>{
  691. //console.log(id)
  692. //radioNodeId = id;
  693. radioNode.value = movesTreeRef.value.ElTreeRef.getNode(id);
  694. }
  695. //只显示储存节点的单选
  696. const showRadioFun = (data)=>{
  697. if(data.isStorageNode == 1){
  698. return true;
  699. }else{
  700. return false;
  701. }
  702. }
  703. //保存
  704. const movesModalLoading = ref(false)
  705. const movesModalSave = async() => {
  706. let ids = checkedMoves.value.join(',')
  707. if(checkedMoves.value.length < 1){
  708. window.$message?.warning('请勾选需要迁移的文件')
  709. return;
  710. }
  711. if(!radioNode.value){
  712. window.$message?.warning('请选择要移动到的节点')
  713. return;
  714. }
  715. movesModalLoading.value = true;
  716. const { error, code, data } = await archiveFileApi.migrateFile({
  717. ids:ids,
  718. nodeId:radioNode.value.data.id,
  719. nodeSort:radioNode.value.data.treeSort,
  720. })
  721. movesModalLoading.value = false
  722. if (!error && code === 200) {
  723. window.$message?.success('保存成功')
  724. movesModal.value = false
  725. getTableData()
  726. } else {
  727. window.$message?.error('保存失败')
  728. }
  729. }
  730. //关闭
  731. const movesModalClose = () => {
  732. movesModal.value = false
  733. }
  734. //表格排序
  735. const sortModal = ref(false)
  736. //显示
  737. const tableSortClick = () => {
  738. sortModal.value = true
  739. getSortTableData()
  740. }
  741. //搜索表单
  742. const sortSearchForm = ref({
  743. nodeIds:'',
  744. current: 1, size: 20, total: 0
  745. })
  746. //分页被点击
  747. const sortPageChange = ({current, size}) => {
  748. sortSearchForm.value.current = current
  749. sortSearchForm.value.size = size
  750. getSortTableData()
  751. }
  752. //表格数据
  753. const sortTableColumn = ref([
  754. {key:'fileNumber', name: '档号', width: 160},
  755. {key:'name', name: '案卷题名'},
  756. {key:'action', name: '排序', width: 90},
  757. ])
  758. const sortTableData = ref([])
  759. const sortTableLoading = ref(false)
  760. const getSortTableData = async () => {
  761. sortTableLoading.value = true
  762. const { error, code, data } = await archiveFileApi.getarchiveFilePage({
  763. ...sortSearchForm.value,
  764. projectId: projectId.value,
  765. contractId: contractId.value,
  766. isAutoFile:1,
  767. isArchive:1
  768. })
  769. sortTableLoading.value = false
  770. if (!error && code === 200) {
  771. sortTableData.value = getArrValue(data['records'])
  772. sortSearchForm.value.total = data['total'] || 0
  773. } else {
  774. sortTableData.value = []
  775. sortSearchForm.value.total = 0
  776. }
  777. }
  778. //拖动完成
  779. const sortTableRowDrop = (rows) => {
  780. sortTableData.value = rows
  781. }
  782. //向下
  783. const downSortClick = (index) => {
  784. const indexs = index + 1
  785. const data = sortTableData.value
  786. if(indexs !== data.length) {
  787. const tmp = data.splice(indexs,1);
  788. sortTableData.value.splice(index,0,tmp[0]);
  789. } else {
  790. window?.$message?.warning('已经处于置底,无法下移')
  791. }
  792. }
  793. //向上
  794. const upSortClick = (index) => {
  795. const data = sortTableData.value || []
  796. if(index !== 0) {
  797. const tmp = data.splice(index - 1,1);
  798. sortTableData.value.splice(index,0,tmp[0]);
  799. } else {
  800. window?.$message?.warning('已经处于置顶,无法上移')
  801. }
  802. }
  803. //保存
  804. const sortModalLoading = ref(false)
  805. const sortModalSave = async() => {
  806. let rows = sortTableData.value;
  807. rows.forEach((element,index)=>{
  808. element.autoFileSort = index+1
  809. })
  810. await batchEditSaveApi(rows)
  811. sortModal.value = false
  812. }
  813. //关闭
  814. const sortModalClose = () => {
  815. sortModal.value = false
  816. }
  817. //获取认证状态
  818. const certificationType = ref([])
  819. const certificationStatus = async () => {
  820. const { error, code, data } = await tasksApi.queryTaskTypeStatus({
  821. typeOrStatus: 'certification_status'
  822. })
  823. //处理数据
  824. if (!error && code === 200) {
  825. certificationType.value = getArrValue(data)
  826. } else {
  827. certificationType.value = []
  828. }
  829. }
  830. //获取图幅类型
  831. const sheetType = ref([])
  832. const sheetTypeStatus = async () => {
  833. const { error, code, data } = await tasksApi.queryTaskTypeStatus({
  834. typeOrStatus: 'sheet_type'
  835. })
  836. //处理数据
  837. if (!error && code === 200) {
  838. sheetType.value = getArrValue(data)
  839. } else {
  840. sheetType.value = []
  841. }
  842. }
  843. //获取图表来源
  844. const sheetSourceType = ref([])
  845. const sheetSourceStatus = async () => {
  846. const { error, code, data } = await tasksApi.queryTaskTypeStatus({
  847. typeOrStatus: 'sheet_source'
  848. })
  849. //处理数据
  850. if (!error && code === 200) {
  851. sheetSourceType.value = getArrValue(data)
  852. } else {
  853. sheetSourceType.value = []
  854. }
  855. }
  856. //获取密级
  857. const securityLevel = ref([])
  858. const getSecurityLevel = async () => {
  859. const { error, code, data } = await tasksApi.queryTaskTypeStatus({
  860. typeOrStatus: 'security_level'
  861. })
  862. //处理数据
  863. if (!error && code === 200) {
  864. securityLevel.value = getArrValue(data)
  865. } else {
  866. securityLevel.value = []
  867. }
  868. }
  869. //获取保管期限
  870. const storagePeriod = ref([])
  871. const getStoragePeriod = async () => {
  872. const { error, code, data } = await tasksApi.queryTaskTypeStatus({
  873. typeOrStatus: 'storage_period'
  874. })
  875. //处理数据
  876. if (!error && code === 200) {
  877. storagePeriod.value = getArrValue(data)
  878. } else {
  879. storagePeriod.value = []
  880. }
  881. }
  882. //新增文件
  883. const tableUploadType = ref('add')
  884. const showUploadModal = ref(false)
  885. const uploadModalClick = () => {
  886. if (nodeIds.value && isStorageNode.value === 1) {
  887. tableUploadType.value = 'add'
  888. setTableUploadColumn()
  889. uploadSaveLoading.value = false
  890. tableUploadData.value = []
  891. showUploadModal.value = true
  892. } else {
  893. window?.$message?.warning('请先选择一个子节点')
  894. }
  895. }
  896. const uploadModalClose=()=>{
  897. batchUploadCancel()
  898. HcUploadFileRef?.value.cancel()
  899. HcUploadFileRef?.value.isShow(false)
  900. }
  901. //设置文件表头
  902. const tableUploadColumn = ref([
  903. {key:'no', name: '序号', width: 100},
  904. {key:'fileNumber', name: '档号', width: 160},
  905. {key:'name', name: '案卷题名'},
  906. {key:'secretLevel', name: '密级', width: 100},
  907. {key:'storageTime', name: '保管期限', width: 100},
  908. {key:'filingUnit', name: '立卷单位'},
  909. {key:'dates', name: '起止日期', width: 380},
  910. {key:'action', name: '操作', width: 100}
  911. ])
  912. const setTableUploadColumn = () => {
  913. }
  914. const tableUploadData = ref([])
  915. //上传的文件结果
  916. const uploadsChange = (item) => {
  917. if (getObjVal(item)) {
  918. let newArr = tableUploadData.value
  919. let name = item['originalName'] || ''
  920. let fileName = name.substring(0, name.lastIndexOf("."))
  921. newArr.push({
  922. projectId: projectId.value,
  923. contractId: contractId.value,
  924. nodeId: nodeIds.value,
  925. name:fileName,
  926. approvalFileList:[{
  927. projectId: projectId.value,
  928. contractId: contractId.value,
  929. nodeId: nodeIds.value,
  930. fileName: fileName,
  931. fileNumber:'',
  932. ossFileName: item?.name || '',
  933. fileUrl: item?.link || '',
  934. pdfFileUrl: item?.pdfUrl || '',
  935. filePage: item?.page || '',
  936. isApproval:0,
  937. isNeedCertification:0,
  938. dutyUser: userInfo.value.real_name
  939. }]
  940. })
  941. tableUploadData.value = newArr
  942. } else {
  943. console.log(item)
  944. }
  945. }
  946. //表单下拉数据
  947. const whetherData = ref([
  948. {label: "不需要", value: 0},
  949. {label: "需要", value: 1}
  950. ])
  951. //删除
  952. const delUploadData = async (row,index) => {
  953. if (row['ossFileName']) {
  954. row['delBtnLoading'] = true
  955. await ossApi.removeFile({fileName: row['ossFileName']})
  956. row['delBtnLoading'] = false
  957. tableUploadData.value.splice(index,1);
  958. } else {
  959. tableUploadData.value.splice(index,1);
  960. }
  961. }
  962. //批量上传保存
  963. const uploadSaveLoading = ref(false)
  964. const batchUploadSave = async () => {
  965. const rows = tableUploadData.value
  966. if (rows.length > 0) {
  967. //验证表单数据
  968. uploadSaveLoading.value = true
  969. let isTableRows = false;
  970. //判断数据
  971. if (isTableRows) {
  972. uploadSaveLoading.value = false
  973. window.$message?.warning('请先完善表单信息')
  974. } else {
  975. //数据处理
  976. rows.forEach((element,index)=>{
  977. if(element.dates){
  978. element.startDate = element.dates[0]
  979. element.endDate = element.dates[1]
  980. }
  981. element.autoFileSort = index+1
  982. })
  983. if (tableUploadType.value === 'add') {
  984. await batchUploadSaveApi(rows)
  985. } else {
  986. await batchEditSaveApi(rows)
  987. }
  988. }
  989. } else {
  990. window.$message?.warning('请先上传文件')
  991. }
  992. }
  993. //确认上传保存
  994. const batchUploadSaveApi = async (rows) => {
  995. uploadSaveLoading.value = true
  996. const {error, code} = await archiveFileApi.batchUploadSave({
  997. list: rows
  998. },false)
  999. //判断状态
  1000. uploadSaveLoading.value = false
  1001. if (!error && code === 200) {
  1002. window.$message?.success('保存成功')
  1003. batchUploadCancel()
  1004. getTableData()
  1005. } else {
  1006. window.$message?.error('保存失败')
  1007. }
  1008. }
  1009. //取消上传
  1010. const batchUploadCancel = () => {
  1011. tableUploadData.value = []
  1012. uploadSaveLoading.value = false
  1013. uploadsLoading.value = false
  1014. showUploadModal.value = false
  1015. }
  1016. //批量编辑
  1017. const batchEditClick = () => {
  1018. const rows = deepClone(tableCheckedKeys.value)
  1019. //判断是否满足条件
  1020. tableUploadType.value = 'edit'
  1021. setTableUploadColumn()
  1022. uploadSaveLoading.value = false
  1023. tableUploadData.value = rows
  1024. showUploadModal.value = true
  1025. }
  1026. //确认编辑上传保存
  1027. const batchEditSaveApi = async (rows) => {
  1028. uploadSaveLoading.value = true
  1029. const {error, code} = await archiveFileApi.batchUploadSave({
  1030. list: rows
  1031. },false)
  1032. //判断状态
  1033. uploadSaveLoading.value = false
  1034. if (!error && code === 200) {
  1035. window.$message?.success('保存成功')
  1036. batchUploadCancel()
  1037. getTableData()
  1038. } else {
  1039. window.$message?.error('保存失败')
  1040. }
  1041. }
  1042. //上传文件向下
  1043. const downUpSortClick = (index) => {
  1044. const indexs = index + 1
  1045. const data = tableUploadData.value
  1046. if(indexs !== data.length) {
  1047. const tmp = data.splice(indexs,1);
  1048. tableUploadData.value.splice(index,0,tmp[0]);
  1049. } else {
  1050. window?.$message?.warning('已经处于置底,无法下移')
  1051. }
  1052. }
  1053. //上传文件向上
  1054. const upUpSortClick = (index) => {
  1055. const data = tableUploadData.value || []
  1056. if(index !== 0) {
  1057. const tmp = data.splice(index - 1,1);
  1058. tableUploadData.value.splice(index,0,tmp[0]);
  1059. } else {
  1060. window?.$message?.warning('已经处于置顶,无法上移')
  1061. }
  1062. }
  1063. //批量设置
  1064. const batchSet = ref({
  1065. prefix:'',
  1066. numberStart:'',
  1067. numberEnd:'',
  1068. securityLevel:'',
  1069. storagePeriod:'',
  1070. filingUnit:'',
  1071. })
  1072. //批量设置
  1073. const batchSetHandle = () => {
  1074. setSecurityLevel()
  1075. setStoragePeriod()
  1076. setFileNumber()
  1077. setFilingUnit()
  1078. }
  1079. //批量设置密级
  1080. const setSecurityLevel = () => {
  1081. if(batchSet.value.securityLevel){
  1082. let isSet = true;
  1083. // for (let i = 0; i < tableUploadData.value.length; i++) {
  1084. // if(tableUploadData.value[i].secretLevel!=='0' && tableUploadData.value[i].secretLevel){
  1085. // isSet = false;
  1086. // return;
  1087. // }
  1088. // }
  1089. //如果有一条数据选了,其他的都不进行设置
  1090. if(isSet){
  1091. tableUploadData.value.forEach((element)=>{
  1092. element.secretLevel = batchSet.value.securityLevel
  1093. })
  1094. }
  1095. }
  1096. }
  1097. //批量设置保管期限
  1098. const setStoragePeriod = () => {
  1099. if(batchSet.value.storagePeriod){
  1100. let isSet = true;
  1101. // for (let i = 0; i < tableUploadData.value.length; i++) {
  1102. // if(tableUploadData.value[i].storageTime!=='0' && tableUploadData.value[i].storageTime){
  1103. // isSet = false;
  1104. // return;
  1105. // }
  1106. // }
  1107. //如果有一条数据选了,其他的都不进行设置
  1108. if(isSet){
  1109. tableUploadData.value.forEach((element)=>{
  1110. element.storageTime = batchSet.value.storagePeriod
  1111. })
  1112. }
  1113. }
  1114. }
  1115. const setFileNumber = () => {
  1116. let isSet = true;
  1117. // for (let i = 0; i < tableUploadData.value.length; i++) {
  1118. // if(tableUploadData.value[i].fileNumber){
  1119. // isSet = false;
  1120. // return;
  1121. // }
  1122. // }
  1123. if(!isSet){
  1124. return;
  1125. }
  1126. if(batchSet.value.prefix && batchSet.value.numberStart && batchSet.value.numberEnd){
  1127. const regPos = /^[0-9]+.?[0-9]*/; //判断是否是数字。
  1128. if(!regPos.test(batchSet.value.numberStart)){
  1129. window.$message?.warning('流水号 起号 存在非数字,请修改')
  1130. return;
  1131. }
  1132. if(!regPos.test(batchSet.value.numberEnd)){
  1133. window.$message?.warning('流水号 止号 存在非数字,请修改')
  1134. return;
  1135. }
  1136. const startNum = Number(batchSet.value.numberStart);
  1137. const endNum = Number(batchSet.value.numberEnd);
  1138. if(startNum > endNum){
  1139. window.$message?.warning('起号需要小于止号')
  1140. return;
  1141. }
  1142. //获取最长的字符串长度
  1143. let numL = 0;
  1144. if(batchSet.value.numberStart.length > batchSet.value.numberEnd.length){
  1145. numL = batchSet.value.numberStart.length
  1146. }else{
  1147. numL = batchSet.value.numberEnd.length
  1148. }
  1149. //检测前缀最后是否有-
  1150. let prefix = batchSet.value.prefix;
  1151. if(prefix.charAt(prefix.length - 1) !== '-'){
  1152. //没有就加上
  1153. prefix = prefix + '-';
  1154. }
  1155. //遍历赋值
  1156. let index = 0;
  1157. for (let i = startNum; i <= endNum; i++) {
  1158. //超出就终止
  1159. if(tableUploadData.value[index] === undefined){
  1160. return;
  1161. }
  1162. //前面补零
  1163. const numStr = i.toString().padStart(numL,'0');
  1164. tableUploadData.value[index].fileNumber = prefix + numStr;
  1165. index++;
  1166. }
  1167. }else{
  1168. window.$message?.warning('档号由前缀和流水号组成,请填写完整再进行批量设置档号')
  1169. }
  1170. }
  1171. //立卷单位
  1172. const setFilingUnit = ()=>{
  1173. if(batchSet.value.filingUnit){
  1174. let isSet = true;
  1175. // for (let i = 0; i < tableUploadData.value.length; i++) {
  1176. // if(tableUploadData.value[i].filingUnit){
  1177. // isSet = false;
  1178. // return;
  1179. // }
  1180. // }
  1181. //如果有一条数据选了,其他的都不进行设置
  1182. if(isSet){
  1183. tableUploadData.value.forEach((element)=>{
  1184. element.filingUnit = batchSet.value.filingUnit
  1185. })
  1186. }
  1187. }
  1188. }
  1189. //批量下载
  1190. const downloadLoading = ref(false)
  1191. const batchDownload = async () => {
  1192. let ids = [];
  1193. tableCheckedKeys.value.forEach((element)=>{
  1194. ids.push(element.id)
  1195. })
  1196. downloadLoading.value = true
  1197. const { error,response, res} = await archiveFileApi.batchDownloadFileToZip({
  1198. ids:ids.join(',')
  1199. })
  1200. downloadLoading.value = false
  1201. if (!error) {
  1202. downloadBlob(res, response.headers['content-disposition'])
  1203. }
  1204. }
  1205. //名称被点击
  1206. const tableRowName = async (row) => {
  1207. const { error, code, data } = await archiveFileApi.mergePdf({
  1208. ids: row.id
  1209. })
  1210. //处理数据
  1211. if (!error && code === 200) {
  1212. window.open(data, '_blank')
  1213. }
  1214. }
  1215. //左右拖动,改变树形结构宽度
  1216. const leftWidth = ref(382);
  1217. const onmousedown = () => {
  1218. const leftNum = isCollapse.value ? 142 : 272
  1219. document.onmousemove = (ve) => {
  1220. let diffVal = ve.clientX - leftNum;
  1221. if(diffVal >= 310 && diffVal <= 900) {
  1222. leftWidth.value = diffVal;
  1223. }
  1224. }
  1225. document.onmouseup = () => {
  1226. document.onmousemove = null;
  1227. document.onmouseup = null;
  1228. }
  1229. }
  1230. </script>
  1231. <style lang="scss" scoped>
  1232. @import '~style/file/scoped/collection.scss';
  1233. .batch-set{
  1234. display: flex;
  1235. align-items: center;
  1236. margin-bottom: 10px;
  1237. .batch-set-input{
  1238. width: 80px;
  1239. }
  1240. }
  1241. .set-table{
  1242. height: calc(100% - 42px);
  1243. }
  1244. </style>
  1245. <style lang="scss">
  1246. @import '~style/file/collection.scss';
  1247. </style>