Merge branch 'dev' of http://47.94.165.164:13000/geg-gas/geg-gas-web into dev
This commit is contained in:
@ -1,11 +1,16 @@
|
|||||||
# 是否开启mock
|
# 是否开启mock
|
||||||
VITE_USE_MOCK = true
|
VITE_USE_MOCK = false
|
||||||
|
|
||||||
#VITE_PROXY=[["/api","http://10.4.126.112:23000"]]
|
#VITE_PROXY=[["/api","http://10.4.126.112:23000"]]
|
||||||
|
|
||||||
# 资源公共路径,需要以 / 开头和结尾
|
# 资源公共路径,需要以 / 开头和结尾
|
||||||
VITE_PUBLIC_PATH = /
|
VITE_PUBLIC_PATH = /
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 是否开启history模式
|
||||||
|
VITE_ROUTE_MODE = hash
|
||||||
|
|
||||||
# 是否删除Console.log
|
# 是否删除Console.log
|
||||||
VITE_DROP_CONSOLE = true
|
VITE_DROP_CONSOLE = true
|
||||||
|
|
||||||
|
|||||||
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@ -69,7 +69,7 @@
|
|||||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||||
},
|
},
|
||||||
"[html]": {
|
"[html]": {
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
"editor.defaultFormatter": "vscode.html-language-features"
|
||||||
},
|
},
|
||||||
"[css]": {
|
"[css]": {
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||||
|
|||||||
@ -35,6 +35,8 @@
|
|||||||
import { downloadByUrl } from '/@/utils/file/download';
|
import { downloadByUrl } from '/@/utils/file/download';
|
||||||
import { uploadMultiApi } from '/@/api/sys/upload';
|
import { uploadMultiApi } from '/@/api/sys/upload';
|
||||||
import Icon from '/@/components/Icon/index';
|
import Icon from '/@/components/Icon/index';
|
||||||
|
import { buildSnowFlakeId } from '/@/utils/uuid';
|
||||||
|
const uuid = buildSnowFlakeId();
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
value: String,
|
value: String,
|
||||||
@ -79,9 +81,9 @@
|
|||||||
tableName.value = data.tableName;
|
tableName.value = data.tableName;
|
||||||
columnName.value = data.columnName;
|
columnName.value = data.columnName;
|
||||||
}else{
|
}else{
|
||||||
tableId.value = '';
|
tableId.value = props.value || uuid;
|
||||||
tableName.value = '';
|
tableName.value = props.tableName || '';
|
||||||
columnName.value = '';
|
columnName.value = props.columnName || '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,7 +98,7 @@
|
|||||||
|
|
||||||
const refreshList = async (val:any) => {
|
const refreshList = async (val:any) => {
|
||||||
if (val) {
|
if (val) {
|
||||||
fileList.value = await getFileList({ tableName: props.tableName, columnName: props.columnName,tableId: props.value });
|
fileList.value = await getFileList({ tableName: props.tableName, columnName: props.columnName,tableId: props.value||uuid });
|
||||||
if (fileList.value.length) {
|
if (fileList.value.length) {
|
||||||
fileList.value.forEach((x) => {
|
fileList.value.forEach((x) => {
|
||||||
x.name = x.fileOrg;
|
x.name = x.fileOrg;
|
||||||
@ -143,14 +145,16 @@
|
|||||||
fileList.value.forEach((x) => {
|
fileList.value.forEach((x) => {
|
||||||
x.status = 'done'; //没有则不会展示下载按钮
|
x.status = 'done'; //没有则不会展示下载按钮
|
||||||
x.thumbUrl = x.fileUrl;
|
x.thumbUrl = x.fileUrl;
|
||||||
|
x.name = x.fileOrg;
|
||||||
});
|
});
|
||||||
emit('update:value', tableId.value);
|
emit('update:value', tableId.value);
|
||||||
emit('update:tableName', tableName.value);
|
emit('update:tableName', tableName.value);
|
||||||
emit('update:columnName', columnName.value);
|
emit('update:columnName', columnName.value);
|
||||||
emit('change');
|
emit('change');
|
||||||
if(tableIdValue==tableId.value){
|
|
||||||
await refreshList(tableId.value);
|
// if(tableIdValue==tableId.value){
|
||||||
}
|
// await refreshList(tableId.value);
|
||||||
|
// }
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|||||||
@ -34,6 +34,9 @@
|
|||||||
import { uploadMultiApi } from '/@/api/sys/upload';
|
import { uploadMultiApi } from '/@/api/sys/upload';
|
||||||
import { Icon } from '/@/components/Icon';
|
import { Icon } from '/@/components/Icon';
|
||||||
|
|
||||||
|
import { buildSnowFlakeId } from '/@/utils/uuid';
|
||||||
|
const uuid = buildSnowFlakeId();
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
value: String,
|
value: String,
|
||||||
tableName: {
|
tableName: {
|
||||||
@ -62,9 +65,9 @@
|
|||||||
tableName.value = data.tableName;
|
tableName.value = data.tableName;
|
||||||
columnName.value = data.columnName;
|
columnName.value = data.columnName;
|
||||||
}else{
|
}else{
|
||||||
tableId.value = '';
|
tableId.value = props.value || uuid;
|
||||||
tableName.value = '';
|
tableName.value = props.tableName || '';
|
||||||
columnName.value = '';
|
columnName.value = props.columnName || '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const deleteFlag = ref(false);
|
const deleteFlag = ref(false);
|
||||||
@ -77,7 +80,7 @@
|
|||||||
|
|
||||||
const refreshList = async (val:any) => {
|
const refreshList = async (val:any) => {
|
||||||
if (val) {
|
if (val) {
|
||||||
let result = await getFileList({tableName: props.tableName, columnName: props.columnName,tableId: props.value});
|
let result = await getFileList({tableName: props.tableName, columnName: props.columnName,tableId: props.value||uuid});
|
||||||
if (result.length) {
|
if (result.length) {
|
||||||
for (let i = 0; i < result.length; i++) {
|
for (let i = 0; i < result.length; i++) {
|
||||||
let x = result[i];
|
let x = result[i];
|
||||||
@ -128,7 +131,6 @@
|
|||||||
fileList.value = parseDownloadUrl(x.fileUrl,false,true);
|
fileList.value = parseDownloadUrl(x.fileUrl,false,true);
|
||||||
}
|
}
|
||||||
bindValues(res[0]);
|
bindValues(res[0]);
|
||||||
console.log(fileList.value, 'fileList.value1111111');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
emit('update:value', tableId.value);
|
emit('update:value', tableId.value);
|
||||||
|
|||||||
@ -48,6 +48,10 @@
|
|||||||
import { Icon } from '/@/components/Icon';
|
import { Icon } from '/@/components/Icon';
|
||||||
import { Base64 } from 'js-base64';
|
import { Base64 } from 'js-base64';
|
||||||
import { getAppEnvConfig } from '/@/utils/env';
|
import { getAppEnvConfig } from '/@/utils/env';
|
||||||
|
|
||||||
|
import { buildSnowFlakeId } from '/@/utils/uuid';
|
||||||
|
const uuid = buildSnowFlakeId();
|
||||||
|
|
||||||
const { VITE_GLOB_UPLOAD_ALERT_TIP } = getAppEnvConfig();
|
const { VITE_GLOB_UPLOAD_ALERT_TIP } = getAppEnvConfig();
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
value: String,
|
value: String,
|
||||||
@ -79,9 +83,9 @@
|
|||||||
tableName.value = data.tableName;
|
tableName.value = data.tableName;
|
||||||
columnName.value = data.columnName;
|
columnName.value = data.columnName;
|
||||||
}else{
|
}else{
|
||||||
tableId.value = '';
|
tableId.value = props.value || uuid;
|
||||||
tableName.value = '';
|
tableName.value = props.tableName || '';
|
||||||
columnName.value = '';
|
columnName.value = props.columnName || '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -95,7 +99,7 @@
|
|||||||
|
|
||||||
const refreshList = async (val:any) => {
|
const refreshList = async (val:any) => {
|
||||||
if (val) {
|
if (val) {
|
||||||
fileList.value = await getFileList({ tableName: props.tableName, columnName: props.columnName,tableId: props.value});
|
fileList.value = await getFileList({ tableName: props.tableName, columnName: props.columnName,tableId: props.value||uuid});
|
||||||
if (fileList.value.length) {
|
if (fileList.value.length) {
|
||||||
fileList.value.forEach((x) => {
|
fileList.value.forEach((x) => {
|
||||||
x.name = x.fileOrg;
|
x.name = x.fileOrg;
|
||||||
@ -139,18 +143,21 @@
|
|||||||
tableId.value, tableName.value, columnName.value
|
tableId.value, tableName.value, columnName.value
|
||||||
);
|
);
|
||||||
const tableIdValue = tableId.value;
|
const tableIdValue = tableId.value;
|
||||||
|
if(res==undefined) res = [];
|
||||||
bindValues(res[0]);
|
bindValues(res[0]);
|
||||||
|
fileList.value = [...fileList.value, ...res];
|
||||||
fileList.value.forEach((x) => {
|
fileList.value.forEach((x) => {
|
||||||
x.status = 'done'; //没有则不会展示下载按钮
|
x.status = 'done'; //没有则不会展示下载按钮
|
||||||
x.url = x.fileUrl;
|
x.url = x.fileUrl;
|
||||||
x.thumbUrl = x.thUrl;
|
x.thumbUrl = x.thUrl;
|
||||||
|
x.name = x.fileOrg;
|
||||||
});
|
});
|
||||||
name.value = res[0].fileOrg;
|
name.value = res[0].fileOrg;
|
||||||
emit('update:value', tableId.value);
|
emit('update:value', tableId.value);
|
||||||
emit('update:tableName', tableName.value);
|
emit('update:tableName', tableName.value);
|
||||||
emit('update:columnName', columnName.value);
|
emit('update:columnName', columnName.value);
|
||||||
emit('change');
|
emit('change');
|
||||||
if(tableIdValue==tableId.value) await refreshList(tableId.value);
|
//if(tableIdValue==tableId.value) await refreshList(tableId.value);
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
@ -181,9 +188,7 @@
|
|||||||
}
|
}
|
||||||
const handleRemove = async (info) => {
|
const handleRemove = async (info) => {
|
||||||
const id = info.response ? info.response.data.id : info.id;
|
const id = info.response ? info.response.data.id : info.id;
|
||||||
|
|
||||||
const status = await deleteSingleFile(id);
|
const status = await deleteSingleFile(id);
|
||||||
|
|
||||||
if (status) {
|
if (status) {
|
||||||
deleteFlag.value = true;
|
deleteFlag.value = true;
|
||||||
const index = fileList.value.findIndex((x) => x.id === id);
|
const index = fileList.value.findIndex((x) => x.id === id);
|
||||||
|
|||||||
@ -119,7 +119,9 @@
|
|||||||
import WebOfficeSDK from '/@/assets/libs/open-jssdk-v0.1.3.es.js';
|
import WebOfficeSDK from '/@/assets/libs/open-jssdk-v0.1.3.es.js';
|
||||||
import { getToken } from '/@/utils/auth';
|
import { getToken } from '/@/utils/auth';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { methodOf } from 'lodash-es';
|
import { methodOf } from 'lodash-es';
|
||||||
|
import { buildSnowFlakeId } from '/@/utils/uuid';
|
||||||
|
const uuid = buildSnowFlakeId();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { VITE_GLOB_UPLOAD_ALERT_TIP } = getAppEnvConfig();
|
const { VITE_GLOB_UPLOAD_ALERT_TIP } = getAppEnvConfig();
|
||||||
|
|
||||||
@ -188,7 +190,7 @@ import { methodOf } from 'lodash-es';
|
|||||||
tableName.value = data.tableName;
|
tableName.value = data.tableName;
|
||||||
columnName.value = data.columnName;
|
columnName.value = data.columnName;
|
||||||
}else{
|
}else{
|
||||||
tableId.value = props.value || '';
|
tableId.value = props.value || uuid;
|
||||||
tableName.value = props.tableName || '';
|
tableName.value = props.tableName || '';
|
||||||
columnName.value = props.columnName || '';
|
columnName.value = props.columnName || '';
|
||||||
}
|
}
|
||||||
@ -233,7 +235,7 @@ import { methodOf } from 'lodash-es';
|
|||||||
const refreshList = async (val:any) => {
|
const refreshList = async (val:any) => {
|
||||||
if (val) {
|
if (val) {
|
||||||
if (props.dataDelete) return
|
if (props.dataDelete) return
|
||||||
let _list = await getFileList({ tableName: props.tableName, columnName: props.columnName,tableId: props.value });
|
let _list = await getFileList({ tableName: props.tableName, columnName: props.columnName,tableId: props.value||uuid });
|
||||||
fileList.value = _list.filter((o) => !removeIds.value.includes(o.id));
|
fileList.value = _list.filter((o) => !removeIds.value.includes(o.id));
|
||||||
if (fileList.value.length) {
|
if (fileList.value.length) {
|
||||||
fileList.value.forEach((x) => {
|
fileList.value.forEach((x) => {
|
||||||
@ -273,20 +275,19 @@ import { methodOf } from 'lodash-es';
|
|||||||
if (arr.length <= 0) return;
|
if (arr.length <= 0) return;
|
||||||
try {
|
try {
|
||||||
let res = await uploadMultiApi(
|
let res = await uploadMultiApi(
|
||||||
{
|
{ name: 'file',file: arr},
|
||||||
name: 'file',
|
|
||||||
file: arr
|
|
||||||
},
|
|
||||||
tableId.value, tableName.value, columnName.value
|
tableId.value, tableName.value, columnName.value
|
||||||
);
|
);
|
||||||
|
|
||||||
fileList.value.forEach((x) => {
|
fileList.value.forEach((x) => {
|
||||||
x.status = 'done'; //没有则不会展示下载按钮
|
x.status = 'done'; //没有则不会展示下载按钮
|
||||||
|
x.fileSize = x.fileSize
|
||||||
|
x.name = x.fileOrg;
|
||||||
x.url = x.fileUrl;
|
x.url = x.fileUrl;
|
||||||
x.thumbUrl = x.thUrl;
|
x.thumbUrl = x.thUrl;
|
||||||
x.fileSize = x.fileSize
|
|
||||||
});
|
});
|
||||||
let tableIdValue = tableId.value;
|
|
||||||
|
// let tableIdValue = tableId.value;
|
||||||
bindValues(res[0]);
|
bindValues(res[0]);
|
||||||
if (props.dataDelete) {
|
if (props.dataDelete) {
|
||||||
let fileArr = res||[]
|
let fileArr = res||[]
|
||||||
@ -302,9 +303,9 @@ import { methodOf } from 'lodash-es';
|
|||||||
emit('update:tableName', tableName.value);
|
emit('update:tableName', tableName.value);
|
||||||
emit('update:columnName', columnName.value);
|
emit('update:columnName', columnName.value);
|
||||||
emit('change', fileList.value);
|
emit('change', fileList.value);
|
||||||
if(tableIdValue==tableId.value){
|
// if(tableIdValue==tableId.value){
|
||||||
await refreshList(tableId.value);
|
// await refreshList(tableId.value);
|
||||||
}
|
// }
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
@ -364,7 +365,7 @@ import { methodOf } from 'lodash-es';
|
|||||||
emit('update:tableName', tableName.value);
|
emit('update:tableName', tableName.value);
|
||||||
emit('update:columnName', columnName.value);
|
emit('update:columnName', columnName.value);
|
||||||
emit('change', fileList.value);
|
emit('change', fileList.value);
|
||||||
await refreshList(tableId.value);
|
//await refreshList(tableId.value);
|
||||||
notification.success({
|
notification.success({
|
||||||
message: 'Tip',
|
message: 'Tip',
|
||||||
description: '删除成功!'
|
description: '删除成功!'
|
||||||
|
|||||||
@ -28,6 +28,7 @@
|
|||||||
import { parseDownloadUrl} from '/@/api/system/file';
|
import { parseDownloadUrl} from '/@/api/system/file';
|
||||||
import { downloadByUrl } from '/@/utils/file/download';
|
import { downloadByUrl } from '/@/utils/file/download';
|
||||||
import { nextTick, ref, watch, computed } from 'vue';
|
import { nextTick, ref, watch, computed } from 'vue';
|
||||||
|
|
||||||
const dataFile = ref([]);
|
const dataFile = ref([]);
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const columns = ref([
|
const columns = ref([
|
||||||
|
|||||||
@ -12,6 +12,7 @@
|
|||||||
import { useI18n } from '/@/hooks/web/useI18n';
|
import { useI18n } from '/@/hooks/web/useI18n';
|
||||||
import { formProps } from './config';
|
import { formProps } from './config';
|
||||||
import ModalForm from './Form.vue';
|
import ModalForm from './Form.vue';
|
||||||
|
|
||||||
import { FromPageType } from '/@/enums/workflowEnum';
|
import { FromPageType } from '/@/enums/workflowEnum';
|
||||||
|
|
||||||
const emit = defineEmits(['success', 'register']);
|
const emit = defineEmits(['success', 'register']);
|
||||||
|
|||||||
@ -56,6 +56,7 @@
|
|||||||
import { isValidJSON } from '/@/utils/event/design';
|
import { isValidJSON } from '/@/utils/event/design';
|
||||||
|
|
||||||
import CustomerModal from './components/CustomerModal.vue';
|
import CustomerModal from './components/CustomerModal.vue';
|
||||||
|
import CustomerCeateForm from './components/createForm.vue';
|
||||||
import {formConfig, searchFormSchema, columns } from './components/config';
|
import {formConfig, searchFormSchema, columns } from './components/config';
|
||||||
import Icon from '/@/components/Icon/index';
|
import Icon from '/@/components/Icon/index';
|
||||||
import FlowRecord from '/@/views/workflow/task/components/flow/FlowRecord.vue';
|
import FlowRecord from '/@/views/workflow/task/components/flow/FlowRecord.vue';
|
||||||
|
|||||||
@ -185,7 +185,7 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
return defineAsyncComponent({
|
return defineAsyncComponent({
|
||||||
loader: () => import(`/@/views/${data.formInfos[0]?.functionalModule}/${data.formInfos[0]?.functionName}/components/createForm.vue`)
|
loader: () => import(`../../views/${data.formInfos[0]?.functionalModule}/${data.formInfos[0]?.functionName}/components/createForm.vue`)
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
function showButton(btn) {
|
function showButton(btn) {
|
||||||
|
|||||||
@ -151,7 +151,7 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
return defineAsyncComponent({
|
return defineAsyncComponent({
|
||||||
loader: () => import(`/@/views/${data.formInfos[0]?.functionalModule}/${data.formInfos[0]?.functionName}/components/createForm.vue`)
|
loader: () => import(`../../views/${data.formInfos[0]?.functionalModule}/${data.formInfos[0]?.functionName}/components/createForm.vue`)
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -161,7 +161,7 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
return defineAsyncComponent({
|
return defineAsyncComponent({
|
||||||
loader: () => import(`/@/views/${props.formInfos[0]?.functionalModule}/${props.formInfos[0]?.functionName}/components/createForm.vue`)
|
loader: () => import(`../../../../../views/${props.formInfos[0]?.functionalModule}/${props.formInfos[0]?.functionName}/components/createForm.vue`)
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user