|
|
@ -56,6 +56,26 @@ |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<template #description="{ formModel, field }"> |
|
|
|
<a-row class="flex items-center h-full" gutter="{8}"> |
|
|
|
<a-col :span="23"> |
|
|
|
<a-textarea |
|
|
|
v-model:value="formModel[field]" |
|
|
|
showCount |
|
|
|
disabled |
|
|
|
:maxLength="200" |
|
|
|
placeholder="请输入问题描述" |
|
|
|
/> |
|
|
|
</a-col> |
|
|
|
<a-col :span="1"> |
|
|
|
<div |
|
|
|
class="flex items-center justify-center h-full cursor-pointer h-[54px] w-full border-[1px] border-solid border-[#d9d9d9]" |
|
|
|
> |
|
|
|
<CopyOutlined @click="handleCopyDescription(formModel[field])"></CopyOutlined> |
|
|
|
</div> |
|
|
|
</a-col> |
|
|
|
</a-row> |
|
|
|
</template> |
|
|
|
</SchemaForm> |
|
|
|
</a-tab-pane> |
|
|
|
<a-tab-pane key="2" tab="处理历史"> |
|
|
@ -73,17 +93,19 @@ |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script lang="ts" setup> |
|
|
|
<script lang="tsx" setup> |
|
|
|
import { QuillEditor } from '@vueup/vue-quill'; |
|
|
|
import '@vueup/vue-quill/dist/vue-quill.snow.css'; |
|
|
|
import { useForm } from '@/components/core/schema-form'; |
|
|
|
import { getEditFormSchema } from './formSchemas'; |
|
|
|
import { useRoute } from 'vue-router'; |
|
|
|
import { onMounted, ref, watch } from 'vue'; |
|
|
|
import { onMounted, ref, watch, nextTick } from 'vue'; |
|
|
|
import { findOneById } from '@/api/issue'; |
|
|
|
import { SvgIcon } from '@/components/basic/svg-icon'; |
|
|
|
import { stateTypeList } from './data'; |
|
|
|
import { fetchVersionPageList } from '@/api/prodVersion'; |
|
|
|
import { CopyOutlined } from '@ant-design/icons-vue'; |
|
|
|
import { copyText } from '@/utils/common'; |
|
|
|
|
|
|
|
const props = defineProps({ |
|
|
|
id: { |
|
|
@ -129,6 +151,17 @@ |
|
|
|
disabled: true, |
|
|
|
}); |
|
|
|
|
|
|
|
let fields = ['billcode', 'contacts', 'title', 'description']; |
|
|
|
|
|
|
|
let contactsText = ref(), |
|
|
|
billcodeText = ref(), |
|
|
|
titleText = ref(), |
|
|
|
descriptionText = ref(); |
|
|
|
|
|
|
|
const handleCopyDescription = (text) => { |
|
|
|
copyText(text); |
|
|
|
}; |
|
|
|
|
|
|
|
const initData = async () => { |
|
|
|
// 判断route.query.id和props.id是否存在,哪个存在用哪个 |
|
|
|
const id = props.id || route.query.id; |
|
|
@ -182,6 +215,87 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
formRef?.updateSchema({ |
|
|
|
field: 'description', |
|
|
|
slot: 'description', |
|
|
|
}); |
|
|
|
|
|
|
|
contactsText.value = res?.contacts; |
|
|
|
billcodeText.value = res?.billcode; |
|
|
|
titleText.value = res?.title; |
|
|
|
descriptionText.value = res?.description; |
|
|
|
|
|
|
|
formRef?.updateSchema({ |
|
|
|
field: 'contacts', |
|
|
|
componentProps: { |
|
|
|
addonAfter: ( |
|
|
|
<CopyOutlined |
|
|
|
onClick={() => { |
|
|
|
console.log('contactsText.value: ', contactsText.value); |
|
|
|
copyText(contactsText.value); |
|
|
|
}} |
|
|
|
/> |
|
|
|
), |
|
|
|
}, |
|
|
|
}); |
|
|
|
formRef?.updateSchema({ |
|
|
|
field: 'billcode', |
|
|
|
componentProps: { |
|
|
|
addonAfter: ( |
|
|
|
<CopyOutlined |
|
|
|
onClick={() => { |
|
|
|
console.log('billcodeText.value: ', billcodeText.value); |
|
|
|
copyText(billcodeText.value); |
|
|
|
}} |
|
|
|
/> |
|
|
|
), |
|
|
|
}, |
|
|
|
}); |
|
|
|
formRef?.updateSchema({ |
|
|
|
field: 'title', |
|
|
|
componentProps: { |
|
|
|
addonAfter: ( |
|
|
|
<CopyOutlined |
|
|
|
onClick={() => { |
|
|
|
console.log('titleText.value: ', titleText.value); |
|
|
|
copyText(titleText.value); |
|
|
|
}} |
|
|
|
/> |
|
|
|
), |
|
|
|
}, |
|
|
|
}); |
|
|
|
formRef?.updateSchema({ |
|
|
|
field: 'description', |
|
|
|
componentProps: { |
|
|
|
addonAfter: ( |
|
|
|
<CopyOutlined |
|
|
|
onClick={() => { |
|
|
|
console.log('descriptionText.value: ', descriptionText.value); |
|
|
|
copyText(descriptionText.value); |
|
|
|
}} |
|
|
|
/> |
|
|
|
), |
|
|
|
}, |
|
|
|
}); |
|
|
|
// fields.forEach((item) => { |
|
|
|
// console.log('res[item]: ', res[item]); |
|
|
|
// text.value = res[item]; |
|
|
|
// console.log('text: ', text); |
|
|
|
|
|
|
|
// let handleClick = (text) => { |
|
|
|
// // copyText(text); |
|
|
|
// return () => { |
|
|
|
// copyText(text.value); |
|
|
|
// }; |
|
|
|
// }; |
|
|
|
// formRef?.updateSchema({ |
|
|
|
// field: item, |
|
|
|
// componentProps: { |
|
|
|
// addonAfter: <CopyOutlined onClick={handleClick(text)} />, |
|
|
|
// }, |
|
|
|
// }); |
|
|
|
// }); |
|
|
|
|
|
|
|
current.value = res?.state; |
|
|
|
|
|
|
|
formRef?.setFieldsValue(res); |
|
|
|