diff --git a/.env.development b/.env.development
index 84593ba..7f13400 100644
--- a/.env.development
+++ b/.env.development
@@ -9,8 +9,8 @@
# 只在开发模式中被载入
# 网站前缀
-# VITE_BASE_API_URL = http://192.168.2.3:8089/server/
-VITE_BASE_API_URL = http://43.137.2.78:8085/server/
+VITE_BASE_API_URL = http://192.168.2.110:8089/server/
+# VITE_BASE_API_URL = http://43.137.2.78:8085/server/
# base api
VITE_BASE_API = '/server/'
diff --git a/src/api/issue/model.d.ts b/src/api/issue/model.d.ts
index dddf202..26e46a1 100644
--- a/src/api/issue/model.d.ts
+++ b/src/api/issue/model.d.ts
@@ -27,6 +27,7 @@ declare namespace API {
tags?: string[] | string; // 标签
solution?: string; // 解决方案
zentaoNos?: string; // 关联的禅道工单号
+ resolutionTime?: string; // 解决时间
};
type CreateIssueParams = {
@@ -53,6 +54,7 @@ declare namespace API {
tags?: string[] | string; // 标签
solution?: string; // 解决方案
zentaoNos?: string; // 关联的禅道工单号
+ resolutionTime?: string; // 解决时间
};
type DeleteIssueParams = {
diff --git a/src/assets/icons/customer.svg b/src/assets/icons/customer.svg
new file mode 100644
index 0000000..16c8880
--- /dev/null
+++ b/src/assets/icons/customer.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/utils/request.ts b/src/utils/request.ts
index 62ba450..0102a56 100644
--- a/src/utils/request.ts
+++ b/src/utils/request.ts
@@ -29,7 +29,7 @@ const baseMockUrl = import.meta.env.VITE_MOCK_API;
const service = axios.create({
baseURL: baseApiUrl,
- timeout: 6000,
+ timeout: 10000,
});
service.interceptors.request.use(
diff --git a/src/views/client/knowledgeBase/index.vue b/src/views/client/knowledgeBase/index.vue
index 5d6b0f0..7485fa4 100644
--- a/src/views/client/knowledgeBase/index.vue
+++ b/src/views/client/knowledgeBase/index.vue
@@ -178,6 +178,20 @@
watch(selectedKeys, async (newVal) => {
console.log('newVal: ', newVal);
if (!newVal.length) return;
+ loading.value = true;
+ try {
+ const res = await findOneById({ id: selectedKeys.value[0] });
+ curRowDetail.value = res;
+ const count = await addReadCount({ id: selectedKeys.value[0] });
+ console.log('count: ', count);
+ if (count) {
+ curRowDetail.value.readCount = count;
+ }
+ } catch (error) {
+ console.error(error);
+ } finally {
+ loading.value = false;
+ }
});
// 树节点选择事件
diff --git a/src/views/question/issue/columns.tsx b/src/views/question/issue/columns.tsx
index aab0eef..6c269fb 100644
--- a/src/views/question/issue/columns.tsx
+++ b/src/views/question/issue/columns.tsx
@@ -94,14 +94,15 @@ export const baseColumns: TableColumnItem[] = [
const { zentaoNos } = record;
// 自定义渲染成a标签,点击跳转到指定链接
return (
- zentaoNos && // 如果zentaoNos存在才渲染
-
- {zentaoNos}
-
+ zentaoNos && ( // 如果zentaoNos存在才渲染
+
+ {zentaoNos}
+
+ )
);
},
},
@@ -168,7 +169,25 @@ export const baseColumns: TableColumnItem[] = [
required: false,
},
},
-
+ //resolutionTime
+ {
+ title: '计划解决时间',
+ align: 'center',
+ dataIndex: 'resolutionTime',
+ width: 200,
+ hideInSearch: true,
+ formItemProps: {
+ defaultValue: '',
+ required: false,
+ component: 'RangePicker',
+ componentProps: {
+ valueFormat: 'YYYY-MM-DD',
+ },
+ colProps: {
+ span: 6,
+ },
+ },
+ },
{
title: '创建时间',
align: 'center',
diff --git a/src/views/question/issue/data.ts b/src/views/question/issue/data.ts
index 4c3cefe..a27f752 100644
--- a/src/views/question/issue/data.ts
+++ b/src/views/question/issue/data.ts
@@ -24,15 +24,20 @@ export const stateTypeList: any = [
value: 3,
color: '#108ee9',
},
+ // 待客户确认
{
- label: '已解决',
+ label: '待客户确认',
value: 4,
+ color: '#2db7f5',
+ },
+ {
+ label: '已解决',
+ value: 5,
color: '#87d068',
},
{
label: '关闭',
- value: 5,
- // 灰色
+ value: 6,
color: '#d9d9d9',
},
];
diff --git a/src/views/question/issue/formSchemas.tsx b/src/views/question/issue/formSchemas.tsx
index 1c0894f..9921164 100644
--- a/src/views/question/issue/formSchemas.tsx
+++ b/src/views/question/issue/formSchemas.tsx
@@ -41,6 +41,7 @@ export const getEditFormSchema: (
colProps: {
span: 8,
},
+ vIf: () => !isClient && isDetail,
rules: [{ required: true, type: 'string' }],
},
{
@@ -272,7 +273,38 @@ export const getEditFormSchema: (
console.log('file: ', file);
// 限制允许上传的文件类型
- const allowedTypes = ['xlsx', 'xls', 'doc', 'docx', 'pdf', 'jpg', 'jpeg', 'png'];
+ // 添加视频和压缩包
+ const allowedTypes = [
+ // 文档
+ 'xlsx',
+ 'xls',
+ 'doc',
+ 'docx',
+ // 图片
+ 'pdf',
+ 'jpg',
+ 'jpeg',
+ 'png',
+ // 视频
+ 'mp4',
+ 'avi',
+ 'mov',
+ 'wmv',
+ 'mkv',
+ 'flv',
+ 'webm',
+ // 压缩包
+ 'zip',
+ 'rar',
+ '7z',
+ 'tar',
+ 'gz',
+ 'bz2',
+ 'tgz',
+ 'tbz2',
+ // 其他
+ 'htm',
+ ];
// 检查文件类型
const fileType = getFileExtension(file.name) || 'unknown';
@@ -314,7 +346,10 @@ export const getEditFormSchema: (
] as any;
};
-export const getFlowFormSchema: (row?: Partial) => FormSchema[] = (record = {}) => {
+export const getFlowFormSchema: (row?: Partial, state?: any) => FormSchema[] = (
+ record = {},
+ state,
+) => {
return [
{
field: 'zentaoNos',
@@ -326,6 +361,19 @@ export const getFlowFormSchema: (row?: Partial) => FormSchema[] =
vIf: () => record.state === 0,
// rules: [{ required: true, type: 'string' }],
},
+ {
+ label: '问题属性',
+ field: 'arrtibute',
+ component: 'Select',
+ componentProps: {
+ options: questionTypeList,
+ },
+ colProps: {
+ span: 24,
+ },
+ vIf: () => state === 5,
+ rules: [{ required: true, type: 'string' }],
+ },
{
field: 'remark',
component: 'InputTextArea',
diff --git a/src/views/question/issue/index.vue b/src/views/question/issue/index.vue
index c6b07fe..46d88e3 100644
--- a/src/views/question/issue/index.vue
+++ b/src/views/question/issue/index.vue
@@ -344,15 +344,27 @@
changeState(record, 3);
},
},
+ // 待客户确认 4
+ {
+ icon: 'customer',
+ size: '17',
+ title: '待客户确认',
+ label: '待客户确认',
+ ifShow: stateText === '测试中',
+ onClick: (e) => {
+ e.stopPropagation();
+ changeState(record, 4);
+ },
+ },
{
icon: 'end',
size: '15',
title: '结束',
label: '结束',
- ifShow: stateText === '测试中',
+ ifShow: stateText === '待客户确认',
onClick: (e) => {
e.stopPropagation();
- changeState(record, 4);
+ changeState(record, 5);
},
},
{
@@ -374,7 +386,7 @@
ifShow: stateText !== '关闭',
onClick: (e) => {
e.stopPropagation();
- changeState(record, 5);
+ changeState(record, 6);
},
},
{
@@ -496,7 +508,7 @@
},
formProps: {
labelWidth: 100,
- schemas: getFlowFormSchema(record) as any,
+ schemas: getFlowFormSchema(record, state) as any,
autoSubmitOnEnter: true,
},
});
diff --git a/src/views/system/dictionary/columns.tsx b/src/views/system/dictionary/columns.tsx
index 0dc217c..62c44b4 100644
--- a/src/views/system/dictionary/columns.tsx
+++ b/src/views/system/dictionary/columns.tsx
@@ -39,9 +39,13 @@ export const baseColumns: TableColumnItem[] = [
resizable: true,
formItemProps: {
component: 'Select',
- defaultValue: 1,
+ defaultValue: '',
componentProps: {
options: [
+ {
+ label: '全部',
+ value: '',
+ },
{
label: '启用',
value: 1,
@@ -54,6 +58,7 @@ export const baseColumns: TableColumnItem[] = [
},
},
customRender: ({ record }) => {
+ delete record.pendingStatus;
const onChange = (checked: boolean) => {
console.log('checked: ', checked);
record.pendingStatus = true;