| | |
| | | "env": { |
| | | "VITE_APP_TITLE": "芯导云(管理信息系统)" |
| | | }, |
| | | "screen": "screen/PCDZView.png", |
| | | "logo": "logo/Logo.png", |
| | | "favicon": "favicon/favicon.ico" |
| | | }, |
| | |
| | | "VITE_BASE_API": "http://1.15.17.182:9046", |
| | | "VITE_JAVA_API": "http://1.15.17.182:9047" |
| | | }, |
| | | "screen": "screen/login-background.png", |
| | | "logo": "logo/Logo.png", |
| | | "favicon": "favicon/favicon.ico" |
| | | }, |
| | |
| | | // 通用下载方法
|
| | | export function download(url, params, filename, config) {
|
| | | downloadLoadingInstance = ElLoading.service({ text: "正在下载数据,请稍候", background: "rgba(0, 0, 0, 0.7)", })
|
| | | const downloadName = config?.filename || filename |
| | | const requestMethod = (config?.method || 'post').toLowerCase() |
| | | const requestPromise = requestMethod === 'get' |
| | | ? service.get(url, { |
| | | params, |
| | | responseType: 'blob', |
| | | ...config |
| | | }) |
| | | : service.post(url, params, { |
| | | transformRequest: [(params) => { return tansParams(params) }], |
| | | headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, |
| | | responseType: 'blob', |
| | | ...config |
| | | }) |
| | | return requestPromise.then(async (data) => { |
| | | return service.post(url, params, {
|
| | | transformRequest: [(params) => { return tansParams(params) }],
|
| | | headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
| | | responseType: 'blob',
|
| | | ...config
|
| | | }).then(async (data) => {
|
| | | const isBlob = blobValidate(data)
|
| | | if (isBlob) {
|
| | | const blob = new Blob([data])
|
| | | saveAs(blob, downloadName) |
| | | saveAs(blob, filename)
|
| | | } else {
|
| | | const resText = await data.text()
|
| | | const rspObj = JSON.parse(resText)
|
| | |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | <files-dia ref="filesDia"></files-dia> |
| | | <FileList v-if="fileListDialogVisible" |
| | | v-model:visible="fileListDialogVisible" |
| | | record-type="supplier_manage" |
| | | :record-id="recordId" /> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | } from "@/api/basicData/supplierManageFile.js"; |
| | | import useUserStore from "@/store/modules/user"; |
| | | import { getToken } from "@/utils/auth.js"; |
| | | import FilesDia from "../filesDia.vue"; |
| | | const FileList = defineAsyncComponent(() => |
| | | import("@/components/Dialog/FileList.vue") |
| | | ); |
| | | const { proxy } = getCurrentInstance(); |
| | | const userStore = useUserStore(); |
| | | |
| | |
| | | name: "资质文件", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | openFilesFormDia(row) |
| | | openFileDialog(row) |
| | | } |
| | | } |
| | | ], |
| | |
| | | size: 100, |
| | | total: 0, |
| | | }); |
| | | const filesDia = ref() |
| | | const fileListDialogVisible = ref(false); |
| | | const recordId = ref(); |
| | | // 用户信息表单弹框数据 |
| | | const operationType = ref(""); |
| | | const dialogFormVisible = ref(false); |
| | |
| | | return `${year}-${month}-${day}`; |
| | | } |
| | | // 打开附件弹框 |
| | | const openFilesFormDia = (row) => { |
| | | nextTick(() => { |
| | | filesDia.value?.openDialog(row) |
| | | }) |
| | | const openFileDialog = async row => { |
| | | recordId.value = row.id; |
| | | fileListDialogVisible.value = true; |
| | | }; |
| | | |
| | | onMounted(() => { |
| | |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | <files-dia ref="filesDia"></files-dia> |
| | | <FileList v-if="fileListDialogVisible" |
| | | v-model:visible="fileListDialogVisible" |
| | | record-type="supplier_manage" |
| | | :record-id="recordId" /> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | } from "@/api/basicData/supplierManageFile.js"; |
| | | import useUserStore from "@/store/modules/user"; |
| | | import { getToken } from "@/utils/auth.js"; |
| | | import FilesDia from "../filesDia.vue"; |
| | | const FileList = defineAsyncComponent(() => |
| | | import("@/components/Dialog/FileList.vue") |
| | | ); |
| | | const { proxy } = getCurrentInstance(); |
| | | const userStore = useUserStore(); |
| | | |
| | |
| | | name: "资质文件", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | openFilesFormDia(row) |
| | | openFileDialog(row) |
| | | } |
| | | } |
| | | ], |
| | |
| | | const selectedRows = ref([]); |
| | | const userList = ref([]); |
| | | const tableLoading = ref(false); |
| | | const fileListDialogVisible = ref(false); |
| | | const recordId = ref(); |
| | | const page = reactive({ |
| | | current: 1, |
| | | size: 100, |
| | | total: 0, |
| | | }); |
| | | const filesDia = ref() |
| | | // 用户信息表单弹框数据 |
| | | const operationType = ref(""); |
| | | const dialogFormVisible = ref(false); |
| | |
| | | return `${year}-${month}-${day}`; |
| | | } |
| | | // 打开附件弹框 |
| | | const openFilesFormDia = (row) => { |
| | | nextTick(() => { |
| | | filesDia.value?.openDialog(row) |
| | | }) |
| | | const openFileDialog = async row => { |
| | | recordId.value = row.id; |
| | | fileListDialogVisible.value = true; |
| | | }; |
| | | |
| | | onMounted(() => { |