阅行客电子档案
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

611 lines
24 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div>
  3. <!-- 批量成件 -->
  4. <el-dialog class="batch-form" append-to-body :modal-append-to-body="false" :close-on-click-modal="false" :before-close="handleClose" :visible="batchVisible" title="批量成件">
  5. <span class="dialog-right-top" />
  6. <span class="dialog-left-bottom" />
  7. <div class="setting-dialog">
  8. <el-form ref="form" :inline="true" :model="form" :rules="rules" size="small" label-width="130px">
  9. <el-form-item label="对应规则" prop="rules">
  10. <el-select v-model="form.ruleName" placeholder="请选择" style="width: 225px;" @change="selectRules">
  11. <el-option
  12. v-for="item in rulesOptions"
  13. :key="item.value"
  14. :label="item.label"
  15. :value="item.value"
  16. />
  17. </el-select>
  18. </el-form-item>
  19. <el-form-item label="归档范围" prop="scope">
  20. <el-input v-model="form.scope" type="text" readonly>
  21. <i slot="suffix" class="el-input__icon iconfont icon-sousuo" @click="selectScope" />
  22. </el-input>
  23. </el-form-item>
  24. <el-form-item label="源分类" prop="documentName">
  25. <el-input v-model="form.documentName" type="text" disabled />
  26. </el-form-item>
  27. <el-form-item label="目标门类" prop="categoryId">
  28. <treeselect
  29. v-model="form.categoryId"
  30. :options="categoryTree"
  31. flat
  32. :multiple="false"
  33. :normalizer="normalizer"
  34. :default-expand-level="6"
  35. placeholder="请选择目标门类(整理库/管理库门类)"
  36. @select="handleSelectCategory"
  37. />
  38. </el-form-item>
  39. </el-form>
  40. <div v-loading="fieldLoading" class="corres-field-main">
  41. <div class="corres-field-list corres-field-left">
  42. <div class="corres-field-title">
  43. <p>字段取值</p>
  44. </div>
  45. <div class="field-list">
  46. <div v-for="(item, index) in selectStatus" :key="index" class="field-item">
  47. <el-select :key="index" v-model="item.fiedType" @change="selectChangeFiedType(index)">
  48. <el-option
  49. v-for="v in fiedOption"
  50. :key="v.value"
  51. :label="v.label"
  52. :value="v.value"
  53. />
  54. </el-select>
  55. </div>
  56. </div>
  57. </div>
  58. <div class="corres-field-list corres-field-middle">
  59. <div class="corres-field-title">
  60. <p>源分类文件库-文件表</p>
  61. <span>{{ form.documentName }}</span>
  62. </div>
  63. <div v-loading="leftLoading" class="field-list">
  64. <div v-for="(item, index) in selectStatus" :key="index" class="field-item">
  65. <el-select v-if="item.mode" :key="index" v-model="item.value" @change="selectChange($event,index)">
  66. <el-option value="">请选择</el-option>
  67. <el-option
  68. v-for="v in options"
  69. :key="v.id"
  70. :label="v.fieldCnName"
  71. :value="v"
  72. />
  73. </el-select>
  74. <p v-if="!item.mode" @click="textMode(index)">
  75. {{ item.value }}
  76. </p>
  77. </div>
  78. </div>
  79. </div>
  80. <div class="corres-field-list corres-field-right">
  81. <div class="corres-field-title">
  82. <p>目标门类整理库/管理库-文件表</p>
  83. <span>{{ selectedCategoryName }}</span>
  84. </div>
  85. <div v-loading="rightLoading" class="field-list">
  86. <div v-if="isCorrField">
  87. <div v-for="(item,index) in allFieldData" :key="index" class="field-item">
  88. <p>{{ item.categoryFieldId && item.categoryFieldId.fieldCnName }}</p>
  89. <div class="field-state"><span :class=" item.categoryFieldId && item.categoryFieldId.isInput ? 'is-select' : 'is-hide'">{{ item.categoryFieldId && item.categoryFieldId.isInput ? '显示': '隐藏' }}</span></div>
  90. </div>
  91. </div>
  92. <div v-else>
  93. <div v-for="(item,index) in allCorrField" :key="index" class="field-item">
  94. <p>{{ item.fieldCnName }}</p>
  95. <div class="field-state"><span :class=" item.isInput ? 'is-select' : 'is-hide'">{{ item.isInput ? '显示': '隐藏' }}</span></div>
  96. </div>
  97. </div>
  98. </div>
  99. </div>
  100. <div v-if="allFieldData.length === 0 && allCorrField.length === 0" class="empty-data" />
  101. </div>
  102. <div slot="footer" class="dialog-footer">
  103. <el-button type="text" @click="handleClose">取消</el-button>
  104. <el-button type="primary" @click="handleComfirmBatchToFile">确定</el-button>
  105. </div>
  106. </div>
  107. </el-dialog>
  108. <ScopeModule ref="scopeModule" @getScope="hanleScopeSelect" />
  109. </div>
  110. </template>
  111. <script>
  112. import { preLibraryCrud } from '../mixins/index'
  113. import { FetchInitFieldMate, FetchMateByDocumentId, FetchDetailsByDocumentIdAndCategoryId } from '@/api/system/fieldMate'
  114. import { FetchInitDocumentFieldByPid } from '@/api/system/fileLibrary/fileLibrary'
  115. import { FetchCategoryMenu, FetchInitCategoryFieldByPid } from '@/api/system/category/category'
  116. import { FetchArchivesScopeByCategoryId } from '@/api/system/archivesScope'
  117. import { FetchCheckRepeat } from '@/api/system/fieldMate'
  118. import { FetchBatchToFile } from '@/api/prearchiveLibrary/prearchiveLibrary'
  119. import Treeselect from '@riophae/vue-treeselect'
  120. import '@riophae/vue-treeselect/dist/vue-treeselect.css'
  121. // import { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
  122. import ScopeModule from './scope'
  123. export default {
  124. name: 'BatchFile',
  125. components: { Treeselect, ScopeModule },
  126. mixins: [preLibraryCrud],
  127. props: {
  128. selectedDocument: {
  129. type: Object,
  130. default: function() {
  131. return {}
  132. }
  133. }
  134. },
  135. data() {
  136. return {
  137. selectionsArc: [],
  138. batchVisible: false,
  139. rulesOptions: [],
  140. categoryTree: [],
  141. form: {
  142. ruleName: null,
  143. scope: null,
  144. documentId: null,
  145. documentName: '',
  146. categoryId: null
  147. },
  148. batchCategory: {},
  149. selectedCategoryName: null,
  150. scopeVisible: false,
  151. scopeSelection: null,
  152. loadSource: [],
  153. rules: {
  154. categoryId: [
  155. { required: true, message: '请选择档案门类', trigger: 'change' }
  156. ]
  157. },
  158. fiedOption: [{
  159. 'label': '默认值',
  160. 'value': 2
  161. }, {
  162. 'label': '字段值',
  163. 'value': 1
  164. }],
  165. fiedType: null,
  166. selectStatus: [],
  167. options: [],
  168. fieldLoading: false,
  169. allFieldData: [],
  170. leftLoading: false,
  171. rightLoading: false,
  172. isCorrField: true,
  173. allCorrField: [],
  174. isTest: false
  175. }
  176. },
  177. watch: {
  178. selectedDocument: function(newValue, oldValue) {
  179. this.form.documentName = newValue.cnName
  180. this.getMateByDocumentId()
  181. this.getCategoryDataTree()
  182. }
  183. },
  184. created() {
  185. },
  186. mounted() {
  187. },
  188. methods: {
  189. // 根据预归档库获取对应规则
  190. getMateByDocumentId() {
  191. const params = {
  192. 'documentId': this.selectedDocument.id
  193. }
  194. FetchMateByDocumentId(params).then(res => {
  195. this.rulesOptions = res.map(item => {
  196. const json = {}
  197. json.label = item.ruleName
  198. json.value = item.id
  199. return json
  200. })
  201. })
  202. },
  203. getInitDetail(id) {
  204. FetchInitFieldMate({ 'id': id }).then((res) => {
  205. this.selectedCategoryName = res.categoryName
  206. this.batchCategory = res.fieldMateDetails[0].pid.categoryId
  207. this.form.categoryId = res.fieldMateDetails[0].pid.categoryId.pid
  208. this.getArchivesScopeByCategoryId()
  209. }).catch(err => {
  210. console.log(err)
  211. })
  212. },
  213. selectRules(val) {
  214. this.getInitDetail(val)
  215. this.selectStatus = []
  216. this.allFieldData = []
  217. this.allCorrField = []
  218. this.isCorrField = true
  219. this.isTest = false
  220. },
  221. // 目标门类
  222. getCategoryDataTree() {
  223. FetchCategoryMenu().then(res => {
  224. this.categoryTree = this.filterData(res)
  225. })
  226. },
  227. // 根据pid获取门类字段
  228. initDocunmentFiledList(documentId) {
  229. // 文件库字段
  230. this.leftLoading = true
  231. FetchInitDocumentFieldByPid({ documentId: documentId, isType: 2 }).then((res) => {
  232. this.options = res.sort((a, b) => {
  233. if (a.isInput !== b.isInput) {
  234. return a.isInput ? -1 : 1
  235. } else {
  236. return a.isSequence - b.isSequence
  237. }
  238. })
  239. this.leftLoading = false
  240. })
  241. },
  242. // 根据pid获取门类字段
  243. initCategoryFiledList(categoryId) {
  244. // 门类字段
  245. this.rightLoading = true
  246. FetchInitCategoryFieldByPid({ categoryId: categoryId, categoryLevel: 3, isType: 2 }).then((res) => {
  247. this.allCorrField = res.sort((a, b) => {
  248. if (a.isInput !== b.isInput) {
  249. return a.isInput ? -1 : 1
  250. } else {
  251. return a.isSequence - b.isSequence
  252. }
  253. })
  254. res.forEach((item, index) => {
  255. this.selectStatus.push({ mode: true, fiedType: 1, value: '', field: item, isInput: item.isInput })
  256. })
  257. if (this.form.scope) {
  258. const indexClass = res.findIndex(item => item.fieldName === 'archive_ctg_no')
  259. const indexRetention = res.findIndex(item => item.fieldName === 'retention')
  260. if (indexClass !== -1 && this.scopeSelection[0].archivesClass !== null) {
  261. this.selectStatus.splice(indexClass, 1, { mode: false, fiedType: 2, value: this.scopeSelection[0].archivesClass.name, field: this.allCorrField[indexClass], isInput: this.allCorrField[indexClass].isInput })
  262. }
  263. if (indexRetention !== -1 && this.scopeSelection[0].retention !== '') {
  264. this.selectStatus.splice(indexRetention, 1, { mode: false, fiedType: 2, value: this.scopeSelection[0].retention, field: this.allCorrField[indexRetention], isInput: this.allCorrField[indexRetention].isInput })
  265. }
  266. }
  267. this.rightLoading = false
  268. })
  269. },
  270. // 根据预归档库和门类获取详情
  271. getDetailsByDocumentIdAndCategoryId() {
  272. this.fieldLoading = true
  273. const params = {
  274. 'categoryId': this.form.categoryId,
  275. 'documentId': this.selectedDocument.id
  276. }
  277. this.initDocunmentFiledList(this.selectedDocument.id,)
  278. FetchDetailsByDocumentIdAndCategoryId(params).then(res => {
  279. this.allFieldData = res
  280. res.forEach((item, index) => {
  281. this.selectStatus.push({ mode: false, fiedType: item.categoryFieldId && item.categoryFieldId.isDefaultValue === '' ? 1 : 2, value: item.categoryFieldId && item.categoryFieldId.isDefaultValue === '' ? (item.documentFieldId && item.documentFieldId.fieldCnName) : item.categoryFieldId && item.categoryFieldId.isDefaultValue, field: item.documentFieldId, isInput: item.documentFieldId && item.documentFieldId.isInput })
  282. })
  283. if (this.form.scope) {
  284. const indexClass = res.findIndex(item => item.categoryFieldId.fieldName === 'archive_ctg_no')
  285. const indexRetention = res.findIndex(item => item.categoryFieldId.fieldName === 'retention')
  286. if (indexClass !== -1 && this.scopeSelection[0].archivesClass !== null) {
  287. this.selectStatus.splice(indexClass, 1, { mode: false, fiedType: 2, value: this.scopeSelection[0].archivesClass.name, field: this.allFieldData[indexClass].documentFieldId, isInput: this.allFieldData[indexClass].documentFieldId.isInput })
  288. }
  289. if (indexRetention !== -1 && this.scopeSelection[0].retention !== '') {
  290. this.selectStatus.splice(indexRetention, 1, { mode: false, fiedType: 2, value: this.scopeSelection[0].retention, field: this.allFieldData[indexRetention].documentFieldId, isInput: this.allFieldData[indexRetention].documentFieldId.isInput })
  291. }
  292. }
  293. this.fieldLoading = false
  294. })
  295. },
  296. // 根据子门类id获取档案归档范围
  297. getArchivesScopeByCategoryId() {
  298. const params = {
  299. 'categoryId': this.form.categoryId
  300. }
  301. FetchArchivesScopeByCategoryId(params).then(res => {
  302. console.log(res)
  303. if (Array.isArray(res) && res.length === 1) {
  304. this.form.scope = res[0].scopeName
  305. this.scopeSelection = res
  306. } else {
  307. this.form.scope = null
  308. console.log('有多个“归档范围”或者无归档范围')
  309. }
  310. this.getDetailsByDocumentIdAndCategoryId()
  311. })
  312. },
  313. handleSelectCategory(val) {
  314. console.log(val)
  315. this.selectedCategoryName = val.cnName
  316. this.form.categoryId = val.id
  317. this.batchCategory = val
  318. // this.getArchivesScopeByCategoryId()
  319. const params = {
  320. 'categoryId': this.form.categoryId
  321. }
  322. FetchArchivesScopeByCategoryId(params).then(res => {
  323. console.log('resddddd', res)
  324. if (Array.isArray(res) && res.length === 1) {
  325. this.form.scope = res[0].scopeName
  326. this.scopeSelection = res
  327. } else {
  328. this.form.scope = null
  329. console.log('有多个“归档范围”或者无归档范围')
  330. }
  331. this.getCheckRepeat()
  332. })
  333. },
  334. // 归档范围选择
  335. selectScope() {
  336. this.$refs.scopeModule.scopeVisible = true
  337. this.$nextTick(() => {
  338. if (this.form.categoryId) {
  339. this.$refs.scopeModule.$refs.tree2.setCurrentKey(this.form.categoryId)
  340. this.$refs.scopeModule.handleNodeClick2(this.batchCategory)
  341. }
  342. })
  343. },
  344. hanleScopeSelect(val, category) {
  345. if (val.length !== 0) {
  346. this.scopeSelection = val
  347. this.form.scope = '【' + val[0].scopeCode + '】' + val[0].scopeName
  348. if (category.arrangeType) {
  349. this.form.categoryId = category.id
  350. } else {
  351. this.form.categoryId = category.pid
  352. }
  353. this.batchCategory = category
  354. this.selectedCategoryName = category.cnName
  355. this.$nextTick(() => {
  356. this.getCheckRepeat()
  357. })
  358. }
  359. },
  360. getCheckRepeat() {
  361. const params = {
  362. 'categoryId': this.form.categoryId,
  363. 'documentId': this.selectedDocument.id
  364. }
  365. this.fieldLoading = true
  366. FetchCheckRepeat(params).then((res) => {
  367. if (JSON.stringify(res) === JSON.stringify({})) {
  368. console.log('不存在对应关系')
  369. this.isCorrField = false
  370. this.$message({
  371. message: '目标门类与当前源分类不存在对应关系',
  372. type: 'warning'
  373. })
  374. this.form.ruleName = null
  375. this.selectStatus = []
  376. this.allCorrField = []
  377. this.initDocunmentFiledList(this.selectedDocument.id)
  378. this.initCategoryFiledList(this.form.categoryId)
  379. } else {
  380. console.log('存在对应关系')
  381. this.isCorrField = true
  382. this.selectStatus = []
  383. this.allFieldData = []
  384. this.form.ruleName = res.id
  385. this.getDetailsByDocumentIdAndCategoryId()
  386. }
  387. this.fieldLoading = false
  388. })
  389. },
  390. // 切换 "字段值" / "默认值"
  391. selectChangeFiedType(index) {
  392. this.options.forEach((item) => {
  393. if (this.selectStatus[index].fiedType === 2) {
  394. if (!this.isCorrField) {
  395. console.log('1111')
  396. this.selectStatus.splice(index, 1, { mode: false, fiedType: this.selectStatus[index].fiedType, value: this.selectStatus[index].fiedType === 1 ? this.selectStatus[index].value : this.allCorrField[index].isDefaultValue, field: this.selectStatus[index].field, isInput: this.selectStatus[index].field.isInput })
  397. if (this.form.scope) {
  398. if (this.allCorrField[index].fieldName === 'archive_ctg_no' && this.scopeSelection[0].archivesClass !== null) {
  399. this.selectStatus.splice(index, 1, { mode: false, fiedType: 2, value: this.scopeSelection[0].archivesClass.name, field: this.allCorrField[index], isInput: this.allCorrField[index].isInput })
  400. }
  401. if (this.allCorrField[index].fieldName === 'retention' && this.scopeSelection[0].retention !== null) {
  402. this.selectStatus.splice(index, 1, { mode: false, fiedType: 2, value: this.scopeSelection[0].retention, field: this.allCorrField[index], isInput: this.allCorrField[index].isInput })
  403. }
  404. }
  405. } else {
  406. console.log('2222')
  407. this.selectStatus.splice(index, 1, { mode: false, fiedType: this.selectStatus[index].fiedType, value: this.allFieldData[index].categoryFieldId.isDefaultValue, field: this.selectStatus[index].field, isInput: this.selectStatus[index].field.isInput })
  408. }
  409. } else {
  410. if (!this.isCorrField) {
  411. this.isTest = true
  412. } else {
  413. this.isTest = false
  414. }
  415. this.selectStatus.splice(index, 1, { mode: true, fiedType: this.selectStatus[index].fiedType, value: '', field: this.selectStatus[index].field, isInput: this.selectStatus[index].field.isInput })
  416. }
  417. })
  418. },
  419. selectChange(val, index) {
  420. this.options.forEach((item) => {
  421. if (!this.isCorrField && this.allCorrField[index].isDefaultValue !== '') {
  422. if (this.isTest) {
  423. this.selectStatus.splice(index, 1, { mode: false, fiedType: 1, value: val.fieldCnName, field: val, isInput: val.isInput })
  424. } else {
  425. this.selectStatus.splice(index, 1, { mode: false, fiedType: 2, value: this.allCorrField[index].isDefaultValue === '' ? this.selectStatus[index].value : this.allCorrField[index].isDefaultValue, field: val, isInput: val.isInput })
  426. }
  427. } else {
  428. if (this.selectStatus[index].fiedType === 1) {
  429. this.selectStatus.splice(index, 1, { mode: false, fiedType: 1, value: val.fieldCnName, field: val, isInput: val.isInput })
  430. } else {
  431. if (item.fieldCnName === this.selectStatus[index].value) {
  432. console.log('item444', item)
  433. this.selectStatus.splice(index, 1, { mode: false, fiedType: this.allFieldData[index].categoryFieldId.isDefaultValue === '' ? 1 : 2, value: this.allFieldData[index].categoryFieldId.isDefaultValue === '' ? val.fieldCnName : this.allFieldData[index].categoryFieldId.isDefaultValue, field: val, isInput: val.isInput })
  434. }
  435. }
  436. }
  437. })
  438. },
  439. textMode(index) {
  440. if (this.selectStatus[index].fiedType === 1) {
  441. this.selectStatus.splice(index, 1, { mode: true, fiedType: 1, value: '', field: null, isInput: this.selectStatus[index].isInput })
  442. }
  443. },
  444. handleClose(done) {
  445. this.batchVisible = false
  446. Object.assign(this.form, {
  447. ruleName: null,
  448. scope: null,
  449. documentId: null,
  450. categoryId: null
  451. })
  452. this.selectedCategoryName = null
  453. this.selectedCategory = null
  454. this.allFieldData = []
  455. this.allCorrField = []
  456. this.isTest = false
  457. this.batchCategory = {}
  458. // done()
  459. },
  460. handleComfirmBatchToFile() {
  461. const getIndicesByMode = (modeValue) => {
  462. return this.selectStatus.reduce((indices, item, index) => {
  463. if (item.mode === modeValue) {
  464. indices.push(index)
  465. }
  466. return indices
  467. }, [])
  468. }
  469. const indices = getIndicesByMode(false)
  470. console.log(indices)
  471. const filteredFields = indices.map(index => this.selectStatus[index])
  472. const categoryCorrField = indices.map(index => this.allCorrField[index])
  473. console.log('filteredFields', filteredFields)
  474. console.log('categoryCorrField', categoryCorrField)
  475. let dtos
  476. if (!this.isCorrField) {
  477. dtos = categoryCorrField.map((item, index) => {
  478. let documentValue
  479. console.log(this.scopeSelection)
  480. console.log(filteredFields[index])
  481. if (filteredFields[index].fiedType === 2) {
  482. if (item.fieldName === 'archive_ctg_no' && this.scopeSelection[0].archivesClass !== null) {
  483. console.log('111')
  484. documentValue = this.scopeSelection[0].archivesClass.name
  485. } else if (item.fieldName === 'retention' && this.scopeSelection[0].retention !== null) {
  486. console.log('222')
  487. documentValue = this.scopeSelection[0].retention
  488. } else {
  489. console.log('333')
  490. documentValue = item.isDefaultValue
  491. }
  492. } else {
  493. console.log('444')
  494. documentValue = filteredFields[index].field.fieldName
  495. }
  496. return {
  497. 'categoryValue': item.fieldName,
  498. 'documentValue': documentValue,
  499. 'getType': filteredFields[index].fiedType,
  500. 'isRequired': item.isRequired
  501. }
  502. })
  503. } else {
  504. dtos = this.allFieldData.map((item, index) => {
  505. return {
  506. 'categoryValue': item.categoryFieldId.fieldName,
  507. 'documentValue': this.selectStatus[index].fiedType === 2 ? item.categoryFieldId.isDefaultValue : this.selectStatus[index].field.fieldName,
  508. 'getType': this.selectStatus[index].fiedType,
  509. 'isRequired': item.categoryFieldId.isRequired
  510. }
  511. })
  512. }
  513. const archivesIds = this.selectionsArc.map(item => {
  514. return item.id
  515. })
  516. const params = {
  517. 'archivesIds': archivesIds,
  518. 'documentId': this.selectedDocument.id,
  519. 'categoryId': this.form.categoryId,
  520. 'dtos': dtos
  521. }
  522. console.log(params)
  523. FetchBatchToFile(params).then((res) => {
  524. console.log(res)
  525. if (res === 'SUCCESS') {
  526. this.$emit('refresh')
  527. this.batchVisible = false
  528. Object.assign(this.form, {
  529. ruleName: null,
  530. scope: null,
  531. documentId: null,
  532. categoryId: null
  533. })
  534. this.selectedCategoryName = null
  535. this.selectedCategory = null
  536. this.allFieldData = []
  537. this.allCorrField = []
  538. this.isTest = false
  539. this.batchCategory = {}
  540. }
  541. })
  542. },
  543. normalizer(node) {
  544. if (node.children && !node.children.length) {
  545. delete node.children
  546. }
  547. return {
  548. id: node.id,
  549. label: node.cnName,
  550. children: node.children,
  551. isDisabled: node.isType !== 2
  552. }
  553. }
  554. }
  555. }
  556. </script>
  557. <style lang="scss" scoped>
  558. @import "~@/assets/styles/prearchive-library.scss";
  559. .batch-form{
  560. ::v-deep .el-dialog{
  561. width: 828px !important;
  562. }
  563. .corres-field-left{
  564. width: 146px;
  565. .corres-field-title{
  566. p{
  567. padding-top: 0 !important;
  568. line-height: 60px;
  569. }
  570. }
  571. .field-list{
  572. .field-item{
  573. width: 146px;
  574. ::v-deep .el-select{
  575. width: 145px !important;
  576. border-right: none;
  577. }
  578. }
  579. }
  580. }
  581. .corres-field-middle{
  582. .field-list{
  583. .field-item{
  584. width: 315px;
  585. ::v-deep .el-select{
  586. width: 314px !important;
  587. border-right: none;
  588. }
  589. }
  590. }
  591. }
  592. }
  593. .corres-field-main{
  594. position: relative;
  595. }
  596. .empty-data{
  597. position: absolute;
  598. top: 60px;
  599. left: 0;
  600. width: 100%;
  601. height: calc(100% - 60px);
  602. background: url('~@/assets/images/system/zwsj.png') no-repeat center center #fff;
  603. background-size: 282px 182px;
  604. }
  605. </style>