|
|
@@ -239,6 +239,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<previewImageTool ref="previewImageToolRef" />
|
|
|
+ <selectUserDialog ref="selectUserDialogRef" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -249,6 +250,7 @@ import previewImageTool from '../../components/tool/previewImageTool.vue'
|
|
|
import MarkdownIt from 'markdown-it'
|
|
|
import useImport from '@/hooks/useImport'
|
|
|
import { lang } from '@/main'
|
|
|
+import selectUserDialog from './selectUserDialog.vue'
|
|
|
const props = defineProps<{
|
|
|
visible: number[];
|
|
|
workIndex: number;
|
|
|
@@ -278,6 +280,8 @@ const workDetail = computed(() => {
|
|
|
|
|
|
// 预览图片组件
|
|
|
const previewImageToolRef = ref<any>(null)
|
|
|
+// 选择用户组件
|
|
|
+const selectUserDialogRef = ref<any>(null)
|
|
|
|
|
|
const md = new MarkdownIt()
|
|
|
const { getFile } = useImport()
|
|
|
@@ -597,6 +601,7 @@ const setEchartsArea1 = () => {
|
|
|
},
|
|
|
],
|
|
|
}
|
|
|
+
|
|
|
_work.choiceUser.forEach((i: any, idx: number) => {
|
|
|
// 如果是图片,存src对象,否则为字符串
|
|
|
if (
|
|
|
@@ -637,6 +642,16 @@ const setEchartsArea1 = () => {
|
|
|
// ]
|
|
|
// }
|
|
|
myChart.value.setOption(option)
|
|
|
+
|
|
|
+ myChart.value.off('click')
|
|
|
+ myChart.value.on('click', (params: any) => {
|
|
|
+ const idx = params.dataIndex
|
|
|
+ const selectedOption = _work.choiceUser[idx]
|
|
|
+ if (selectedOption && selectUserDialogRef.value) {
|
|
|
+ // console.log(selectedOption)
|
|
|
+ selectUserDialogRef.value.open(selectedOption)
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
|