刘洋 1 vuosi sitten
vanhempi
commit
511d9ef4ba

+ 2 - 0
src/components/global/index.js

@@ -25,6 +25,7 @@ import MyDialog from './my-dialog/index.vue';
 import SButton from './s-buttons/index.vue';
 import ImageView from './image-viewer/index.vue';
 import Robot from './robot/index.vue';
+import MyTable from './my-table/index.vue';
 
 use([
   CanvasRenderer,
@@ -52,5 +53,6 @@ export default {
     Vue.component('SButton', SButton);
     Vue.component('ImageView', ImageView);
     Vue.component('Robot', Robot);
+    Vue.component('MyTable', MyTable);
   },
 };

+ 13 - 0
src/components/global/my-table/index.vue

@@ -0,0 +1,13 @@
+<template>
+  <t-table v-bind="attrs">
+    <slot v-for="item in slotKeys" :key="item" :name="item"></slot>
+  </t-table>
+</template>
+<script setup name="MyDialog">
+import { useAttrs, useSlots, ref, watch, computed } from 'vue';
+const attrs = useAttrs();
+const slots = useSlots();
+const slotKeys = computed(() => {
+  return Object.keys(slots);
+});
+</script>

+ 1 - 1
src/views/work-hours/work-hours-manage/abnormal-check/abnormal-detail-dialog.vue

@@ -184,7 +184,7 @@ const stepHistoryShow = ref(false);
 const flowApproveHistoryList = ref([]);
 
 const getUrls = (type) => {
-  const list = props.row.attachmentPaths?.split(',') || [];
+  const list = props.row.attachmentPaths?.split(';') || [];
   const imgs = ['jpg', 'png', 'jpeg'];
   if (type === 'image') {
     return list.filter((item) => {

+ 1 - 1
src/views/work-hours/work-hours-manage/abnormal-check/done-check.vue

@@ -176,7 +176,7 @@ const computedParams = computed(() => {
 });
 
 const getUrls = (data, type) => {
-  const list = data ? data.split(',') : [];
+  const list = data ? data.split(';') : [];
   const imgs = ['jpg', 'png', 'jpeg'];
   if (type === 'image') {
     return list.filter((item) => {