阅行客电子档案
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.

712 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
  1. <template>
  2. <div class="preview-content right-preview">
  3. <el-form ref="addOrUpdateForm" :model="addOrUpdateForm" :rules="rules" :validate-on-rule-change="false" label-width="125px">
  4. <el-row :gutter="4" style="padding:0 20px">
  5. <draggable v-bind="{draggable:'.drag-item',animation:500}" :disabled="!isDraggable" @update="datadragEnd">
  6. <el-col v-for="(item,index) in formPreviewData" v-show="item.fieldName !== 'barcode'" :key="index" :class="['drag-item',item.fieldName === 'barcode'? 'barcode-input':'']" :span="item.isLine || item.fieldName === 'barcode' ? 24 : 12">
  7. <el-form-item :label="item.fieldCnName" :prop="item.fieldName">
  8. <!-- select :load-options="loadOptions"-->
  9. <treeselect
  10. v-if="item.isInputClass === 'select'"
  11. v-model="addOrUpdateForm[item.fieldName]"
  12. :options="item.options"
  13. :normalizer="normalizer"
  14. :clearable="false"
  15. placeholder=""
  16. :style="{ width: item.editLength+'px'}"
  17. :disabled="isDisabled"
  18. :validate-event="!isDisabled"
  19. no-options-text="无数据"
  20. @select="selectTree"
  21. @open="openTree(item)"
  22. >
  23. <div slot="value-label" slot-scope="{ node }">{{ getAutoNameUnknown(node.label) }}</div>
  24. </treeselect>
  25. <!-- text / number / textarea / popover -->
  26. <!-- :validate-event="isDisabled" -->
  27. <el-input
  28. v-if="item.isInputClass !== 'select' && item.isInputClass !== 'date' && item.fieldName !== 'barcode' "
  29. v-model="addOrUpdateForm[item.fieldName]"
  30. :type="item.isInputClass === 'popover'? 'text' : item.isInputClass"
  31. :rows="item.isInputClass === 'textarea' ? 3 : ''"
  32. :class="{'input-popover':(item.isInputClass === 'popover')}"
  33. :style="{ width: item.editLength+'px'}"
  34. :disabled="isDisabled"
  35. :validate-event="!isDisabled"
  36. @keyup.enter.native="isRepeatHandle(item)"
  37. @input="autoAddZero(item.isFilling, item.fieldName, addOrUpdateForm[item.fieldName], item.fillingDigit)"
  38. @blur="isRepeatHandle(item)"
  39. >
  40. <i v-if="item.isInputClass === 'popover'" slot="suffix" class="el-input__icon iconfont icon-weibiaoti-2" @click="handleCurrentFieldName(item)" />
  41. </el-input>
  42. <!-- date -->
  43. <el-date-picker v-if="item.isInputClass === 'date'" v-model="addOrUpdateForm[item.fieldName]" type="date" align="right" format="yyyy-MM-dd" placeholder="" :clearable="false" :style="{ width: item.editLength+'px'}" :disabled="isDisabled" :validate-event="!isDisabled" />
  44. </el-form-item>
  45. </el-col>
  46. </draggable>
  47. </el-row>
  48. <el-row v-if="!isHasCode && isDesFormType !== 'prearchiveLibrary'" class="preview-form-bottom">
  49. <el-col v-for="(item,index) in formPreviewData.slice(formPreviewData.length-1,formPreviewData.length)" :key="'barcode'+index">
  50. <el-form-item :label="item.fieldCnName" :prop="item.fieldName">
  51. <el-input v-model="addOrUpdateForm[item.fieldName]" type="text" style="width: 510px" :disabled="isDisabled" :validate-event="!isDisabled" @keyup.enter.native="isRepeatHandle(item)" @blur="isRepeatHandle(item)" />
  52. </el-form-item>
  53. </el-col>
  54. </el-row>
  55. <el-row v-if="isDesFormType === 'prearchiveLibrary'" class="preview-form-bottom">
  56. <el-col>
  57. <el-form-item label="电子原件" prop="fileOriginal" class="prearch-upload">
  58. <el-input
  59. v-model="fileOriginal"
  60. type="text"
  61. style="width: 446px"
  62. readonly
  63. />
  64. <div class="upload-btn">
  65. <input id="upFile" type="file" name="upFile" @change="changeFile($event)">
  66. <el-button size="small" type="primary"><i class="iconfont icon-shangchuan" />上传</el-button>
  67. </div>
  68. </el-form-item>
  69. </el-col>
  70. </el-row>
  71. </el-form>
  72. <!-- 弹框形式的内容展示 -->
  73. <el-dialog class="edit-form-dialog" :append-to-body="true" :visible="popoverVisible" :before-close="handleClose" :close-on-click-modal="false" title="字典列表">
  74. <span class="dialog-right-top" />
  75. <span class="dialog-left-bottom" />
  76. <div class="setting-dialog">
  77. <el-table ref="popoverTable" :data="popoverTableData" highlight-current-row row-key="id" :tree-props="{children: 'childMenus', hasChildren: 'hasChildren'}" style="width: 100%;" @selection-change="handleSelectionChange" @row-click="clickRowHandler">
  78. <el-table-column type="selection" width="55" />
  79. <el-table-column prop="dicName" label="字典名称" />
  80. <el-table-column prop="dicCode" label="字典代码" />
  81. <el-table-column prop="dicExplain" label="内容说明" />
  82. </el-table>
  83. </div>
  84. </el-dialog>
  85. </div>
  86. </template>
  87. <script>
  88. import { crud } from '@crud/crud'
  89. import { edit, FetchDoeditIsRepeat } from '@/api/archivesManage/archivesList'
  90. import { prearchEdit, FetchReDoeditIsRepeat } from '@/api/prearchiveLibrary/prearchiveLibrary'
  91. import { getNoFormatField } from '@/api/system/category/fileNoFormat'
  92. import draggable from 'vuedraggable'
  93. import Treeselect from '@riophae/vue-treeselect'
  94. import '@riophae/vue-treeselect/dist/vue-treeselect.css'
  95. import { FetchFindAllSubsetById } from '@/api/archivesConfig/dictDetail'
  96. import { parseTime, getCurrentTime } from '@/utils/index'
  97. export default {
  98. name: 'PreviewForm',
  99. components: { draggable, Treeselect },
  100. mixins: [crud()],
  101. props: {
  102. isDisabled: {
  103. type: Boolean,
  104. required: true
  105. },
  106. formPreviewData: {
  107. type: Array,
  108. required: true
  109. },
  110. selectedCategory: {
  111. type: Object,
  112. default: function() {
  113. return {}
  114. }
  115. },
  116. arcId: {
  117. type: String,
  118. default: ''
  119. },
  120. parentsId: {
  121. type: String,
  122. default: ''
  123. },
  124. isHasCode: {
  125. type: Boolean,
  126. required: true
  127. },
  128. isDraggable: {
  129. type: Boolean,
  130. default: false
  131. },
  132. isDesFormType: {
  133. type: String,
  134. default: ''
  135. }
  136. },
  137. data() {
  138. return {
  139. fileOriginal: null,
  140. addOrUpdateForm: {
  141. },
  142. rules: {
  143. },
  144. popoverTableData: [], // popover - popoverTableData
  145. popoverVisible: false, // popover - visible
  146. currentFieldName: null, // popover 当前fieldName
  147. treeCurrentFiled: null,
  148. categoryId: null,
  149. setParentsId: null,
  150. result: null,
  151. autoMatic: null,
  152. // isType: 'category',
  153. normalizer(node) {
  154. if (node.childMenus == null || node.childMenus === 'null') {
  155. delete node.childMenus
  156. }
  157. return {
  158. id: node.dicName,
  159. label: node.dicName,
  160. children: node.childMenus
  161. }
  162. },
  163. file: null, // 附件 change
  164. fileNames: '', // 附件 - name
  165. formatType: '', // 附件 - type
  166. postfix: '', // 附件 - 文件后缀
  167. fileSize: '', // 附件 - 大小
  168. filePath: '', // 附件 - path
  169. px: '', // 附件 - 分辨率
  170. nowDate: '', // 当前时间
  171. fileJsonString: null
  172. }
  173. },
  174. watch: {
  175. selectedCategory: function(newValue, oldValue) {
  176. },
  177. arcId: function(newValue, oldValue) {
  178. },
  179. parentsId: function(newValue, oldValue) {
  180. },
  181. isDesFormType: function(newValue, oldValue) {
  182. },
  183. formPreviewData: function() {
  184. this.editFormRow()
  185. // 区分 门类著录项 和 档案管理
  186. if (this.isDesFormType === 'category') {
  187. this.FetchNoFormatField(this.selectedCategory.id)
  188. }
  189. }
  190. },
  191. created() {
  192. this.editFormRow()
  193. },
  194. mounted() {
  195. // if (this.isType !== 'arcives') {
  196. // this.FetchNoFormatField(this.selectedCategory.id)
  197. // }
  198. },
  199. methods: {
  200. // 递归查询字典名称对应的字典代码
  201. // getNode(tree, dicName) {
  202. // for (let i = 0; i < tree.length; i++) {
  203. // if (tree[i].dicName === dicName) {
  204. // return tree[i]
  205. // } else {
  206. // if (tree[i].childMenus) {
  207. // return this.getNode(tree[i].childMenus, dicName)
  208. // }
  209. // }
  210. // }
  211. // },
  212. // 处理vue-treeSelect回显出现unknown问题
  213. getAutoNameUnknown(name) {
  214. if (name.lastIndexOf('unknown') > -1) {
  215. // 当treeselect翻译不了值时,name中有id,截取id,去调接口或者字典查询出名字
  216. return name.split('(')[0]
  217. } else {
  218. return name
  219. }
  220. },
  221. getNode(list, dicName) {
  222. let data;
  223. (list || []).map(item => {
  224. if (item.dicName === dicName) {
  225. data = [item]
  226. } else {
  227. const child = this.getNode(item.childMenus, dicName)
  228. if (child) {
  229. data = child
  230. }
  231. }
  232. })
  233. return data
  234. },
  235. // 自动生成
  236. handleAuto() {
  237. let string = ''
  238. const getAutoFiledVal = []
  239. this.autoMatic.forEach(async val => {
  240. if (!this.addOrUpdateForm[val.fieldName]) {
  241. string += ''
  242. } else {
  243. const fieldInfo = this.formPreviewData.find(element => element.fieldName === val.fieldName)
  244. if (fieldInfo.isInputClass === 'select' || fieldInfo.isInputClass === 'popover') {
  245. await FetchFindAllSubsetById({ id: fieldInfo.dictionaryConfigId.id }).then(res => {
  246. const option = this.getNode(res, this.addOrUpdateForm[val.fieldName])
  247. if (option) {
  248. const obj = {}
  249. obj.name = val.fieldName
  250. obj.val = option[0].dicCode + val.connector
  251. obj.sequence = val.sequence
  252. // string += '' + option[0].dicCode + val.connector
  253. getAutoFiledVal.push(obj)
  254. }
  255. })
  256. } else {
  257. const obj = {}
  258. obj.name = val.fieldName
  259. obj.val = this.addOrUpdateForm[val.fieldName] + val.connector
  260. obj.sequence = val.sequence
  261. // string += '' + this.addOrUpdateForm[val.fieldName] + val.connector
  262. getAutoFiledVal.push(obj)
  263. }
  264. }
  265. // 按照指定顺序排再拼接
  266. getAutoFiledVal.sort(this.compare('sequence'))
  267. string = getAutoFiledVal.map((item) => item.val).join('')
  268. this.formPreviewData.map(item => {
  269. if (item.isAutomatic) {
  270. this.$set(this.addOrUpdateForm, item.fieldName, string)
  271. }
  272. })
  273. })
  274. },
  275. // 排序
  276. compare(property) {
  277. return function(a, b) {
  278. var value1 = a[property]
  279. var value2 = b[property]
  280. return value1 - value2
  281. }
  282. },
  283. // 获取档号组成项
  284. FetchNoFormatField(categoryId) {
  285. getNoFormatField({ categoryId: categoryId }).then(res => {
  286. this.autoMatic = res
  287. // this.handleAuto()
  288. })
  289. },
  290. // 获取对应字典子集数据
  291. getAllSubset(item) {
  292. if (item.dictionaryConfigId) {
  293. FetchFindAllSubsetById({ id: item.dictionaryConfigId.id }).then(res => {
  294. if (item.isInputClass === 'select') {
  295. this.$set(item, 'options', res)
  296. } else if (item.isInputClass === 'popover') {
  297. this.popoverTableData = res
  298. }
  299. })
  300. }
  301. },
  302. // 判断重复api
  303. handlerIsRepeat(params, item) {
  304. if (this.isDesFormType !== 'prearchiveLibrary') {
  305. FetchDoeditIsRepeat(params).then(res => {
  306. if (res) {
  307. this.$message.error(item.fieldCnName + '不可重复')
  308. }
  309. })
  310. } else {
  311. FetchReDoeditIsRepeat(params).then(res => {
  312. if (res) {
  313. this.$message.error(item.fieldCnName + '不可重复')
  314. }
  315. })
  316. }
  317. },
  318. // input 判断是否重复
  319. isRepeatHandle(item) {
  320. // 自动重复字段 - 是否重复
  321. if (item.isRepeat) {
  322. let params
  323. if (this.isDesFormType !== 'prearchiveLibrary') {
  324. params = {
  325. 'categoryId': this.selectedCategory.id,
  326. 'archivesId': this.arcId,
  327. 'fieldName': item.fieldName,
  328. 'value': this.addOrUpdateForm[item.fieldName]
  329. }
  330. } else {
  331. params = {
  332. 'documentId': this.selectedCategory.id,
  333. 'archivesId': null,
  334. 'fieldName': item.fieldName,
  335. 'value': this.addOrUpdateForm[item.fieldName]
  336. }
  337. }
  338. this.handlerIsRepeat(params, item)
  339. }
  340. if (this.isDesFormType !== 'prearchiveLibrary') {
  341. if (!item.isAutomatic) {
  342. const index = this.autoMatic.findIndex(i => item.fieldName === i.fieldName)
  343. if (index !== -1) {
  344. this.handleAuto()
  345. }
  346. }
  347. }
  348. },
  349. // tree - open
  350. openTree(item) {
  351. this.treeCurrentFiled = item
  352. this.$set(item, 'options', [])
  353. this.getAllSubset(this.treeCurrentFiled)
  354. },
  355. // tree - select
  356. selectTree(val) {
  357. this.addOrUpdateForm[this.treeCurrentFiled.fieldName] = val.dicName
  358. // this.treeName = val.dicName
  359. // 自动重复字段 - 是否重复 - treeSelect方式
  360. if (this.treeCurrentFiled.isRepeat) {
  361. let params
  362. if (this.isDesFormType !== 'prearchiveLibrary') {
  363. params = {
  364. 'categoryId': this.selectedCategory.id,
  365. 'archivesId': this.arcId,
  366. 'fieldName': this.treeCurrentFiled.fieldName,
  367. 'value': val.dicName
  368. }
  369. } else {
  370. params = {
  371. 'documentId': this.selectedCategory.id,
  372. 'archivesId': null,
  373. 'fieldName': this.treeCurrentFiled.fieldName,
  374. 'value': val.dicName
  375. }
  376. }
  377. this.handlerIsRepeat(params, this.treeCurrentFiled)
  378. }
  379. const index = this.autoMatic.findIndex(i => this.treeCurrentFiled.fieldName === i.fieldName)
  380. if (index !== -1) {
  381. this.handleAuto()
  382. }
  383. },
  384. // popover - table 单选
  385. clickRowHandler(row) {
  386. this.$refs.popoverTable.clearSelection()
  387. this.$refs.popoverTable.toggleRowSelection(row)
  388. },
  389. // popover - table 选中得项
  390. handleSelectionChange(val) {
  391. if (val.length > 0) {
  392. this.addOrUpdateForm[this.currentFieldName] = val[0].dicName
  393. }
  394. this.$refs.popoverTable.clearSelection()
  395. this.popoverVisible = false
  396. const index = this.autoMatic.findIndex(i => this.currentFieldName === i.fieldName)
  397. if (index !== -1) {
  398. this.handleAuto()
  399. }
  400. },
  401. // popover - 当前选中得
  402. handleCurrentFieldName(item) {
  403. this.popoverVisible = true
  404. this.currentFieldName = item.fieldName
  405. this.getAllSubset(item)
  406. },
  407. // 预览和输入时,自动补零
  408. autoAddZero(isFilling, fieldName, value, fillingDigit) {
  409. if (isFilling) {
  410. this.addOrUpdateForm[fieldName] = value.toString().padStart(fillingDigit, '0').slice(-1 * fillingDigit)
  411. }
  412. },
  413. // 动态生成表单
  414. editFormRow() {
  415. this.rules = {}
  416. console.log(this.formPreviewData)
  417. this.formPreviewData.map(item => {
  418. if (item.isInputClass === 'select') {
  419. this.$set(item, 'options', [])
  420. this.$set(this.addOrUpdateForm, item.fieldName, null) // 防止unkonwn
  421. }
  422. if (item.isDefaultValue !== '') {
  423. this.$set(this.addOrUpdateForm, item.fieldName, item.isDefaultValue)
  424. } else {
  425. this.$set(this.addOrUpdateForm, item.fieldName, '')
  426. if (item.isInputClass === 'select') {
  427. this.$set(this.addOrUpdateForm, item.fieldName, null) // 防止unkonwn
  428. }
  429. }
  430. this.$set(this.rules, item.fieldName, [
  431. {
  432. required: !!item.isRequired,
  433. message: (item.isInputClass === 'text' ? '请输入' : '请选择') + item.fieldCnName,
  434. trigger: item.isInputClass === 'text' ? 'blur' : 'change'
  435. }
  436. ])
  437. })
  438. },
  439. // 预览界面排序
  440. datadragEnd(event) {
  441. // 调换顺序
  442. const oldIndex = event.oldIndex // 移动初始位置
  443. const newIndex = event.newIndex // 运动终止位置
  444. const diff = Math.abs(newIndex - oldIndex) // 插值绝对值
  445. const index = this.formPreviewData[oldIndex]
  446. if (oldIndex > newIndex) {
  447. for (let i = 0; i < diff; i++) {
  448. this.formPreviewData[oldIndex - i] = this.formPreviewData[oldIndex - i - 1]
  449. }
  450. this.formPreviewData[newIndex] = index
  451. } else {
  452. for (let i = 0; i < diff; i++) {
  453. this.formPreviewData[oldIndex + i] = this.formPreviewData[oldIndex + i + 1]
  454. }
  455. this.formPreviewData[newIndex] = index
  456. }
  457. },
  458. submitForm(formName, categoryId) {
  459. // 时间格式化
  460. this.formPreviewData.map(item => {
  461. if (item.isInputClass === 'date') {
  462. if (this.addOrUpdateForm[item.fieldName] !== '') {
  463. this.$set(this.addOrUpdateForm, item.fieldName, parseTime(this.addOrUpdateForm[item.fieldName]).split('00:00:00')[0])
  464. }
  465. }
  466. })
  467. if (this.selectedCategory.isType !== 4 || this.selectedCategory.isType !== 3) {
  468. this.setParentsId = this.parentsId
  469. } else {
  470. const parent_id = this.selectedCategory.pid
  471. if (parseInt(parent_id) === 0) {
  472. this.setParentsId = null
  473. } else {
  474. this.setParentsId = parent_id
  475. }
  476. }
  477. delete this.addOrUpdateForm.id
  478. this.$refs[formName].validate((valid) => {
  479. if (valid) {
  480. // 预归档库
  481. if (this.isDesFormType === 'prearchiveLibrary') {
  482. if (this.fileOriginal === null) {
  483. this.$message({
  484. message: '请上传电子文件',
  485. type: 'error'
  486. })
  487. return false
  488. }
  489. const params = {
  490. 'id': this.arcId,
  491. 'ids': null,
  492. 'documentId': categoryId,
  493. 'delMan': null,
  494. 'jsonString': JSON.stringify(this.addOrUpdateForm),
  495. 'fileJsonString': this.fileJsonString
  496. }
  497. prearchEdit(params).then(res => {
  498. if (res) {
  499. this.$message.success(res)
  500. this.$emit('close-dialog')
  501. this.crud.refresh()
  502. }
  503. })
  504. } else {
  505. const params = {
  506. 'id': this.arcId,
  507. 'categoryId': categoryId,
  508. 'parentsId': this.setParentsId,
  509. 'jsonString': JSON.stringify(this.addOrUpdateForm)
  510. }
  511. console.log(this.addOrUpdateForm)
  512. edit(params).then(res => {
  513. if (res) {
  514. this.$message.success(res)
  515. this.$emit('emitTableList')
  516. this.crud.refresh()
  517. localStorage.setItem('isForm', true)
  518. localStorage.removeItem('isDelt')
  519. }
  520. })
  521. }
  522. } else {
  523. console.log('error submit!!')
  524. return false
  525. }
  526. })
  527. },
  528. handleClose(done) {
  529. this.popoverVisible = false
  530. done()
  531. },
  532. // 选择附件
  533. async changeFile(e) {
  534. this.file = e.target.files[0]
  535. this.fileSize = this.file.size
  536. this.formatType = this.file.type.substring(0, this.file.type.indexOf('/'))
  537. this.fileNames = this.file.name
  538. this.postfix = this.file.name.substring(
  539. this.fileNames.lastIndexOf('.') + 1,
  540. this.fileNames.length
  541. )
  542. if (this.formatType === 'image') {
  543. const fileBase64 = await this.getBase64(this.file)
  544. const res = await this.getImgPx(fileBase64)
  545. this.px = res.width + 'px*' + res.height + 'px'
  546. } else {
  547. this.px = ''
  548. }
  549. this.uploadSave()
  550. // 上传附件
  551. // archivesUpload(this.baseApi + '/api/archives/uploadFile', this.file, this.categoryId).then(res => {
  552. // if (res.data.code === 200) {
  553. // this.filePath = res.data.data
  554. // this.uploadSave()
  555. // }
  556. // })
  557. },
  558. // 上传附件 - 选择上传即保存
  559. uploadSave() {
  560. this.nowDate = getCurrentTime()
  561. const json = {
  562. 'file_name': this.fileNames,
  563. 'file_size': this.fileSize,
  564. 'file_type': this.postfix,
  565. 'file_path': this.filePath,
  566. 'sequence': null,
  567. 'archive_id': this.arcId,
  568. 'file_dpi': this.px,
  569. 'file_thumbnail': '',
  570. 'create_time': this.nowDate,
  571. 'id': null
  572. }
  573. const arrayUpload = []
  574. arrayUpload.push(json)
  575. console.log(arrayUpload)
  576. this.fileOriginal = this.fileNames
  577. this.fileJsonString = JSON.stringify(arrayUpload)
  578. console.log(this.fileJsonString)
  579. },
  580. // 将上传的图片转为base64
  581. getBase64(file) {
  582. const reader = new FileReader()
  583. reader.readAsDataURL(file)
  584. return new Promise((resolve) => {
  585. reader.onload = () => {
  586. resolve(reader.result)
  587. }
  588. })
  589. },
  590. // 获取图片的分辨率
  591. getImgPx(img) {
  592. const image = new Image()
  593. image.src = img
  594. return new Promise((resolve) => {
  595. image.onload = () => {
  596. const width = image.width
  597. const height = image.height
  598. resolve({ width, height })
  599. }
  600. })
  601. }
  602. }
  603. }
  604. </script>
  605. <style lang="scss" scoped>
  606. @import "~@/assets/styles/mixin.scss";
  607. @import "~@/assets/styles/variables.scss";
  608. @mixin preview-border-style{
  609. [data-theme="dark"] & {
  610. border: 1px solid #3a99fd;
  611. }
  612. [data-theme="light"] & {
  613. border: 1px solid #EDEFF3;
  614. }
  615. }
  616. @mixin preview-border-color{
  617. [data-theme="dark"] & {
  618. border-color: #3a99fd;
  619. }
  620. [data-theme="light"] & {
  621. border-color: #EDEFF3;
  622. }
  623. }
  624. .preview-content {
  625. padding: 20px 0 0 0 !important;
  626. margin-top: 0 !important;
  627. border-radius: 4px;
  628. margin: 0 auto;
  629. border: 1px solid;
  630. @include preview-border-color;
  631. .el-row {
  632. margin-left: 0 !important;
  633. margin-right: 0 !important;
  634. }
  635. .el-col {
  636. padding-left: 0 !important;
  637. padding-right: 0 !important;
  638. }
  639. ::v-deep .el-form-item__label{
  640. @include tree_font_color;
  641. }
  642. ::v-deep .el-input__inner,
  643. ::v-deep .vue-treeselect__control,
  644. ::v-deep .el-textarea__inner {
  645. width: 100%;
  646. background-color: transparent;
  647. @include input_style;
  648. }
  649. ::v-deep .el-input__prefix {
  650. text-align: right;
  651. right: 5px !important;
  652. @include tree_font_color;
  653. }
  654. .input-popover {
  655. ::v-deep .el-input__suffix {
  656. @include tree_font_color;
  657. }
  658. }
  659. ::v-deep .el-date-editor {
  660. width: 225px;
  661. .el-input__inner {
  662. padding-left: 15px;
  663. }
  664. }
  665. ::v-deep .el-form-item--small .el-form-item__content {
  666. line-height: 30px;
  667. }
  668. }
  669. .preview-form-bottom{
  670. padding: 20px 20px 0 20px;
  671. border-top: 1px solid;
  672. @include preview-border-color;
  673. }
  674. .prearch-upload{
  675. margin-right: 0 !important;
  676. ::v-deep .el-form-item__content{
  677. width: 540px !important;
  678. display: flex;
  679. justify-content: space-between;
  680. .upload-btn{
  681. position: relative;
  682. width:96px;
  683. margin-right: 0 !important;
  684. margin-left: 10px;
  685. overflow: initial !important;
  686. #upFile{
  687. position: absolute;
  688. left: 0;
  689. top: 0;
  690. // opacity: 0;
  691. width: 84px;
  692. height: 34px;
  693. }
  694. .el-button{
  695. margin-top: -2px;
  696. }
  697. }
  698. }
  699. }
  700. </style>