|
|
|
@ -80,6 +80,10 @@
|
|
|
|
<div v-for="c in colorOptions" :key="c.value" class="color-tag-option"
|
|
|
|
<div v-for="c in colorOptions" :key="c.value" class="color-tag-option"
|
|
|
|
:class="{ active: form.colorTag === c.value }" :style="{ background: c.value }" :title="c.label"
|
|
|
|
:class="{ active: form.colorTag === c.value }" :style="{ background: c.value }" :title="c.label"
|
|
|
|
@click="selectColor(c.value)"></div>
|
|
|
|
@click="selectColor(c.value)"></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="color-tag-option clear" @click="selectColor('')">
|
|
|
|
|
|
|
|
<el-icon :size="24"><CloseBold /></el-icon>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</el-popover>
|
|
|
|
</el-popover>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@ -162,6 +166,7 @@ import {
|
|
|
|
import { ElMessage } from 'element-plus';
|
|
|
|
import { ElMessage } from 'element-plus';
|
|
|
|
import { Editor, Toolbar } from '@wangeditor/editor-for-vue';
|
|
|
|
import { Editor, Toolbar } from '@wangeditor/editor-for-vue';
|
|
|
|
import '@wangeditor/editor/dist/css/style.css';
|
|
|
|
import '@wangeditor/editor/dist/css/style.css';
|
|
|
|
|
|
|
|
import { CloseBold } from "@element-plus/icons-vue";
|
|
|
|
import { useI18n } from 'vue-i18n';
|
|
|
|
import { useI18n } from 'vue-i18n';
|
|
|
|
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
|
|
const props = defineProps({
|
|
|
|
@ -217,7 +222,7 @@ const form = reactive({
|
|
|
|
priority: '中',
|
|
|
|
priority: '中',
|
|
|
|
feedbackchannel: '',
|
|
|
|
feedbackchannel: '',
|
|
|
|
department: '',
|
|
|
|
department: '',
|
|
|
|
colorTag: '#667eea',
|
|
|
|
colorTag: '',
|
|
|
|
description: '',
|
|
|
|
description: '',
|
|
|
|
submitter: '',
|
|
|
|
submitter: '',
|
|
|
|
createdat: '',
|
|
|
|
createdat: '',
|
|
|
|
@ -470,7 +475,7 @@ const resetForm = () => {
|
|
|
|
priority: '中',
|
|
|
|
priority: '中',
|
|
|
|
feedbackchannel: '',
|
|
|
|
feedbackchannel: '',
|
|
|
|
department: '',
|
|
|
|
department: '',
|
|
|
|
colorTag: '#667eea',
|
|
|
|
colorTag: '',
|
|
|
|
description: '',
|
|
|
|
description: '',
|
|
|
|
submitter: '',
|
|
|
|
submitter: '',
|
|
|
|
createdat: '',
|
|
|
|
createdat: '',
|
|
|
|
@ -487,7 +492,7 @@ const fillFormFromOrder = (d) => {
|
|
|
|
form.priority = d.priority || '中';
|
|
|
|
form.priority = d.priority || '中';
|
|
|
|
form.feedbackchannel = d.feedbackChannel || d.feedbackchannel || '';
|
|
|
|
form.feedbackchannel = d.feedbackChannel || d.feedbackchannel || '';
|
|
|
|
form.department = d.department || '';
|
|
|
|
form.department = d.department || '';
|
|
|
|
form.colorTag = d.colorTag || '#667eea';
|
|
|
|
form.colorTag = d.colorTag;
|
|
|
|
form.description = d.description || '';
|
|
|
|
form.description = d.description || '';
|
|
|
|
form.submitter = d.submitter || '';
|
|
|
|
form.submitter = d.submitter || '';
|
|
|
|
// 后端返回时间可能含 T,统一格式化为 YYYY-MM-DD HH:mm:ss 供 date-picker 回显
|
|
|
|
// 后端返回时间可能含 T,统一格式化为 YYYY-MM-DD HH:mm:ss 供 date-picker 回显
|
|
|
|
@ -551,6 +556,7 @@ const onSubmit = async () => {
|
|
|
|
if (editor && typeof editor.getHtml === 'function') {
|
|
|
|
if (editor && typeof editor.getHtml === 'function') {
|
|
|
|
form.description = editor.getHtml() || '';
|
|
|
|
form.description = editor.getHtml() || '';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
form.colorTag = form.colorTag ? form.colorTag : ' ';
|
|
|
|
await formRef.value.validate(async (valid) => {
|
|
|
|
await formRef.value.validate(async (valid) => {
|
|
|
|
if (!valid) return;
|
|
|
|
if (!valid) return;
|
|
|
|
const formData = new FormData();
|
|
|
|
const formData = new FormData();
|
|
|
|
|