|
@@ -67,8 +67,10 @@
|
|
|
import { feedbackVO } from '../../lib/type';
|
|
|
import { formatDate } from '@/lib/util'
|
|
|
|
|
|
- import { useGlobalStore } from '@/lib/store';
|
|
|
- const globalStore = useGlobalStore();
|
|
|
+ import { useUserStore } from '@/lib/store';
|
|
|
+ import { storeToRefs } from 'pinia';
|
|
|
+ const store = useUserStore();
|
|
|
+ const { globalParameter } = storeToRefs(store);
|
|
|
|
|
|
const formRules = reactive({
|
|
|
djr: {
|
|
@@ -155,7 +157,7 @@
|
|
|
// 提交请求
|
|
|
try {
|
|
|
if (uniType.value == 'add') {
|
|
|
- await rest.post('/zyyp/feedback/create', formData.value,globalStore.authCode)
|
|
|
+ await rest.post('/zyyp/feedback/create', formData.value,globalParameter.value.authCode)
|
|
|
dlg.success('已新增反馈登记!')
|
|
|
}
|
|
|
link.back()
|
|
@@ -170,10 +172,10 @@
|
|
|
// 初始化数据
|
|
|
const getInfo = async () => {
|
|
|
try {
|
|
|
- formData.value.djr = globalStore.userName
|
|
|
- formData.value.zjhm = globalStore.zjhm
|
|
|
+ formData.value.djr = globalParameter.value.userName
|
|
|
+ formData.value.zjhm = globalParameter.value.zjhm
|
|
|
// 医疗机构列表
|
|
|
- let res = await rest.get('/system/dept/list-all-simple2',{ orgType: 1 },globalStore.authCode)
|
|
|
+ let res = await rest.get('/system/dept/list-all-simple2',{ orgType: 1 },globalParameter.value.authCode)
|
|
|
if (!res) return
|
|
|
// 转换数据
|
|
|
yljgList.value = (res as any[]).map(item => ({
|
|
@@ -182,7 +184,7 @@
|
|
|
}));
|
|
|
//
|
|
|
if (itemId.value){
|
|
|
- let itemRes = await rest.get('/zyyp/feedback/get', { id: itemId.value },globalStore.authCode) as feedbackVO
|
|
|
+ let itemRes = await rest.get('/zyyp/feedback/get', { id: itemId.value },globalParameter.value.authCode) as feedbackVO
|
|
|
formData.value = itemRes
|
|
|
popupDeptText.value = itemRes.yljgmc
|
|
|
const matchedItem = feedbackArray.value.find(item => item.value === Number(itemRes.fklx));
|