meta-table.vue 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. <template>
  2. <div v-loading="isLoading" class="hc-csc-meta-table-data">
  3. <el-scrollbar>
  4. <table class="hc-csc-meta-table" border="1">
  5. <template v-for="item in metaDataTableval" :key="item">
  6. <tr v-if="item.isType === 1" class="hc-csc-meta-table-tr">
  7. <td colspan="2" class="hc-csc-meta-table-td title">
  8. {{ item.containerName }}
  9. </td>
  10. </tr>
  11. <tr v-else class="hc-csc-meta-table-tr">
  12. <td class="hc-csc-meta-table-td name">
  13. {{ item.containerName }}
  14. </td>
  15. <td v-if="isEdit" class="hc-csc-meta-table-td val">
  16. {{ item.keyValue }}
  17. </td>
  18. <td v-else style="padding:0px;border: none;">
  19. <!-- <input type="input" data-id="project" name="project[]" class="iptclass" v-model="item.keyValue" :disabled="item.captureMode===1"> -->
  20. <el-input v-model="item.keyValue" type="input" data-id="project" name="project[]" :disabled="item.captureMode === 1" />
  21. </td>
  22. </tr>
  23. </template>
  24. </table>
  25. </el-scrollbar>
  26. </div>
  27. </template>
  28. <script setup>
  29. import { ref, watch } from 'vue'
  30. //参数
  31. const props = defineProps({
  32. projectId: {
  33. type: [String, Number],
  34. default: '',
  35. },
  36. contractId: {
  37. type: [String, Number],
  38. default: '',
  39. },
  40. loading: {
  41. type: Boolean,
  42. default: false,
  43. },
  44. isEdit:{
  45. type: Boolean,
  46. default: true,
  47. },
  48. metaDataTable:{
  49. type: Array,
  50. default: () => ([]),
  51. },
  52. })
  53. //事件
  54. const emit = defineEmits(['changemeDataTable'])
  55. //变量
  56. const projectId = ref(props.projectId)
  57. const contractId = ref(props.contractId)
  58. const isLoading = ref(props.loading)
  59. const isEditval = ref(props.isEdit)
  60. const metaDataTableval = ref(props.metaDataTable)
  61. //监听
  62. watch(() => [
  63. props.loading,
  64. props.isEdit,
  65. props.metaDataTable,
  66. ], ([loading, isEdit, metaDataTable]) => {
  67. isLoading.value = loading
  68. isEditval.value = isEdit
  69. metaDataTableval.value = metaDataTable
  70. })
  71. //深度监听
  72. watch(() => [
  73. metaDataTableval.value,
  74. ], ([val]) => {
  75. emit('changemeDataTable', val)
  76. }, {
  77. deep: true,
  78. })
  79. // 元数据
  80. const metaDataTable = ref([
  81. { type: 1, title: '聚合层次', val: '' },
  82. { type: 2, title: '来源', val: '' },
  83. { type: 1, title: '全宗名称', val: '' },
  84. { type: 1, title: '立档单位名称', val: '' },
  85. { type: 1, title: '电子文件号', val: '' },
  86. { type: 2, title: '文件联', val: '' },
  87. { type: 1, title: '目录文件', val: '' },
  88. { type: 1, title: '文件件数', val: '' },
  89. { type: 1, title: '文件页数', val: '' },
  90. { type: 1, title: '元数据目录文件', val: '' },
  91. { type: 1, title: '验证码', val: '' },
  92. { type: 2, title: '内容描述', val: '' },
  93. { type: 1, title: '题名', val: '' },
  94. { type: 1, title: '关键词', val: '' },
  95. { type: 1, title: '摘要', val: '' },
  96. { type: 1, title: '生成方式', val: '' },
  97. { type: 1, title: '责任者', val: '' },
  98. { type: 1, title: '文件创建日期', val: '' },
  99. { type: 2, title: '组件', val: '' },
  100. { type: 1, title: 'IP地址', val: '' },
  101. { type: 1, title: '桩号', val: '' },
  102. { type: 1, title: '上传时间', val: '' },
  103. { type: 2, title: '文件标识码', val: '' },
  104. { type: 1, title: '文号', val: '' },
  105. { type: 1, title: '表单标识码', val: '' },
  106. { type: 2, title: '竣工图', val: '' },
  107. { type: 1, title: '图号', val: '' },
  108. { type: 1, title: '图幅', val: '' },
  109. { type: 1, title: '图表来源', val: '' },
  110. { type: 1, title: '引用变更令编号', val: '' },
  111. { type: 2, title: '照片文件', val: '' },
  112. { type: 1, title: '主题', val: '' },
  113. { type: 1, title: '拍摄时间', val: '' },
  114. { type: 1, title: '拍摄地点', val: '' },
  115. { type: 1, title: '摄影者', val: '' },
  116. { type: 1, title: '背景', val: '' },
  117. { type: 1, title: '分组号', val: '' },
  118. { type: 1, title: '组内照片编号', val: '' },
  119. { type: 1, title: '水平分辨率', val: '' },
  120. { type: 1, title: '垂直分辨率', val: '' },
  121. { type: 1, title: '保管期限', val: '' },
  122. { type: 1, title: '格式信息', val: '' },
  123. { type: 2, title: '电子属性', val: '' },
  124. { type: 1, title: '位置', val: '' },
  125. { type: 1, title: '计算机文件名', val: '' },
  126. { type: 1, title: '计算机文件大小', val: '' },
  127. { type: 2, title: '数字化属性', val: '' },
  128. { type: 1, title: '扫描分辨率', val: '' },
  129. { type: 1, title: '扫描色彩模式', val: '' },
  130. { type: 2, title: '电子签名', val: '' },
  131. { type: 1, title: '签名类型', val: '' },
  132. { type: 1, title: '签名时间', val: '' },
  133. { type: 1, title: '签名人', val: '' },
  134. { type: 1, title: '建设项目', val: '' },
  135. { type: 2, title: '业务事项', val: '' },
  136. { type: 1, title: '单位工程', val: '' },
  137. { type: 1, title: '分部工程', val: '' },
  138. { type: 1, title: '分项工程', val: '' },
  139. { type: 1, title: '单位工程编码', val: '' },
  140. { type: 1, title: '分部工程编码', val: '' },
  141. { type: 1, title: '分项工程编码', val: '' },
  142. { type: 2, title: '责任者', val: '' },
  143. { type: 1, title: '责任者名称', val: '' },
  144. { type: 1, title: '个人职位', val: '' },
  145. { type: 1, title: '责任者手机号', val: '' },
  146. { type: 2, title: '关系实体', val: '' },
  147. { type: 1, title: '关系标识', val: '' },
  148. { type: 1, title: '关系类型', val: '' },
  149. { type: 1, title: '关系', val: '' },
  150. { type: 1, title: '相关实体标识', val: '' },
  151. ])
  152. </script>
  153. <style lang="scss" scoped>
  154. .hc-csc-meta-table-data {
  155. position: relative;
  156. height: 100%;
  157. .hc-csc-meta-table {
  158. border-spacing: 0;
  159. border: 1px solid #E9E9E9;
  160. border-collapse: collapse;
  161. width: 100%;
  162. .hc-csc-meta-table-tr {
  163. position: relative;
  164. background: #f1f5f8;
  165. color: #50545e;
  166. transition: background-color .25s ease;
  167. &:hover {
  168. background: var(--el-color-primary-light-9);
  169. }
  170. .hc-csc-meta-table-td {
  171. text-align: left;
  172. padding: 10px 12px;
  173. font-size: 14px;
  174. border: 1px solid #E9E9E9;
  175. &.name {
  176. width: 150px;
  177. }
  178. &.title {
  179. color: #1a1a1a;
  180. text-align: center;
  181. background-color: #dae8f3;
  182. }
  183. }
  184. }
  185. }
  186. .iptclass{
  187. width: 100%;
  188. height: 30px;
  189. border-radius: 28px;
  190. border: 1px solid #dae8f3;
  191. padding-left: 5px;
  192. outline-color: #d6eafa;
  193. }
  194. }
  195. html.dark{
  196. .hc-csc-meta-table-data .hc-csc-meta-table{
  197. border: 1px solid var(--el-color-primary);
  198. .hc-csc-meta-table-tr{
  199. background-color: transparent;
  200. color: white;
  201. .hc-csc-meta-table-td{
  202. border: 1px solid var(--el-color-primary);
  203. &.title {
  204. color: white;
  205. background-color: transparent;
  206. }
  207. }
  208. }
  209. }
  210. }
  211. </style>