1、完善客商模块
2、完善基础数据模块 3、完善规范
This commit is contained in:
@@ -168,6 +168,7 @@ Avue 表格/表单配置独立存放于 `src/option/` 目录,与 `views` 和 `
|
||||
- 表格线条颜色需统一使用 `#EFF1F7`,包括表格外边框、单元格分割线和固定列边线。
|
||||
- 表格偶数行需统一使用 `#FAFAFA` 背景色,固定列单元格必须与对应行背景保持一致。
|
||||
- 表格操作列同时展示“查看、编辑、删除”等三个按钮时,操作列宽度统一不小于 `220px`,禁止出现按钮裁切或显示不全。
|
||||
- 表格操作列按钮统一仅展示文字,禁止配置 `icon` / `:icon` 或在操作按钮、操作下拉项中嵌入图标;顶部工具栏按钮不受此条限制。
|
||||
- `.avue-crud__header` 顶部间距统一为 `12px`。
|
||||
- 分页组件整体靠右展示,必须展示接口返回的数据总条数,`X条/页` 的页容量选择器必须放在总条数右侧。
|
||||
- `.basic-container__card` 的直接子级 `.el-card__body` 内边距统一去除,保持 `padding: 0`
|
||||
|
||||
@@ -1,16 +1,36 @@
|
||||
import request from '@/axios';
|
||||
import { ElLoading, ElMessage } from 'element-plus';
|
||||
|
||||
/**
|
||||
* 文件流返回
|
||||
* @param url 接口地址
|
||||
* @param params 接口参数
|
||||
*/
|
||||
export const exportBlob = (url, params) => {
|
||||
export const exportBlob = (url, params, options = {}) => {
|
||||
const { feedback = false, loadingText = '导出中', successText = '导出完成' } = options;
|
||||
const loading = feedback
|
||||
? ElLoading.service({
|
||||
lock: true,
|
||||
text: loadingText,
|
||||
background: 'rgba(255, 255, 255, 0.7)',
|
||||
})
|
||||
: null;
|
||||
return request({
|
||||
url: url,
|
||||
params: params,
|
||||
method: 'get',
|
||||
responseType: 'blob',
|
||||
})
|
||||
.then(res => {
|
||||
if (feedback) {
|
||||
ElMessage.success(successText);
|
||||
}
|
||||
return res;
|
||||
})
|
||||
.finally(() => {
|
||||
if (loading) {
|
||||
loading.close();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div v-if="isEmptyTotal" class="empty-pagination avue-crud__pagination">
|
||||
<div v-if="shouldShow" class="empty-pagination avue-crud__pagination">
|
||||
<el-pagination
|
||||
background
|
||||
:current-page="page.currentPage"
|
||||
@@ -21,9 +21,16 @@ export default {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
alwaysShow: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
emits: ['size-change', 'current-change', 'load'],
|
||||
computed: {
|
||||
shouldShow() {
|
||||
return this.alwaysShow || this.isEmptyTotal;
|
||||
},
|
||||
isEmptyTotal() {
|
||||
return Number(this.page.total || 0) === 0;
|
||||
},
|
||||
|
||||
@@ -69,7 +69,7 @@ export default {
|
||||
updateBtn: '修改',
|
||||
cancelBtn: '取消',
|
||||
searchBtn: '搜索',
|
||||
emptyBtn: '清空',
|
||||
emptyBtn: '重置',
|
||||
menuBtn: '功能',
|
||||
saveBtn: '保存',
|
||||
viewBtn: '查看',
|
||||
|
||||
@@ -83,6 +83,14 @@ app.use(Avue, {
|
||||
searchMenuSpan: 24,
|
||||
searchMenuPosition: 'right',
|
||||
menuWidth: 160,
|
||||
viewBtnIcon: ' ',
|
||||
editBtnIcon: ' ',
|
||||
copyBtnIcon: ' ',
|
||||
delBtnIcon: ' ',
|
||||
saveBtnIcon: ' ',
|
||||
updateBtnIcon: ' ',
|
||||
cancelBtnIcon: ' ',
|
||||
mockBtnIcon: ' ',
|
||||
},
|
||||
labelPosition: 'right',
|
||||
labelWidth: 'auto',
|
||||
|
||||
@@ -41,7 +41,6 @@ export const config = {
|
||||
{
|
||||
action: 'withdraw',
|
||||
label: '撤回',
|
||||
icon: 'el-icon-refresh-left',
|
||||
statusProp: 'approvalStatus',
|
||||
status: ['reviewing', 'change_reviewing'],
|
||||
permission: 'contract_manage_withdraw',
|
||||
@@ -50,7 +49,6 @@ export const config = {
|
||||
action: 'approve',
|
||||
label: '审批通过',
|
||||
type: 'success',
|
||||
icon: 'el-icon-check',
|
||||
statusProp: 'approvalStatus',
|
||||
status: ['reviewing', 'change_reviewing'],
|
||||
permission: 'contract_manage_approve',
|
||||
@@ -59,7 +57,6 @@ export const config = {
|
||||
action: 'reject',
|
||||
label: '审批驳回',
|
||||
type: 'warning',
|
||||
icon: 'el-icon-close',
|
||||
statusProp: 'approvalStatus',
|
||||
status: ['reviewing', 'change_reviewing'],
|
||||
permission: 'contract_manage_reject',
|
||||
@@ -67,7 +64,6 @@ export const config = {
|
||||
{
|
||||
action: 'startChange',
|
||||
label: '发起变更',
|
||||
icon: 'el-icon-edit-outline',
|
||||
statusProp: 'approvalStatus',
|
||||
status: ['approved', 'change_approved'],
|
||||
stage: ['formal'],
|
||||
@@ -78,7 +74,6 @@ export const config = {
|
||||
action: 'terminate',
|
||||
label: '终止',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-close',
|
||||
statusProp: 'approvalStatus',
|
||||
status: ['approved', 'change_approved'],
|
||||
stage: ['formal'],
|
||||
|
||||
@@ -32,7 +32,6 @@ export const config = {
|
||||
{
|
||||
action: 'submitApproval',
|
||||
label: '提交审批',
|
||||
icon: 'el-icon-position',
|
||||
statusProp: 'approvalStatus',
|
||||
status: ['draft', 'withdrawn', 'rejected'],
|
||||
permission: 'project_apply_submit',
|
||||
@@ -40,7 +39,6 @@ export const config = {
|
||||
{
|
||||
action: 'withdraw',
|
||||
label: '撤回',
|
||||
icon: 'el-icon-refresh-left',
|
||||
statusProp: 'approvalStatus',
|
||||
status: ['reviewing'],
|
||||
permission: 'project_apply_withdraw',
|
||||
@@ -49,7 +47,6 @@ export const config = {
|
||||
action: 'approve',
|
||||
label: '审批通过',
|
||||
type: 'success',
|
||||
icon: 'el-icon-check',
|
||||
statusProp: 'approvalStatus',
|
||||
status: ['reviewing', 'change_reviewing'],
|
||||
permission: 'project_apply_approve',
|
||||
@@ -58,7 +55,6 @@ export const config = {
|
||||
action: 'reject',
|
||||
label: '审批驳回',
|
||||
type: 'warning',
|
||||
icon: 'el-icon-close',
|
||||
statusProp: 'approvalStatus',
|
||||
status: ['reviewing', 'change_reviewing'],
|
||||
permission: 'project_apply_reject',
|
||||
@@ -66,7 +62,6 @@ export const config = {
|
||||
{
|
||||
action: 'startChange',
|
||||
label: '发起变更',
|
||||
icon: 'el-icon-edit-outline',
|
||||
statusProp: 'approvalStatus',
|
||||
status: ['approved', 'change_approved'],
|
||||
permission: 'project_apply_change',
|
||||
@@ -76,7 +71,6 @@ export const config = {
|
||||
action: 'voidProject',
|
||||
label: '作废',
|
||||
type: 'danger',
|
||||
icon: 'el-icon-delete',
|
||||
statusProp: 'approvalStatus',
|
||||
status: ['approved', 'change_approved'],
|
||||
permission: 'project_apply_void',
|
||||
|
||||
@@ -21,7 +21,6 @@ export const config = {
|
||||
{
|
||||
action: 'withdraw',
|
||||
label: '撤回',
|
||||
icon: 'el-icon-refresh-left',
|
||||
statusProp: 'approvalStatus',
|
||||
status: ['reviewing'],
|
||||
permission: 'temporary_credit_limit_withdraw',
|
||||
@@ -30,7 +29,6 @@ export const config = {
|
||||
action: 'approve',
|
||||
label: '审批通过',
|
||||
type: 'success',
|
||||
icon: 'el-icon-check',
|
||||
statusProp: 'approvalStatus',
|
||||
status: ['reviewing'],
|
||||
permission: 'temporary_credit_limit_approve',
|
||||
@@ -39,7 +37,6 @@ export const config = {
|
||||
action: 'reject',
|
||||
label: '审批驳回',
|
||||
type: 'warning',
|
||||
icon: 'el-icon-close',
|
||||
statusProp: 'approvalStatus',
|
||||
status: ['reviewing'],
|
||||
permission: 'temporary_credit_limit_reject',
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { importBlob } from '@/api/common';
|
||||
import { downloadXls } from '@/utils/util';
|
||||
import { ElLoading } from 'element-plus';
|
||||
import NProgress from 'nprogress';
|
||||
import 'nprogress/nprogress.css';
|
||||
|
||||
@@ -65,6 +66,11 @@ export const handleImportExcel = async (vm, option, column, businessName, onSucc
|
||||
}
|
||||
|
||||
NProgress.start();
|
||||
const loading = ElLoading.service({
|
||||
lock: true,
|
||||
text: '导入中',
|
||||
background: 'rgba(255, 255, 255, 0.7)',
|
||||
});
|
||||
try {
|
||||
const res = await importBlob(column.action, file);
|
||||
if (isExcelResponse(res)) {
|
||||
@@ -83,7 +89,7 @@ export const handleImportExcel = async (vm, option, column, businessName, onSucc
|
||||
}
|
||||
return;
|
||||
}
|
||||
vm.$message.success(result.msg || '导入数据成功');
|
||||
vm.$message.success('导入完成');
|
||||
}
|
||||
vm.excelBox = false;
|
||||
vm.excelForm = {};
|
||||
@@ -103,6 +109,7 @@ export const handleImportExcel = async (vm, option, column, businessName, onSucc
|
||||
option.onError(error);
|
||||
}
|
||||
} finally {
|
||||
loading.close();
|
||||
NProgress.done();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -44,7 +44,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-circle-check"
|
||||
v-if="row.status === -1 && userInfo.authority.includes('admin')"
|
||||
@click.stop="handleEnable(row)"
|
||||
>启用
|
||||
@@ -52,7 +51,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-circle-close"
|
||||
v-if="row.status === 1 && userInfo.authority.includes('admin')"
|
||||
@click.stop="handleDisable(row)"
|
||||
>禁用
|
||||
@@ -60,7 +58,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-notebook"
|
||||
v-if="userInfo.authority.includes('admin')"
|
||||
@click.stop="handleRowLog(row)"
|
||||
>日志
|
||||
|
||||
@@ -65,7 +65,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-setting"
|
||||
v-if="permission.api_scope_setting"
|
||||
plain
|
||||
style="border: 0; background-color: transparent !important"
|
||||
|
||||
@@ -65,7 +65,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-setting"
|
||||
v-if="permission.data_scope_setting"
|
||||
plain
|
||||
style="border: 0; background-color: transparent !important"
|
||||
|
||||
@@ -55,7 +55,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-circle-check"
|
||||
v-if="row.status !== 1 && userInfo.authority.includes('administrator')"
|
||||
@click.stop="handleEnable(row)"
|
||||
>启用
|
||||
@@ -63,7 +62,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-circle-close"
|
||||
v-if="row.status === 1 && userInfo.authority.includes('administrator')"
|
||||
@click.stop="handleDisable(row)"
|
||||
>禁用
|
||||
@@ -71,7 +69,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-notebook"
|
||||
v-if="userInfo.authority.includes('administrator')"
|
||||
@click.stop="handleRowLog(row)"
|
||||
>日志
|
||||
|
||||
@@ -40,7 +40,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-setting"
|
||||
v-if="userInfo.authority.includes('admin')"
|
||||
plain
|
||||
style="border: 0; background-color: transparent !important"
|
||||
|
||||
@@ -63,7 +63,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-edit"
|
||||
v-if="hasPermission('airport_master_edit')"
|
||||
@click="$refs.crud.rowEdit(row, index)"
|
||||
>
|
||||
@@ -72,7 +71,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
:icon="row.status === 1 ? 'el-icon-close' : 'el-icon-check'"
|
||||
v-if="hasPermission('airport_master_status')"
|
||||
@click="handleStatus(row)"
|
||||
>
|
||||
@@ -142,6 +140,47 @@ import NProgress from 'nprogress';
|
||||
import 'nprogress/nprogress.css';
|
||||
|
||||
const DEFAULT_COUNTRY_CODE = '+86';
|
||||
const REQUIRED_EXPORT_HEADERS = ['区域层级', '区域编码', '区域名称'];
|
||||
|
||||
const getExcelCellText = value => {
|
||||
if (value === undefined || value === null) return '';
|
||||
if (typeof value === 'object') {
|
||||
if (Array.isArray(value.richText)) {
|
||||
return value.richText.map(item => item.text || '').join('');
|
||||
}
|
||||
if (value.text) return value.text;
|
||||
if (value.result) return value.result;
|
||||
}
|
||||
return String(value);
|
||||
};
|
||||
|
||||
const addWorkbookRequiredHeaderMarks = workbook => {
|
||||
workbook.eachSheet(worksheet => {
|
||||
const maxHeaderRow = Math.min(worksheet.rowCount || 0, 10);
|
||||
for (let rowIndex = 1; rowIndex <= maxHeaderRow; rowIndex += 1) {
|
||||
const row = worksheet.getRow(rowIndex);
|
||||
let hasRequiredHeader = false;
|
||||
row.eachCell(cell => {
|
||||
const text = getExcelCellText(cell.value).trim();
|
||||
const header = text.replace(/\*+$/g, '').trim();
|
||||
if (REQUIRED_EXPORT_HEADERS.includes(header)) {
|
||||
cell.value = `${header}*`;
|
||||
hasRequiredHeader = true;
|
||||
}
|
||||
});
|
||||
if (hasRequiredHeader) break;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const addExcelRequiredHeaderMarks = async blob => {
|
||||
const ExcelJS = await import('exceljs');
|
||||
const workbook = new ExcelJS.Workbook();
|
||||
await workbook.xlsx.load(await blob.arrayBuffer());
|
||||
addWorkbookRequiredHeaderMarks(workbook);
|
||||
const buffer = await workbook.xlsx.writeBuffer();
|
||||
return new Blob([buffer], { type: 'application/vnd.ms-excel' });
|
||||
};
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -830,10 +869,15 @@ export default {
|
||||
type: 'warning',
|
||||
}).then(() => {
|
||||
NProgress.start();
|
||||
exportBlob('/blade-system/airport-master/export-airport-master', this.buildExportParams())
|
||||
.then(res => {
|
||||
exportBlob(
|
||||
'/blade-system/airport-master/export-airport-master',
|
||||
this.buildExportParams(),
|
||||
{ feedback: true }
|
||||
)
|
||||
.then(async res => {
|
||||
const blob = await addExcelRequiredHeaderMarks(res.data);
|
||||
downloadXls(
|
||||
res.data,
|
||||
blob,
|
||||
`空港机场主数据${this.$dayjs().format('YYYY-MM-DD HH:mm:ss')}.xlsx`
|
||||
);
|
||||
})
|
||||
@@ -851,7 +895,9 @@ export default {
|
||||
},
|
||||
handleTemplate() {
|
||||
exportBlob(
|
||||
`/blade-system/airport-master/export-template?${this.website.tokenHeader}=${getToken()}`
|
||||
`/blade-system/airport-master/export-template?${this.website.tokenHeader}=${getToken()}`,
|
||||
undefined,
|
||||
{ feedback: true }
|
||||
).then(res => {
|
||||
downloadXls(res.data, '空港机场主数据模板.xlsx');
|
||||
});
|
||||
|
||||
@@ -553,7 +553,11 @@ export default {
|
||||
type: 'warning',
|
||||
}).then(() => {
|
||||
NProgress.start();
|
||||
exportBlob('/blade-system/cargo-type/export-cargo-type', this.buildExportParams())
|
||||
exportBlob(
|
||||
'/blade-system/cargo-type/export-cargo-type',
|
||||
this.buildExportParams(),
|
||||
{ feedback: true }
|
||||
)
|
||||
.then(res => {
|
||||
downloadXls(res.data, `货物类型${this.$dayjs().format('YYYY-MM-DD HH:mm:ss')}.xlsx`);
|
||||
})
|
||||
|
||||
@@ -57,7 +57,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-view"
|
||||
v-if="hasPermission('common_address_view')"
|
||||
@click="$refs.crud.rowView(row, index)"
|
||||
>
|
||||
@@ -66,7 +65,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-edit"
|
||||
v-if="hasPermission('common_address_edit') && !row.readonly"
|
||||
@click="$refs.crud.rowEdit(row, index)"
|
||||
>
|
||||
@@ -75,7 +73,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-delete"
|
||||
v-if="hasPermission('common_address_delete') && !row.readonly"
|
||||
@click="rowDel(row)"
|
||||
>
|
||||
@@ -914,7 +911,8 @@ export default {
|
||||
NProgress.start();
|
||||
exportBlob(
|
||||
'/blade-transport/common-address/export-common-address',
|
||||
this.buildExportParams()
|
||||
this.buildExportParams(),
|
||||
{ feedback: true }
|
||||
)
|
||||
.then(res => {
|
||||
downloadXls(res.data, `常用地址${this.$dayjs().format('YYYY-MM-DD HH:mm:ss')}.xlsx`);
|
||||
|
||||
@@ -71,7 +71,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-edit"
|
||||
v-if="permission.currency_edit"
|
||||
@click="$refs.crud.rowEdit(row, index)"
|
||||
>
|
||||
@@ -80,7 +79,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
:icon="row.status === 1 ? 'el-icon-close' : 'el-icon-check'"
|
||||
v-if="permission.currency_status"
|
||||
@click="handleStatus(row)"
|
||||
>
|
||||
@@ -551,7 +549,7 @@ export default {
|
||||
type: 'warning',
|
||||
}).then(() => {
|
||||
NProgress.start();
|
||||
exportBlob('/blade-system/currency/export-currency', this.buildExportParams())
|
||||
exportBlob('/blade-system/currency/export-currency', this.buildExportParams(), { feedback: true })
|
||||
.then(res => {
|
||||
downloadXls(res.data, `币种汇率${this.$dayjs().format('YYYY-MM-DD HH:mm:ss')}.xlsx`);
|
||||
})
|
||||
@@ -569,7 +567,8 @@ export default {
|
||||
},
|
||||
handleTemplate() {
|
||||
exportBlob(
|
||||
`/blade-system/currency/export-template?${this.website.tokenHeader}=${getToken()}`
|
||||
`/blade-system/currency/export-template?${this.website.tokenHeader}=${getToken()}`,
|
||||
{ feedback: true }
|
||||
).then(res => {
|
||||
downloadXls(res.data, '币种汇率模板.xlsx');
|
||||
});
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-edit"
|
||||
v-if="permission.customer_type_edit"
|
||||
@click="$refs.crud.rowEdit(row, index)"
|
||||
>
|
||||
@@ -48,7 +47,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
:icon="row.status === 1 ? 'el-icon-close' : 'el-icon-check'"
|
||||
v-if="permission.customer_type_status"
|
||||
@click="handleStatus(row)"
|
||||
>
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-edit"
|
||||
v-if="permission.fee_item_edit"
|
||||
@click="$refs.crud.rowEdit(row, index)"
|
||||
>
|
||||
@@ -48,7 +47,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
:icon="row.status === 1 ? 'el-icon-close' : 'el-icon-check'"
|
||||
v-if="permission.fee_item_status"
|
||||
@click="handleStatus(row)"
|
||||
>
|
||||
|
||||
@@ -116,7 +116,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-edit"
|
||||
v-if="hasPermission('port_terminal_edit')"
|
||||
@click="$refs.crud.rowEdit(row, index)"
|
||||
>
|
||||
@@ -125,7 +124,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
:icon="row.status === 1 ? 'el-icon-close' : 'el-icon-check'"
|
||||
v-if="hasPermission('port_terminal_status')"
|
||||
@click="handleStatus(row)"
|
||||
>
|
||||
@@ -172,6 +170,9 @@
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
<template #detailAddress="{ row }">
|
||||
<span class="port-terminal-page__detail-address">{{ row.detailAddress || '-' }}</span>
|
||||
</template>
|
||||
<template #longitude-form>
|
||||
<el-input
|
||||
v-model="form.longitude"
|
||||
@@ -229,6 +230,74 @@ import NProgress from 'nprogress';
|
||||
import 'nprogress/nprogress.css';
|
||||
|
||||
const DEFAULT_COUNTRY_CODE = '+86';
|
||||
const EXCLUDED_EXCEL_HEADERS = ['数据来源', '启停状态'];
|
||||
const REQUIRED_EXPORT_HEADERS = ['港口码头名称', '港口/码头名称', '类型', '国家', '城市', '经度', '纬度'];
|
||||
|
||||
const getExcelCellText = value => {
|
||||
if (value === undefined || value === null) return '';
|
||||
if (typeof value === 'object') {
|
||||
if (Array.isArray(value.richText)) {
|
||||
return value.richText.map(item => item.text || '').join('');
|
||||
}
|
||||
if (value.text) return value.text;
|
||||
if (value.result) return value.result;
|
||||
}
|
||||
return String(value);
|
||||
};
|
||||
|
||||
const removeWorkbookColumnsByHeaders = workbook => {
|
||||
workbook.eachSheet(worksheet => {
|
||||
const maxHeaderRow = Math.min(worksheet.rowCount || 0, 10);
|
||||
for (let rowIndex = 1; rowIndex <= maxHeaderRow; rowIndex += 1) {
|
||||
const row = worksheet.getRow(rowIndex);
|
||||
const indexes = [];
|
||||
row.eachCell((cell, colNumber) => {
|
||||
const text = getExcelCellText(cell.value).trim();
|
||||
if (EXCLUDED_EXCEL_HEADERS.includes(text)) {
|
||||
indexes.push(colNumber);
|
||||
}
|
||||
});
|
||||
if (indexes.length) {
|
||||
indexes
|
||||
.sort((a, b) => b - a)
|
||||
.forEach(colNumber => worksheet.spliceColumns(colNumber, 1));
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const addWorkbookRequiredHeaderMarks = workbook => {
|
||||
workbook.eachSheet(worksheet => {
|
||||
const maxHeaderRow = Math.min(worksheet.rowCount || 0, 10);
|
||||
for (let rowIndex = 1; rowIndex <= maxHeaderRow; rowIndex += 1) {
|
||||
const row = worksheet.getRow(rowIndex);
|
||||
let hasRequiredHeader = false;
|
||||
row.eachCell(cell => {
|
||||
const text = getExcelCellText(cell.value).trim();
|
||||
const header = text.replace(/\*+$/g, '').trim();
|
||||
if (REQUIRED_EXPORT_HEADERS.includes(header)) {
|
||||
cell.value = `${header}*`;
|
||||
hasRequiredHeader = true;
|
||||
}
|
||||
});
|
||||
if (hasRequiredHeader) break;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const removeExcelColumnsByHeaders = async (blob, options = {}) => {
|
||||
const { markRequiredHeaders = false } = options;
|
||||
const ExcelJS = await import('exceljs');
|
||||
const workbook = new ExcelJS.Workbook();
|
||||
await workbook.xlsx.load(await blob.arrayBuffer());
|
||||
removeWorkbookColumnsByHeaders(workbook);
|
||||
if (markRequiredHeaders) {
|
||||
addWorkbookRequiredHeaderMarks(workbook);
|
||||
}
|
||||
const buffer = await workbook.xlsx.writeBuffer();
|
||||
return new Blob([buffer], { type: 'application/vnd.ms-excel' });
|
||||
};
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -466,6 +535,7 @@ export default {
|
||||
label: '详细地址',
|
||||
prop: 'detailAddress',
|
||||
type: 'textarea',
|
||||
slot: true,
|
||||
minRows: 3,
|
||||
span: 24,
|
||||
minWidth: 220,
|
||||
@@ -1184,9 +1254,16 @@ export default {
|
||||
});
|
||||
},
|
||||
handleImport() {
|
||||
openImportDialog(this, '港口码头主数据', () => {
|
||||
openImportDialog(
|
||||
this,
|
||||
'港口码头主数据',
|
||||
() => {
|
||||
this.loadPortOptions();
|
||||
});
|
||||
},
|
||||
{
|
||||
failDetailDecorator: removeWorkbookColumnsByHeaders,
|
||||
}
|
||||
);
|
||||
},
|
||||
handleExport() {
|
||||
this.$confirm('是否导出港口码头主数据?', '提示', {
|
||||
@@ -1195,10 +1272,17 @@ export default {
|
||||
type: 'warning',
|
||||
}).then(() => {
|
||||
NProgress.start();
|
||||
exportBlob('/blade-system/port-terminal/export-port-terminal', this.buildExportParams())
|
||||
.then(res => {
|
||||
exportBlob(
|
||||
'/blade-system/port-terminal/export-port-terminal',
|
||||
this.buildExportParams(),
|
||||
{ feedback: true }
|
||||
)
|
||||
.then(async res => {
|
||||
const blob = await removeExcelColumnsByHeaders(res.data, {
|
||||
markRequiredHeaders: true,
|
||||
});
|
||||
downloadXls(
|
||||
res.data,
|
||||
blob,
|
||||
`港口码头主数据${this.$dayjs().format('YYYY-MM-DD HH:mm:ss')}.xlsx`
|
||||
);
|
||||
})
|
||||
@@ -1216,11 +1300,24 @@ export default {
|
||||
},
|
||||
handleTemplate() {
|
||||
exportBlob(
|
||||
`/blade-system/port-terminal/export-template?${this.website.tokenHeader}=${getToken()}`
|
||||
).then(res => {
|
||||
downloadXls(res.data, '港口码头主数据模板.xlsx');
|
||||
`/blade-system/port-terminal/export-template?${this.website.tokenHeader}=${getToken()}`,
|
||||
undefined,
|
||||
{ feedback: true }
|
||||
).then(async res => {
|
||||
const blob = await removeExcelColumnsByHeaders(res.data);
|
||||
downloadXls(blob, '港口码头主数据模板.xlsx');
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.port-terminal-page__detail-address {
|
||||
display: block;
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
line-height: 20px;
|
||||
padding: 4px 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -63,7 +63,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-edit"
|
||||
v-if="hasPermission('railway_station_edit')"
|
||||
@click="$refs.crud.rowEdit(row, index)"
|
||||
>
|
||||
@@ -72,7 +71,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
:icon="row.status === 1 ? 'el-icon-close' : 'el-icon-check'"
|
||||
v-if="hasPermission('railway_station_status')"
|
||||
@click="handleStatus(row)"
|
||||
>
|
||||
@@ -154,7 +152,15 @@ export default {
|
||||
};
|
||||
const validateTelegraphCode = (rule, value, callback) => {
|
||||
if (!/^[A-Z]{3}$/.test(String(value || '').toUpperCase())) {
|
||||
callback(new Error('电报码为3位大写字母'));
|
||||
callback(new Error('电报码格式不正确或已存在'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
const validateStationName = (rule, value, callback) => {
|
||||
const name = String(value || '').trim();
|
||||
if (!name || name.length > 50) {
|
||||
callback(new Error('请输入车站名称'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
@@ -162,7 +168,7 @@ export default {
|
||||
const validateLongitude = (rule, value, callback) => {
|
||||
const message = getCoordinateValidationMessage(value, 'longitude');
|
||||
if (message) {
|
||||
callback(new Error(message));
|
||||
callback(new Error('经度范围不正确'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
@@ -170,7 +176,7 @@ export default {
|
||||
const validateLatitude = (rule, value, callback) => {
|
||||
const message = getCoordinateValidationMessage(value, 'latitude');
|
||||
if (message) {
|
||||
callback(new Error(message));
|
||||
callback(new Error('纬度范围不正确'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
@@ -245,7 +251,7 @@ export default {
|
||||
minWidth: 100,
|
||||
maxlength: 3,
|
||||
rules: [
|
||||
{ required: true, message: '请输入电报码', trigger: 'blur' },
|
||||
{ required: true, message: '电报码格式不正确或已存在', trigger: 'blur' },
|
||||
{ validator: validateTelegraphCode, trigger: 'blur' },
|
||||
],
|
||||
change: ({ value }) => this.handleTelegraphChange(value),
|
||||
@@ -255,8 +261,9 @@ export default {
|
||||
label: '车站名称',
|
||||
prop: 'name',
|
||||
minWidth: 120,
|
||||
maxlength: 50,
|
||||
search: true,
|
||||
rules: [{ required: true, message: '请输入车站名称', trigger: 'blur' }],
|
||||
rules: [{ validator: validateStationName, trigger: 'blur' }],
|
||||
},
|
||||
// {
|
||||
// label: '所属铁路线路',
|
||||
@@ -357,10 +364,7 @@ export default {
|
||||
formslot: true,
|
||||
minWidth: 130,
|
||||
overHidden: false,
|
||||
rules: [
|
||||
{ required: true, message: '请输入经度', trigger: 'blur' },
|
||||
{ validator: validateLongitude, trigger: 'blur' },
|
||||
],
|
||||
rules: [{ validator: validateLongitude, trigger: 'blur' }],
|
||||
},
|
||||
{
|
||||
label: '纬度',
|
||||
@@ -368,10 +372,7 @@ export default {
|
||||
formslot: true,
|
||||
minWidth: 130,
|
||||
overHidden: false,
|
||||
rules: [
|
||||
{ required: true, message: '请输入纬度', trigger: 'blur' },
|
||||
{ validator: validateLatitude, trigger: 'blur' },
|
||||
],
|
||||
rules: [{ validator: validateLatitude, trigger: 'blur' }],
|
||||
},
|
||||
{
|
||||
label: '数据来源',
|
||||
@@ -653,14 +654,14 @@ export default {
|
||||
return row;
|
||||
},
|
||||
validateCoordinateFields(row) {
|
||||
const longitudeMessage = getCoordinateValidationMessage(row.longitude, 'longitude', true);
|
||||
const longitudeMessage = getCoordinateValidationMessage(row.longitude, 'longitude');
|
||||
if (longitudeMessage) {
|
||||
this.$message.warning(longitudeMessage);
|
||||
this.$message.warning('经度范围不正确');
|
||||
return false;
|
||||
}
|
||||
const latitudeMessage = getCoordinateValidationMessage(row.latitude, 'latitude', true);
|
||||
const latitudeMessage = getCoordinateValidationMessage(row.latitude, 'latitude');
|
||||
if (latitudeMessage) {
|
||||
this.$message.warning(latitudeMessage);
|
||||
this.$message.warning('纬度范围不正确');
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -681,13 +682,13 @@ export default {
|
||||
return Promise.reject(new Error('该TMIS编码已存在'));
|
||||
}
|
||||
if (telegraphExists) {
|
||||
return Promise.reject(new Error('该电报码已存在'));
|
||||
return Promise.reject(new Error('电报码格式不正确或已存在'));
|
||||
}
|
||||
return Promise.resolve();
|
||||
});
|
||||
},
|
||||
handleSubmitError(error, loading) {
|
||||
const uniqueMessages = ['该TMIS编码已存在', '该电报码已存在'];
|
||||
const uniqueMessages = ['该TMIS编码已存在', '电报码格式不正确或已存在'];
|
||||
if (uniqueMessages.includes(error.message)) {
|
||||
this.$message.warning(error.message);
|
||||
}
|
||||
@@ -846,7 +847,11 @@ export default {
|
||||
type: 'warning',
|
||||
}).then(() => {
|
||||
NProgress.start();
|
||||
exportBlob('/blade-system/railway-station/export-railway-station', this.buildExportParams())
|
||||
exportBlob(
|
||||
'/blade-system/railway-station/export-railway-station',
|
||||
this.buildExportParams(),
|
||||
{ feedback: true }
|
||||
)
|
||||
.then(res => {
|
||||
downloadXls(
|
||||
res.data,
|
||||
@@ -867,7 +872,9 @@ export default {
|
||||
},
|
||||
handleTemplate() {
|
||||
exportBlob(
|
||||
`/blade-system/railway-station/export-template?${this.website.tokenHeader}=${getToken()}`
|
||||
`/blade-system/railway-station/export-template?${this.website.tokenHeader}=${getToken()}`,
|
||||
undefined,
|
||||
{ feedback: true }
|
||||
).then(res => {
|
||||
downloadXls(res.data, '铁路车站主数据模板.xlsx');
|
||||
});
|
||||
|
||||
@@ -625,7 +625,8 @@ export default {
|
||||
}).then(() => {
|
||||
NProgress.start();
|
||||
exportBlob(
|
||||
`/blade-system/region/export-region?${this.website.tokenHeader}=${getToken()}`
|
||||
`/blade-system/region/export-region?${this.website.tokenHeader}=${getToken()}`,
|
||||
{ feedback: true }
|
||||
).then(res => {
|
||||
downloadXls(res.data, `行政区划数据${this.$dayjs().format('YYYY-MM-DD HH:mm:ss')}.xlsx`);
|
||||
NProgress.done();
|
||||
@@ -634,7 +635,8 @@ export default {
|
||||
},
|
||||
handleTemplate() {
|
||||
exportBlob(
|
||||
`/blade-system/region/export-template?${this.website.tokenHeader}=${getToken()}`
|
||||
`/blade-system/region/export-template?${this.website.tokenHeader}=${getToken()}`,
|
||||
{ feedback: true }
|
||||
).then(res => {
|
||||
downloadXls(res.data, '行政区划模板.xlsx');
|
||||
});
|
||||
|
||||
@@ -148,7 +148,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-view"
|
||||
v-if="hasPermission('common_cargo_view')"
|
||||
@click="$refs.crud.rowView(row, index)"
|
||||
>
|
||||
@@ -157,7 +156,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-edit"
|
||||
v-if="hasPermission('common_cargo_edit') && !row.readonly"
|
||||
@click="$refs.crud.rowEdit(row, index)"
|
||||
>
|
||||
@@ -166,7 +164,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-delete"
|
||||
v-if="hasPermission('common_cargo_delete') && !row.readonly"
|
||||
@click="rowDel(row)"
|
||||
>
|
||||
@@ -585,7 +582,7 @@ export default {
|
||||
type: 'warning',
|
||||
}).then(() => {
|
||||
NProgress.start();
|
||||
exportBlob(config.exportUrl, this.buildExportParams())
|
||||
exportBlob(config.exportUrl, this.buildExportParams(), { feedback: true })
|
||||
.then(res => {
|
||||
downloadXls(
|
||||
res.data,
|
||||
@@ -599,9 +596,13 @@ export default {
|
||||
},
|
||||
handleTemplate() {
|
||||
NProgress.start();
|
||||
exportBlob(config.templateUrl, {
|
||||
exportBlob(
|
||||
config.templateUrl,
|
||||
{
|
||||
[this.website.tokenHeader]: getToken(),
|
||||
})
|
||||
},
|
||||
{ feedback: true }
|
||||
)
|
||||
.then(res => {
|
||||
downloadXls(res.data, `${config.title}模板.xlsx`);
|
||||
})
|
||||
|
||||
@@ -105,7 +105,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-view"
|
||||
v-if="hasPermission('common_route_view')"
|
||||
@click="$refs.crud.rowView(row, index)"
|
||||
>
|
||||
@@ -114,7 +113,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-edit"
|
||||
v-if="hasPermission('common_route_edit') && !row.readonly"
|
||||
@click="$refs.crud.rowEdit(row, index)"
|
||||
>
|
||||
@@ -123,7 +121,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-delete"
|
||||
v-if="hasPermission('common_route_delete') && !row.readonly"
|
||||
@click="rowDel(row)"
|
||||
>
|
||||
@@ -612,7 +609,7 @@ export default {
|
||||
type: 'warning',
|
||||
}).then(() => {
|
||||
NProgress.start();
|
||||
exportBlob(config.exportUrl, this.buildExportParams())
|
||||
exportBlob(config.exportUrl, this.buildExportParams(), { feedback: true })
|
||||
.then(res => {
|
||||
downloadXls(
|
||||
res.data,
|
||||
|
||||
@@ -109,7 +109,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-view"
|
||||
v-if="hasPermission(`${config.permission}_view`)"
|
||||
@click="$refs.crud.rowView(row, index)"
|
||||
>
|
||||
@@ -118,28 +117,27 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-edit"
|
||||
v-if="canEdit(row)"
|
||||
@click="$refs.crud.rowEdit(row, index)"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button type="primary" text icon="el-icon-copy-document" v-if="canCopy(row)" @click="handleCopy(row)">
|
||||
<el-button type="primary" text v-if="canCopy(row)" @click="handleCopy(row)">
|
||||
复制
|
||||
</el-button>
|
||||
<el-button type="primary" text icon="el-icon-video-play" v-if="canEnable(row)" @click="handleAction('enable', row)">
|
||||
<el-button type="primary" text v-if="canEnable(row)" @click="handleAction('enable', row)">
|
||||
启用
|
||||
</el-button>
|
||||
<el-button type="primary" text icon="el-icon-video-pause" v-if="canDisable(row)" @click="handleAction('disable', row)">
|
||||
<el-button type="primary" text v-if="canDisable(row)" @click="handleAction('disable', row)">
|
||||
停用
|
||||
</el-button>
|
||||
<el-button type="primary" text icon="el-icon-refresh" v-if="canReassign(row)" @click="handleAction('reassign', row)">
|
||||
<el-button type="primary" text v-if="canReassign(row)" @click="handleAction('reassign', row)">
|
||||
重新派单
|
||||
</el-button>
|
||||
<el-button type="primary" text icon="el-icon-close" v-if="canCancel(row)" @click="handleAction('cancel', row)">
|
||||
<el-button type="primary" text v-if="canCancel(row)" @click="handleAction('cancel', row)">
|
||||
取消
|
||||
</el-button>
|
||||
<el-button type="primary" text icon="el-icon-check" v-if="canComplete(row)" @click="handleAction('complete', row)">
|
||||
<el-button type="primary" text v-if="canComplete(row)" @click="handleAction('complete', row)">
|
||||
完成
|
||||
</el-button>
|
||||
<el-button
|
||||
@@ -147,12 +145,11 @@
|
||||
:key="operation.action"
|
||||
:type="operation.type || 'primary'"
|
||||
text
|
||||
:icon="operation.icon || 'el-icon-position'"
|
||||
@click="handleCustomOperation(operation, row)"
|
||||
>
|
||||
{{ operation.label }}
|
||||
</el-button>
|
||||
<el-button type="primary" text icon="el-icon-delete" v-if="canDelete(row)" @click="rowDel(row)">
|
||||
<el-button type="primary" text v-if="canDelete(row)" @click="rowDel(row)">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
@@ -562,7 +559,7 @@ export default {
|
||||
type: 'warning',
|
||||
}).then(() => {
|
||||
NProgress.start();
|
||||
exportBlob(this.config.exportUrl, this.buildExportParams())
|
||||
exportBlob(this.config.exportUrl, this.buildExportParams(), { feedback: true })
|
||||
.then(res => {
|
||||
downloadXls(res.data, `${this.config.exportName || this.config.title}${this.$dayjs().format('YYYY-MM-DD HH:mm:ss')}.xlsx`);
|
||||
})
|
||||
@@ -573,9 +570,13 @@ export default {
|
||||
},
|
||||
handleTemplate() {
|
||||
NProgress.start();
|
||||
exportBlob(this.config.templateUrl, {
|
||||
exportBlob(
|
||||
this.config.templateUrl,
|
||||
{
|
||||
[this.website.tokenHeader]: getToken(),
|
||||
})
|
||||
},
|
||||
{ feedback: true }
|
||||
)
|
||||
.then(res => {
|
||||
downloadXls(res.data, `${this.config.title}模板.xlsx`);
|
||||
})
|
||||
|
||||
@@ -336,7 +336,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-view"
|
||||
v-if="hasPermission('process_config_view')"
|
||||
@click="$refs.crud.rowView(row, index)"
|
||||
>
|
||||
@@ -345,7 +344,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-edit"
|
||||
v-if="canEdit(row)"
|
||||
@click="$refs.crud.rowEdit(row, index)"
|
||||
>
|
||||
@@ -354,7 +352,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-copy-document"
|
||||
v-if="hasPermission('process_config_copy')"
|
||||
@click="handleCopy(row)"
|
||||
>
|
||||
@@ -363,7 +360,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-video-play"
|
||||
v-if="canEnable(row)"
|
||||
@click="handleAction('enable', row)"
|
||||
>
|
||||
@@ -372,7 +368,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-video-pause"
|
||||
v-if="canDisable(row)"
|
||||
@click="handleAction('disable', row)"
|
||||
>
|
||||
@@ -381,7 +376,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-delete"
|
||||
v-if="canDelete(row)"
|
||||
@click="rowDel(row)"
|
||||
>
|
||||
@@ -952,7 +946,7 @@ export default {
|
||||
type: 'warning',
|
||||
}).then(() => {
|
||||
NProgress.start();
|
||||
exportBlob(config.exportUrl, this.buildExportParams())
|
||||
exportBlob(config.exportUrl, this.buildExportParams(), { feedback: true })
|
||||
.then(res => {
|
||||
downloadXls(
|
||||
res.data,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -26,7 +26,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-refresh"
|
||||
v-if="permission.flow_manager_state"
|
||||
@click.stop="handleState(scope.row, scope.index)"
|
||||
>变更状态
|
||||
@@ -34,7 +33,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-search"
|
||||
v-if="permission.flow_manager_image"
|
||||
@click.stop="handleImage(scope.row, scope.index)"
|
||||
>流程图
|
||||
@@ -42,7 +40,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-delete"
|
||||
v-if="permission.flow_manager_remove"
|
||||
@click.stop="handleSlotDelete(scope.row, scope.index)"
|
||||
>删除
|
||||
|
||||
@@ -40,7 +40,6 @@
|
||||
type="primary"
|
||||
text
|
||||
size="default"
|
||||
icon="el-icon-setting"
|
||||
v-if="permission.flow_model_update"
|
||||
@click.stop="handleUpdate(scope.row, scope.index)"
|
||||
>配置
|
||||
@@ -49,7 +48,6 @@
|
||||
type="primary"
|
||||
text
|
||||
size="default"
|
||||
icon="el-icon-upload"
|
||||
v-if="permission.flow_model_deploy"
|
||||
@click.stop="handleDeploy(scope.row, scope.index)"
|
||||
>部署
|
||||
@@ -58,7 +56,6 @@
|
||||
type="primary"
|
||||
text
|
||||
size="default"
|
||||
icon="el-icon-delete"
|
||||
v-if="permission.flow_model_delete"
|
||||
@click.stop="handleSlotDelete(scope.row, scope.index)"
|
||||
>删除
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
</el-button>
|
||||
</template>
|
||||
<template #menu="scope">
|
||||
<el-button type="primary" text icon="el-icon-video-play" @click="handleRun(scope.row)"
|
||||
<el-button type="primary" text @click="handleRun(scope.row)"
|
||||
>运 行
|
||||
</el-button>
|
||||
</template>
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
</el-button>
|
||||
</template>
|
||||
<template #menu="scope">
|
||||
<el-button type="primary" text icon="el-icon-video-play" @click="handleLink(scope.row)"
|
||||
<el-button type="primary" text @click="handleLink(scope.row)"
|
||||
>服务跳转
|
||||
</el-button>
|
||||
</template>
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-edit"
|
||||
@click.stop="handleDesign(scope.row.name)"
|
||||
v-if="userInfo.authority.includes('admin')"
|
||||
>设计
|
||||
@@ -34,7 +33,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-view"
|
||||
@click.stop="handlePreview(scope.row.name)"
|
||||
v-if="userInfo.authority.includes('admin')"
|
||||
>预览
|
||||
|
||||
@@ -40,7 +40,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-download"
|
||||
v-if="permission.attach_download"
|
||||
@click="handleDownload(scope.row)"
|
||||
>下载
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-video-play"
|
||||
v-if="userInfo.authority.includes('admin')"
|
||||
@click="handleDebug(scope.row)"
|
||||
>调试
|
||||
@@ -42,7 +41,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-circle-check"
|
||||
v-if="permission.oss_enable"
|
||||
@click.stop="handleEnable(scope.row)"
|
||||
>启用
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-video-play"
|
||||
v-if="userInfo.authority.includes('admin')"
|
||||
@click="handleDebug(scope.row)"
|
||||
>调试
|
||||
@@ -42,7 +41,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-circle-check"
|
||||
v-if="permission.sms_enable"
|
||||
@click.stop="handleEnable(scope.row)"
|
||||
>启用
|
||||
|
||||
@@ -49,7 +49,6 @@
|
||||
<el-button
|
||||
text
|
||||
type="primary"
|
||||
icon="el-icon-view"
|
||||
@click.stop="$refs.authLockCrud.rowView(row)"
|
||||
>查看</el-button
|
||||
>
|
||||
@@ -57,7 +56,6 @@
|
||||
v-if="(row.lockStatus === 'LOCKED' || row.lockStatus === 'PRE_LOCKED') && !row.expired"
|
||||
text
|
||||
type="primary"
|
||||
icon="el-icon-key"
|
||||
@click.stop="handleAuthLockUnlock(row)"
|
||||
>解锁</el-button
|
||||
>
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
<el-button
|
||||
text
|
||||
type="primary"
|
||||
icon="el-icon-view"
|
||||
@click.stop="$refs.authLogCrud.rowView(row)"
|
||||
>查看</el-button
|
||||
>
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-circle-plus"
|
||||
@click.stop="handleAdd(scope.row, scope.index)"
|
||||
v-if="userInfo.authority.includes('admin')"
|
||||
>新增子项
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-setting"
|
||||
@click.stop="handleRowClick(scope.row)"
|
||||
v-if="userInfo.authority.includes('admin')"
|
||||
>字典配置
|
||||
@@ -83,7 +82,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-circle-plus"
|
||||
@click.stop="handleAdd(scope.row, scope.index)"
|
||||
v-if="userInfo.authority.includes('admin')"
|
||||
>新增子项
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-setting"
|
||||
@click.stop="handleRowClick(scope.row)"
|
||||
v-if="userInfo.authority.includes('admin')"
|
||||
>字典配置
|
||||
@@ -83,7 +82,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-circle-plus"
|
||||
@click.stop="handleAdd(scope.row, scope.index)"
|
||||
v-if="userInfo.authority.includes('admin')"
|
||||
>新增子项
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-circle-plus"
|
||||
@click.stop="handleAdd(scope.row, scope.index)"
|
||||
v-if="userInfo.authority.includes('admin') && scope.row.category === 1"
|
||||
>新增子项
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<!-- 查询按钮 -->
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="searchChange">搜 索</el-button>
|
||||
<el-button icon="el-icon-delete" @click="searchReset()">清 空</el-button>
|
||||
<el-button icon="el-icon-delete" @click="searchReset()">重 置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-row>
|
||||
@@ -87,7 +87,6 @@
|
||||
v-if="this.permissionList.viewBtn"
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-view"
|
||||
@click="handleView(row)"
|
||||
>查看
|
||||
</el-button>
|
||||
@@ -95,7 +94,6 @@
|
||||
v-if="this.permissionList.editBtn"
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-edit"
|
||||
@click="handleEdit(row)"
|
||||
>编辑
|
||||
</el-button>
|
||||
@@ -103,7 +101,6 @@
|
||||
v-if="this.permissionList.delBtn"
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-delete"
|
||||
@click="rowDel(row)"
|
||||
>删除
|
||||
</el-button>
|
||||
|
||||
@@ -119,7 +119,6 @@
|
||||
v-if="userInfo.authority.includes('administrator') && !recycleMode"
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-coin"
|
||||
@click.stop="handleRowDatasource(scope.row)"
|
||||
>数据源
|
||||
</el-button>
|
||||
@@ -127,7 +126,6 @@
|
||||
v-if="userInfo.authority.includes('administrator') && !recycleMode"
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-notebook"
|
||||
@click.stop="handleRowPackage(scope.row)"
|
||||
>产品包
|
||||
</el-button>
|
||||
|
||||
@@ -42,7 +42,6 @@
|
||||
v-if="permission.topmenu_setting"
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-setting"
|
||||
@click.stop="handleRowMenuSetting(scope.row)"
|
||||
>配置
|
||||
</el-button>
|
||||
|
||||
@@ -128,7 +128,6 @@
|
||||
<el-button
|
||||
text
|
||||
type="primary"
|
||||
icon="el-icon-view"
|
||||
v-if="this.permission.user_view"
|
||||
@click.stop="$refs.crud.rowView(row, index)"
|
||||
>查看
|
||||
@@ -136,48 +135,39 @@
|
||||
<el-button
|
||||
text
|
||||
type="primary"
|
||||
icon="el-icon-edit"
|
||||
v-if="this.permission.user_edit"
|
||||
@click.stop="$refs.crud.rowEdit(row, index)"
|
||||
>编辑
|
||||
</el-button>
|
||||
<el-dropdown @command="command => handleDropdownCommand(command, row, index)">
|
||||
<el-button text type="primary" icon="el-icon-setting">更 多 </el-button>
|
||||
<el-button text type="primary">更 多 </el-button>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item command="setLeader" v-if="userInfo.authority.includes('admin')">
|
||||
<el-icon><circle-close v-if="row.isLeader === 1" /><coordinate v-else /></el-icon>
|
||||
{{ row.isLeader === 1 ? '取消主管' : '设置主管' }}
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item command="grantRole" v-if="permission.user_role">
|
||||
<el-icon><user /></el-icon>
|
||||
角色配置
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
command="platformConfig"
|
||||
v-if="userInfo.authority.includes('admin')"
|
||||
>
|
||||
<el-icon><setting /></el-icon>
|
||||
平台配置
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item command="authLog" v-if="userInfo.authority.includes('admin')">
|
||||
<el-icon><document /></el-icon>
|
||||
认证日志
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item command="lockUser" v-if="userInfo.authority.includes('admin')">
|
||||
<el-icon><lock /></el-icon>
|
||||
锁定账号
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item command="resetPassword" v-if="permission.user_reset">
|
||||
<el-icon><refresh /></el-icon>
|
||||
密码重置
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item command="setPassword" v-if="permission.user_reset">
|
||||
<el-icon><key /></el-icon>
|
||||
修改密码
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item command="delete" v-if="this.permission.user_delete">
|
||||
<el-icon><delete /></el-icon>
|
||||
删除用户
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
|
||||
@@ -85,7 +85,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-document-copy"
|
||||
v-if="permission.code_edit"
|
||||
class="none-border"
|
||||
@click.stop="handleCopy(scope.row)"
|
||||
@@ -94,7 +93,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-refresh"
|
||||
v-if="userInfo.authority.includes('administrator')"
|
||||
class="none-border"
|
||||
@click.stop="handleBuildSingle(scope.row)"
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-circle-check"
|
||||
@click.stop="handleEnable(scope.row)"
|
||||
>启 用
|
||||
</el-button>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
</el-button>
|
||||
</template>
|
||||
<template #menu="scope">
|
||||
<el-button type="primary" text icon="el-icon-setting" @click.stop="handleDesign(scope.row)"
|
||||
<el-button type="primary" text @click.stop="handleDesign(scope.row)"
|
||||
>设 计
|
||||
</el-button>
|
||||
</template>
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-setting"
|
||||
plain
|
||||
class="none-border"
|
||||
@click.stop="handleModel(row)"
|
||||
|
||||
@@ -95,7 +95,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-view"
|
||||
v-if="hasPermission('driver_view')"
|
||||
@click="openDriver(row, true)"
|
||||
>
|
||||
@@ -104,7 +103,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-edit"
|
||||
v-if="hasPermission('driver_edit')"
|
||||
@click="openDriver(row)"
|
||||
>
|
||||
@@ -113,7 +111,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
:icon="row.status === 1 ? 'el-icon-close' : 'el-icon-check'"
|
||||
v-if="hasPermission('driver_status')"
|
||||
@click="handleStatus(row)"
|
||||
>
|
||||
@@ -917,7 +914,7 @@ export default {
|
||||
type: 'warning',
|
||||
}).then(() => {
|
||||
NProgress.start();
|
||||
exportBlob('/blade-transport/driver/export-driver', this.buildExportParams())
|
||||
exportBlob('/blade-transport/driver/export-driver', this.buildExportParams(), { feedback: true })
|
||||
.then(res => {
|
||||
downloadXls(res.data, `司机管理${this.$dayjs().format('YYYY-MM-DD HH:mm:ss')}.xlsx`);
|
||||
})
|
||||
|
||||
@@ -90,7 +90,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-edit"
|
||||
v-if="hasPermission('transport_ship_edit')"
|
||||
@click="openShip(row)"
|
||||
>
|
||||
@@ -99,7 +98,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-view"
|
||||
v-if="hasPermission('transport_ship_view')"
|
||||
@click="openShip(row, true)"
|
||||
>
|
||||
@@ -108,7 +106,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
:icon="row.status === 1 ? 'el-icon-close' : 'el-icon-check'"
|
||||
v-if="hasPermission('transport_ship_status')"
|
||||
@click="handleStatus(row)"
|
||||
>
|
||||
@@ -945,7 +942,8 @@ export default {
|
||||
NProgress.start();
|
||||
exportBlob(
|
||||
'/blade-transport/transport-ship/export-transport-ship',
|
||||
this.buildExportParams()
|
||||
this.buildExportParams(),
|
||||
{ feedback: true }
|
||||
)
|
||||
.then(res => {
|
||||
downloadXls(res.data, `船舶管理${this.$dayjs().format('YYYY-MM-DD HH:mm:ss')}.xlsx`);
|
||||
|
||||
@@ -82,7 +82,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-view"
|
||||
v-if="hasPermission('transport_vehicle_view')"
|
||||
@click="openVehicle(row, true)"
|
||||
>
|
||||
@@ -91,7 +90,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-edit"
|
||||
v-if="hasPermission('transport_vehicle_edit')"
|
||||
@click="openVehicle(row)"
|
||||
>
|
||||
@@ -100,7 +98,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
:icon="row.status === 1 ? 'el-icon-close' : 'el-icon-check'"
|
||||
v-if="hasPermission('transport_vehicle_status')"
|
||||
@click="handleStatus(row)"
|
||||
>
|
||||
@@ -894,7 +891,8 @@ export default {
|
||||
NProgress.start();
|
||||
exportBlob(
|
||||
'/blade-transport/transport-vehicle/export-transport-vehicle',
|
||||
this.buildExportParams()
|
||||
this.buildExportParams(),
|
||||
{ feedback: true }
|
||||
)
|
||||
.then(res => {
|
||||
downloadXls(res.data, `车辆管理${this.$dayjs().format('YYYY-MM-DD HH:mm:ss')}.xlsx`);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<el-button type="primary" @click="handleForm()" icon="el-icon-plus">add</el-button>
|
||||
</template>
|
||||
<template #menu="{ row }">
|
||||
<el-button type="primary" text @click="handleForm(row.id)" icon="el-icon-edit"
|
||||
<el-button type="primary" text @click="handleForm(row.id)"
|
||||
>edit
|
||||
</el-button>
|
||||
</template>
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-circle-plus"
|
||||
@click.stop="handleAdd(scope.row, scope.index)"
|
||||
>新增子项
|
||||
</el-button>
|
||||
|
||||
@@ -91,7 +91,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-circle-plus"
|
||||
@click.stop="handleAdd(scope.row, scope.index)"
|
||||
v-if="userInfo.authority.includes('admin')"
|
||||
>新增子项
|
||||
|
||||
@@ -91,7 +91,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-circle-plus"
|
||||
@click.stop="handleAdd(scope.row, scope.index)"
|
||||
v-if="userInfo.authority.includes('admin')"
|
||||
>新增子项
|
||||
|
||||
@@ -439,7 +439,8 @@ export default {
|
||||
NProgress.start();
|
||||
exportBlob(
|
||||
'/blade-transport/accident-record/export-accident-record',
|
||||
this.buildExportParams()
|
||||
this.buildExportParams(),
|
||||
{ feedback: true }
|
||||
)
|
||||
.then(res => {
|
||||
downloadXls(res.data, `事故记录${this.$dayjs().format('YYYY-MM-DD HH:mm:ss')}.xlsx`);
|
||||
@@ -461,7 +462,8 @@ export default {
|
||||
},
|
||||
handleTemplate() {
|
||||
exportBlob(
|
||||
`/blade-transport/accident-record/export-template?${this.website.tokenHeader}=${getToken()}`
|
||||
`/blade-transport/accident-record/export-template?${this.website.tokenHeader}=${getToken()}`,
|
||||
{ feedback: true }
|
||||
).then(res => {
|
||||
downloadXls(res.data, '事故记录模板.xlsx');
|
||||
});
|
||||
|
||||
@@ -422,7 +422,8 @@ export default {
|
||||
NProgress.start();
|
||||
exportBlob(
|
||||
'/blade-transport/annual-inspection-record/export-annual-inspection-record',
|
||||
this.buildExportParams()
|
||||
this.buildExportParams(),
|
||||
{ feedback: true }
|
||||
)
|
||||
.then(res => {
|
||||
downloadXls(res.data, `年检记录${this.$dayjs().format('YYYY-MM-DD HH:mm:ss')}.xlsx`);
|
||||
@@ -443,7 +444,8 @@ export default {
|
||||
exportBlob(
|
||||
`/blade-transport/annual-inspection-record/export-template?${
|
||||
this.website.tokenHeader
|
||||
}=${getToken()}`
|
||||
}=${getToken()}`,
|
||||
{ feedback: true }
|
||||
).then(res => {
|
||||
downloadXls(res.data, '年检记录模板.xlsx');
|
||||
});
|
||||
|
||||
@@ -72,7 +72,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-edit"
|
||||
v-if="hasPermission('credit_score_quantification_edit')"
|
||||
@click="openConfig(row)"
|
||||
>
|
||||
@@ -81,8 +80,7 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-position"
|
||||
v-if="hasPermission('credit_score_quantification_publish') && row.status !== 1"
|
||||
v-if="hasPermission('credit_score_quantification_publish') && row.status === 3"
|
||||
@click="handlePublish(row)"
|
||||
>
|
||||
发布
|
||||
@@ -90,7 +88,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
:icon="row.status === 1 ? 'el-icon-close' : 'el-icon-check'"
|
||||
v-if="hasPermission('credit_score_quantification_status') && row.status !== 3"
|
||||
@click="handleStatus(row)"
|
||||
>
|
||||
@@ -99,7 +96,6 @@
|
||||
<el-button
|
||||
type="danger"
|
||||
text
|
||||
icon="el-icon-delete"
|
||||
v-if="hasPermission('credit_score_quantification_delete') && row.status === 3"
|
||||
@click="rowDel(row)"
|
||||
>
|
||||
@@ -147,7 +143,7 @@
|
||||
<div class="section-title dialog-section-title">评分表</div>
|
||||
</div>
|
||||
<el-table :data="configForm.categories" border class="config-table">
|
||||
<el-table-column label="序号" type="index" width="70" align="center" />
|
||||
<el-table-column label="序号" type="index" width="90" align="center" />
|
||||
<el-table-column label="评分类目" prop="categoryName" min-width="180" />
|
||||
<el-table-column label="评分项目数" width="140" align="center">
|
||||
<template #default="{ row }">{{ row.items.length }}</template>
|
||||
@@ -166,7 +162,7 @@
|
||||
</el-button>
|
||||
</div>
|
||||
<el-table :data="configForm.standards" border class="config-table">
|
||||
<el-table-column label="序号" type="index" width="70" align="center" />
|
||||
<el-table-column label="序号" type="index" width="90" align="center" />
|
||||
<el-table-column label="信用等级" prop="creditLevel" width="120" align="center" />
|
||||
<el-table-column label="得分率" width="160" align="center">
|
||||
<template #default="{ row }"
|
||||
@@ -201,6 +197,7 @@
|
||||
v-model="categoryBox"
|
||||
width="82%"
|
||||
class="score-dialog"
|
||||
:close-on-press-escape="false"
|
||||
>
|
||||
<div class="category-detail">
|
||||
<div class="category-line">评分类目:{{ currentCategory.categoryName }}</div>
|
||||
@@ -211,7 +208,7 @@
|
||||
</el-button>
|
||||
</div>
|
||||
<el-table :data="currentCategory.items" border class="config-table">
|
||||
<el-table-column label="序号" type="index" width="70" align="center" />
|
||||
<el-table-column label="序号" type="index" width="90" align="center" />
|
||||
<el-table-column label="评分项目" prop="itemName" width="180" />
|
||||
<el-table-column label="得分说明" prop="scoreDescription" min-width="260" />
|
||||
<el-table-column label="选项数" width="100" align="center">
|
||||
@@ -220,9 +217,15 @@
|
||||
<el-table-column label="操作" width="160" align="center">
|
||||
<template #default="{ row, $index }">
|
||||
<el-button type="primary" text @click="openItem(row, $index)">编辑</el-button>
|
||||
<el-button type="danger" text v-if="!readonly" @click="removeItem($index)"
|
||||
>删除</el-button
|
||||
<el-button
|
||||
type="danger"
|
||||
text
|
||||
v-if="!readonly"
|
||||
:disabled="currentCategory.items.length <= 1"
|
||||
@click="removeItem($index)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -232,39 +235,57 @@
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="评分项目详情" append-to-body v-model="itemBox" width="76%">
|
||||
<el-form :model="itemForm" label-position="right" label-width="auto" :disabled="readonly">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-dialog
|
||||
title="评分项目详情"
|
||||
append-to-body
|
||||
v-model="itemBox"
|
||||
width="86%"
|
||||
class="score-item-dialog"
|
||||
>
|
||||
<el-form
|
||||
:model="itemForm"
|
||||
label-position="right"
|
||||
label-width="112px"
|
||||
:disabled="readonly"
|
||||
class="score-item-form"
|
||||
>
|
||||
<div class="score-item-form__top">
|
||||
<el-form-item label="评分项目" required>
|
||||
<el-input v-model="itemForm.itemName" maxlength="20" show-word-limit />
|
||||
<el-input v-model="itemForm.itemName" maxlength="20" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="分值" required>
|
||||
<el-input-number v-model="itemForm.score" :min="0" :precision="2" :controls="false" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
<el-form-item label="得分说明">
|
||||
<el-input v-model="itemForm.scoreDescription" maxlength="300" show-word-limit />
|
||||
<el-input v-model="itemForm.scoreDescription" maxlength="300" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="选项描述">
|
||||
<el-input v-model="itemForm.optionDescription" maxlength="100" show-word-limit />
|
||||
<el-input v-model="itemForm.optionDescription" maxlength="100" />
|
||||
</el-form-item>
|
||||
<el-form-item label="选项" required>
|
||||
<div class="option-editor">
|
||||
<div class="option-row" v-for="(option, index) in itemForm.options" :key="index">
|
||||
<el-input v-model="option.optionName" maxlength="100" placeholder="选项描述" />
|
||||
<el-input-number v-model="option.score" :min="0" :precision="2" placeholder="分值" />
|
||||
<el-input v-model="option.optionName" maxlength="100" />
|
||||
<div class="option-score">
|
||||
<el-input-number v-model="option.score" :min="0" :precision="2" :controls="false" />
|
||||
<span class="score-unit">分</span>
|
||||
</div>
|
||||
<el-button
|
||||
type="danger"
|
||||
type="primary"
|
||||
text
|
||||
class="option-delete"
|
||||
v-if="!readonly && itemForm.options.length > 1"
|
||||
@click="removeOption(index)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</div>
|
||||
<el-button type="primary" text v-if="!readonly" @click="addOption">+添加选项</el-button>
|
||||
<div class="option-add">
|
||||
<el-button type="primary" text v-if="!readonly" @click="addOption">
|
||||
+添加选项
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -274,12 +295,23 @@
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="评估标准设置" append-to-body v-model="standardBox" width="76%">
|
||||
<el-dialog
|
||||
title="评估标准设置"
|
||||
append-to-body
|
||||
v-model="standardBox"
|
||||
width="76%"
|
||||
:close-on-press-escape="false"
|
||||
>
|
||||
<el-form :model="standardForm" label-position="right" label-width="auto" :disabled="readonly">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="信用等级" required>
|
||||
<el-select v-model="standardForm.creditLevel" placeholder="请选择信用等级" clearable>
|
||||
<el-select
|
||||
v-model="standardForm.creditLevel"
|
||||
placeholder="请选择信用等级"
|
||||
clearable
|
||||
@change="handleStandardCreditLevelChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in creditLevelOptions"
|
||||
:key="item.value"
|
||||
@@ -419,6 +451,7 @@ export default {
|
||||
border: true,
|
||||
index: true,
|
||||
indexLabel: '序号',
|
||||
indexWidth: 90,
|
||||
addBtn: false,
|
||||
viewBtn: false,
|
||||
delBtn: false,
|
||||
@@ -547,6 +580,7 @@ export default {
|
||||
emptyItem() {
|
||||
return {
|
||||
itemName: '',
|
||||
score: 0,
|
||||
scoreDescription: '',
|
||||
optionDescription: '',
|
||||
options: [{ optionName: '', score: 0 }],
|
||||
@@ -608,19 +642,55 @@ export default {
|
||||
},
|
||||
openItem(row, index = -1) {
|
||||
this.currentItemIndex = index;
|
||||
this.itemForm = row ? JSON.parse(JSON.stringify(row)) : this.emptyItem();
|
||||
this.itemForm = row
|
||||
? { ...this.emptyItem(), ...JSON.parse(JSON.stringify(row)) }
|
||||
: this.emptyItem();
|
||||
this.itemBox = true;
|
||||
},
|
||||
hasDuplicateItemName(itemName, currentIndex = -1) {
|
||||
const name = String(itemName || '').trim();
|
||||
return this.currentCategory.items.some(
|
||||
(item, index) => index !== currentIndex && String(item.itemName || '').trim() === name
|
||||
);
|
||||
},
|
||||
saveItem() {
|
||||
if (!this.itemForm.itemName || !this.itemForm.itemName.trim()) {
|
||||
this.$message.warning('请输入评分项目');
|
||||
return;
|
||||
}
|
||||
if (this.hasDuplicateItemName(this.itemForm.itemName, this.currentItemIndex)) {
|
||||
this.$message.warning('评分项目名称不能重复');
|
||||
return;
|
||||
}
|
||||
if (
|
||||
this.itemForm.score === undefined ||
|
||||
this.itemForm.score === null ||
|
||||
this.itemForm.score === ''
|
||||
) {
|
||||
this.$message.warning('请输入分值');
|
||||
return;
|
||||
}
|
||||
if (!this.itemForm.options.length) {
|
||||
this.$message.warning('至少添加1条档位选项');
|
||||
return;
|
||||
}
|
||||
const invalidOption = this.itemForm.options.some(
|
||||
option =>
|
||||
!String(option.optionName || '').trim() ||
|
||||
option.score === undefined ||
|
||||
option.score === null ||
|
||||
option.score === ''
|
||||
);
|
||||
if (invalidOption) {
|
||||
this.$message.warning('请完整填写档位选项');
|
||||
return;
|
||||
}
|
||||
const item = JSON.parse(JSON.stringify(this.itemForm));
|
||||
item.itemName = String(item.itemName || '').trim();
|
||||
item.options = item.options.map(option => ({
|
||||
...option,
|
||||
optionName: String(option.optionName || '').trim(),
|
||||
}));
|
||||
if (this.currentItemIndex >= 0) {
|
||||
this.currentCategory.items.splice(this.currentItemIndex, 1, item);
|
||||
} else {
|
||||
@@ -629,6 +699,10 @@ export default {
|
||||
this.itemBox = false;
|
||||
},
|
||||
removeItem(index) {
|
||||
if (this.currentCategory.items.length <= 1) {
|
||||
this.$message.warning('评分类目详情至少保留1条评分项目');
|
||||
return;
|
||||
}
|
||||
this.currentCategory.items.splice(index, 1);
|
||||
},
|
||||
addOption() {
|
||||
@@ -648,6 +722,13 @@ export default {
|
||||
(item, index) => index !== currentIndex && String(item.creditLevel || '').trim() === level
|
||||
);
|
||||
},
|
||||
handleStandardCreditLevelChange(value) {
|
||||
if (!value) return;
|
||||
if (this.hasDuplicateCreditLevel(value, this.currentStandardIndex)) {
|
||||
this.$message.warning('信用等级不能重复');
|
||||
this.standardForm.creditLevel = '';
|
||||
}
|
||||
},
|
||||
isValidCreditLevel(creditLevel) {
|
||||
return this.creditLevelOptions.some(item => item.value === String(creditLevel || '').trim());
|
||||
},
|
||||
@@ -681,8 +762,28 @@ export default {
|
||||
this.$message.warning('得分率下限必须小于上限');
|
||||
return;
|
||||
}
|
||||
if (
|
||||
Number(this.standardForm.creditLimitLower) >= Number(this.standardForm.creditLimitUpper)
|
||||
) {
|
||||
this.$message.warning('授信额度下限必须小于上限');
|
||||
return;
|
||||
}
|
||||
const standard = JSON.parse(JSON.stringify(this.standardForm));
|
||||
standard.creditLevel = String(standard.creditLevel || '').trim();
|
||||
const nextStandards = JSON.parse(JSON.stringify(this.configForm.standards));
|
||||
if (this.currentStandardIndex >= 0) {
|
||||
nextStandards.splice(this.currentStandardIndex, 1, standard);
|
||||
} else {
|
||||
nextStandards.push(standard);
|
||||
}
|
||||
if (this.hasRangeOverlap(nextStandards, 'scoreRateLower', 'scoreRateUpper')) {
|
||||
this.$message.warning('评估标准中的得分率区间不能重叠');
|
||||
return;
|
||||
}
|
||||
if (this.hasRangeOverlap(nextStandards, 'creditLimitLower', 'creditLimitUpper')) {
|
||||
this.$message.warning('评估标准中的授信额度区间不能重叠');
|
||||
return;
|
||||
}
|
||||
if (this.currentStandardIndex >= 0) {
|
||||
this.configForm.standards.splice(this.currentStandardIndex, 1, standard);
|
||||
} else {
|
||||
@@ -693,6 +794,21 @@ export default {
|
||||
removeStandard(index) {
|
||||
this.configForm.standards.splice(index, 1);
|
||||
},
|
||||
isBlankValue(value) {
|
||||
return value === undefined || value === null || value === '';
|
||||
},
|
||||
hasRangeOverlap(list, lowerProp, upperProp) {
|
||||
const ranges = list
|
||||
.map(item => ({
|
||||
lower: Number(item[lowerProp]),
|
||||
upper: Number(item[upperProp]),
|
||||
}))
|
||||
.sort((a, b) => a.lower - b.lower);
|
||||
return ranges.some((range, index) => {
|
||||
const next = ranges[index + 1];
|
||||
return next && range.upper > next.lower;
|
||||
});
|
||||
},
|
||||
validateConfig() {
|
||||
if (!this.configForm.name || !this.configForm.name.trim()) {
|
||||
this.$message.warning('请输入评定表名称');
|
||||
@@ -704,6 +820,13 @@ export default {
|
||||
return false;
|
||||
}
|
||||
for (const category of this.configForm.categories) {
|
||||
const itemNames = (category.items || [])
|
||||
.map(item => String(item.itemName || '').trim())
|
||||
.filter(Boolean);
|
||||
if (new Set(itemNames).size !== itemNames.length) {
|
||||
this.$message.warning(`${category.categoryName}的评分项目名称不能重复`);
|
||||
return false;
|
||||
}
|
||||
for (const item of category.items) {
|
||||
if (!item.options || item.options.length === 0) {
|
||||
this.$message.warning(`${item.itemName}至少存在1条档位选项`);
|
||||
@@ -724,9 +847,90 @@ export default {
|
||||
}
|
||||
return true;
|
||||
},
|
||||
validatePublishConfig(config) {
|
||||
const detail = this.normalizeDetail(config || {});
|
||||
const basic = detail.categories.find(item => item.categoryCode === 'basic');
|
||||
if (!basic || !basic.items || basic.items.length === 0) {
|
||||
this.$message.warning('发布前至少配置1条基础得分项目');
|
||||
return false;
|
||||
}
|
||||
for (const category of detail.categories) {
|
||||
for (const item of category.items || []) {
|
||||
if (!String(item.itemName || '').trim()) {
|
||||
this.$message.warning('发布前请完整填写评分项目名称');
|
||||
return false;
|
||||
}
|
||||
if (!item.options || item.options.length === 0) {
|
||||
this.$message.warning(`${item.itemName || '评分项目'}至少配置1个档位选项`);
|
||||
return false;
|
||||
}
|
||||
const invalidOption = item.options.some(
|
||||
option => !String(option.optionName || '').trim() || this.isBlankValue(option.score)
|
||||
);
|
||||
if (invalidOption) {
|
||||
this.$message.warning(`${item.itemName || '评分项目'}的档位选项未填写完整`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const standards = detail.standards || [];
|
||||
if (standards.length === 0) {
|
||||
this.$message.warning('发布前至少配置1条信用等级评估标准');
|
||||
return false;
|
||||
}
|
||||
const requiredFields = [
|
||||
'scoreRateLower',
|
||||
'scoreRateUpper',
|
||||
'scoreRateIncrease',
|
||||
'creditLimitLower',
|
||||
'creditLimitUpper',
|
||||
'creditLimitIncrease',
|
||||
];
|
||||
for (const standard of standards) {
|
||||
if (!standard.creditLevel) {
|
||||
this.$message.warning('评估标准中的信用等级不能为空');
|
||||
return false;
|
||||
}
|
||||
if (!this.isValidCreditLevel(standard.creditLevel)) {
|
||||
this.$message.warning('评估标准中的信用等级只能选择A/B/C/D/E/F');
|
||||
return false;
|
||||
}
|
||||
if (requiredFields.some(field => this.isBlankValue(standard[field]))) {
|
||||
this.$message.warning(`${standard.creditLevel}信用等级评估标准必填项未填写完整`);
|
||||
return false;
|
||||
}
|
||||
if (Number(standard.scoreRateLower) >= Number(standard.scoreRateUpper)) {
|
||||
this.$message.warning(`${standard.creditLevel}信用等级得分率下限必须小于上限`);
|
||||
return false;
|
||||
}
|
||||
if (Number(standard.creditLimitLower) >= Number(standard.creditLimitUpper)) {
|
||||
this.$message.warning(`${standard.creditLevel}信用等级授信额度下限必须小于上限`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
const creditLevels = standards.map(item => String(item.creditLevel || '').trim());
|
||||
if (new Set(creditLevels).size !== creditLevels.length) {
|
||||
this.$message.warning('评估标准中的信用等级不能重复');
|
||||
return false;
|
||||
}
|
||||
if (this.hasRangeOverlap(standards, 'scoreRateLower', 'scoreRateUpper')) {
|
||||
this.$message.warning('评估标准中的得分率区间不能重叠');
|
||||
return false;
|
||||
}
|
||||
if (this.hasRangeOverlap(standards, 'creditLimitLower', 'creditLimitUpper')) {
|
||||
this.$message.warning('评估标准中的授信额度区间不能重叠');
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
saveConfig() {
|
||||
if (!this.validateConfig()) return;
|
||||
submit(this.configForm).then(() => {
|
||||
submit({
|
||||
...this.configForm,
|
||||
status: 3,
|
||||
}).then(() => {
|
||||
this.configBox = false;
|
||||
this.onLoad(this.page);
|
||||
this.$message({ type: 'success', message: '操作成功!' });
|
||||
@@ -767,8 +971,16 @@ export default {
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(() => publish(row.id))
|
||||
.then(() => {
|
||||
.then(() => getDetail(row.id))
|
||||
.then(res => {
|
||||
const detail = this.normalizeDetail(res.data.data || {});
|
||||
if (!this.validatePublishConfig(detail)) {
|
||||
return false;
|
||||
}
|
||||
return publish(row.id).then(() => true);
|
||||
})
|
||||
.then(published => {
|
||||
if (!published) return;
|
||||
this.onLoad(this.page);
|
||||
this.$message({ type: 'success', message: '发布成功!' });
|
||||
});
|
||||
@@ -776,7 +988,7 @@ export default {
|
||||
handleStatus(row) {
|
||||
const nextStatus = row.status === 1 ? 2 : 1;
|
||||
const actionName = nextStatus === 1 ? '启用' : '停用';
|
||||
this.$confirm(`是否确认${actionName}该量表?`, {
|
||||
this.$confirm(`是否确认${actionName}该评分量化表?`, {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
@@ -830,7 +1042,8 @@ export default {
|
||||
NProgress.start();
|
||||
exportBlob(
|
||||
'/blade-transport/credit-score-quantification/export-credit-score-quantification',
|
||||
this.buildExportParams()
|
||||
this.buildExportParams(),
|
||||
{ feedback: true }
|
||||
)
|
||||
.then(res => {
|
||||
downloadXls(res.data, `评分量化表${this.$dayjs().format('YYYY-MM-DD HH:mm:ss')}.xlsx`);
|
||||
@@ -854,7 +1067,8 @@ export default {
|
||||
exportBlob(
|
||||
`/blade-transport/credit-score-quantification/export-template?${
|
||||
this.website.tokenHeader
|
||||
}=${getToken()}`
|
||||
}=${getToken()}`,
|
||||
{ feedback: true }
|
||||
).then(res => {
|
||||
downloadXls(res.data, '评分量化表模板.xlsx');
|
||||
});
|
||||
@@ -907,18 +1121,105 @@ export default {
|
||||
color: #606266;
|
||||
}
|
||||
|
||||
.score-item-form {
|
||||
width: 100%;
|
||||
max-width: 1400px;
|
||||
margin: 0 auto;
|
||||
padding: 4px 0 6px;
|
||||
|
||||
:deep(.el-form-item) {
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
:deep(.el-form-item__label) {
|
||||
padding-right: 10px;
|
||||
color: #606266;
|
||||
font-size: 14px;
|
||||
line-height: 32px;
|
||||
}
|
||||
|
||||
:deep(.el-input),
|
||||
:deep(.el-input-number) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
:deep(.el-input__wrapper),
|
||||
:deep(.el-input-number .el-input__wrapper) {
|
||||
min-height: 32px;
|
||||
border-radius: 0;
|
||||
box-shadow: 0 0 0 1px #dcdfe6 inset;
|
||||
}
|
||||
|
||||
:deep(.el-input__inner) {
|
||||
height: 32px;
|
||||
color: #303133;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
&__top {
|
||||
display: grid;
|
||||
grid-template-columns: 360px 360px;
|
||||
column-gap: 112px;
|
||||
|
||||
:deep(.el-form-item) {
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.option-editor {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.option-row {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(260px, 1fr) 190px 32px 70px;
|
||||
gap: 12px;
|
||||
grid-template-columns: minmax(420px, 1fr) 315px 74px;
|
||||
gap: 54px;
|
||||
align-items: center;
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
|
||||
.option-score {
|
||||
position: relative;
|
||||
|
||||
.score-unit {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 12px;
|
||||
z-index: 1;
|
||||
margin: 0;
|
||||
color: #303133;
|
||||
font-size: 14px;
|
||||
line-height: 1;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
:deep(.el-input__inner) {
|
||||
padding-right: 42px;
|
||||
}
|
||||
}
|
||||
|
||||
.option-delete {
|
||||
justify-self: start;
|
||||
min-height: 32px;
|
||||
padding: 0;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.option-add {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-top: 6px;
|
||||
|
||||
:deep(.el-button) {
|
||||
min-height: 32px;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
.range-input {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -934,4 +1235,42 @@ export default {
|
||||
max-height: 70vh;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
:deep(.score-item-dialog) {
|
||||
.el-dialog__header {
|
||||
padding: 20px 24px 10px;
|
||||
}
|
||||
|
||||
.el-dialog__title {
|
||||
color: #303133;
|
||||
font-size: 20px;
|
||||
font-weight: 700;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.el-dialog__body {
|
||||
padding: 12px 24px 14px;
|
||||
}
|
||||
|
||||
.el-dialog__footer {
|
||||
padding: 12px 24px 20px;
|
||||
}
|
||||
|
||||
.dialog-footer,
|
||||
.el-dialog__footer {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.el-dialog__footer .el-button {
|
||||
min-width: 88px;
|
||||
min-height: 32px;
|
||||
border-radius: 4px;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.el-dialog__footer .el-button + .el-button {
|
||||
margin-left: 12px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -379,7 +379,11 @@ export default {
|
||||
type: 'warning',
|
||||
}).then(() => {
|
||||
NProgress.start();
|
||||
exportBlob('/blade-transport/etc-record/export-etc-record', this.buildExportParams())
|
||||
exportBlob(
|
||||
'/blade-transport/etc-record/export-etc-record',
|
||||
this.buildExportParams(),
|
||||
{ feedback: true }
|
||||
)
|
||||
.then(res => {
|
||||
downloadXls(res.data, `ETC记录${this.$dayjs().format('YYYY-MM-DD HH:mm:ss')}.xlsx`);
|
||||
})
|
||||
@@ -397,7 +401,8 @@ export default {
|
||||
},
|
||||
handleTemplate() {
|
||||
exportBlob(
|
||||
`/blade-transport/etc-record/export-template?${this.website.tokenHeader}=${getToken()}`
|
||||
`/blade-transport/etc-record/export-template?${this.website.tokenHeader}=${getToken()}`,
|
||||
{ feedback: true }
|
||||
).then(res => {
|
||||
downloadXls(res.data, 'ETC记录模板.xlsx');
|
||||
});
|
||||
|
||||
@@ -441,7 +441,8 @@ export default {
|
||||
NProgress.start();
|
||||
exportBlob(
|
||||
'/blade-transport/insurance-record/export-insurance-record',
|
||||
this.buildExportParams()
|
||||
this.buildExportParams(),
|
||||
{ feedback: true }
|
||||
)
|
||||
.then(res => {
|
||||
downloadXls(res.data, `保险记录${this.$dayjs().format('YYYY-MM-DD HH:mm:ss')}.xlsx`);
|
||||
@@ -462,7 +463,8 @@ export default {
|
||||
exportBlob(
|
||||
`/blade-transport/insurance-record/export-template?${
|
||||
this.website.tokenHeader
|
||||
}=${getToken()}`
|
||||
}=${getToken()}`,
|
||||
{ feedback: true }
|
||||
).then(res => {
|
||||
downloadXls(res.data, '保险记录模板.xlsx');
|
||||
});
|
||||
|
||||
@@ -692,7 +692,8 @@ export default {
|
||||
NProgress.start();
|
||||
exportBlob(
|
||||
'/blade-transport/maintenance-plan/export-maintenance-plan',
|
||||
this.buildExportParams()
|
||||
this.buildExportParams(),
|
||||
{ feedback: true }
|
||||
)
|
||||
.then(res => {
|
||||
downloadXls(res.data, `保养记录${this.$dayjs().format('YYYY-MM-DD HH:mm:ss')}.xlsx`);
|
||||
@@ -716,7 +717,8 @@ export default {
|
||||
exportBlob(
|
||||
`/blade-transport/maintenance-plan/export-template?${
|
||||
this.website.tokenHeader
|
||||
}=${getToken()}`
|
||||
}=${getToken()}`,
|
||||
{ feedback: true }
|
||||
).then(res => {
|
||||
downloadXls(res.data, '保养记录模板.xlsx');
|
||||
});
|
||||
|
||||
@@ -677,7 +677,8 @@ export default {
|
||||
NProgress.start();
|
||||
exportBlob(
|
||||
'/blade-transport/maintenance-record/export-maintenance-record',
|
||||
this.buildExportParams()
|
||||
this.buildExportParams(),
|
||||
{ feedback: true }
|
||||
)
|
||||
.then(res => {
|
||||
downloadXls(res.data, `维修记录${this.$dayjs().format('YYYY-MM-DD HH:mm:ss')}.xlsx`);
|
||||
@@ -701,7 +702,8 @@ export default {
|
||||
exportBlob(
|
||||
`/blade-transport/maintenance-record/export-template?${
|
||||
this.website.tokenHeader
|
||||
}=${getToken()}`
|
||||
}=${getToken()}`,
|
||||
{ feedback: true }
|
||||
).then(res => {
|
||||
downloadXls(res.data, '维修记录模板.xlsx');
|
||||
});
|
||||
|
||||
@@ -522,7 +522,8 @@ export default {
|
||||
NProgress.start();
|
||||
exportBlob(
|
||||
'/blade-transport/mileage-record/export-mileage-record',
|
||||
this.buildExportParams()
|
||||
this.buildExportParams(),
|
||||
{ feedback: true }
|
||||
)
|
||||
.then(res => {
|
||||
downloadXls(res.data, `里程记录${this.$dayjs().format('YYYY-MM-DD HH:mm:ss')}.xlsx`);
|
||||
@@ -544,7 +545,8 @@ export default {
|
||||
},
|
||||
handleTemplate() {
|
||||
exportBlob(
|
||||
`/blade-transport/mileage-record/export-template?${this.website.tokenHeader}=${getToken()}`
|
||||
`/blade-transport/mileage-record/export-template?${this.website.tokenHeader}=${getToken()}`,
|
||||
{ feedback: true }
|
||||
).then(res => {
|
||||
downloadXls(res.data, '里程记录模板.xlsx');
|
||||
});
|
||||
|
||||
@@ -434,7 +434,8 @@ export default {
|
||||
NProgress.start();
|
||||
exportBlob(
|
||||
'/blade-transport/oil-electric-record/export-oil-electric-record',
|
||||
this.buildExportParams()
|
||||
this.buildExportParams(),
|
||||
{ feedback: true }
|
||||
)
|
||||
.then(res => {
|
||||
downloadXls(res.data, `油电记录${this.$dayjs().format('YYYY-MM-DD HH:mm:ss')}.xlsx`);
|
||||
@@ -455,7 +456,8 @@ export default {
|
||||
exportBlob(
|
||||
`/blade-transport/oil-electric-record/export-template?${
|
||||
this.website.tokenHeader
|
||||
}=${getToken()}`
|
||||
}=${getToken()}`,
|
||||
{ feedback: true }
|
||||
).then(res => {
|
||||
downloadXls(res.data, '油电记录模板.xlsx');
|
||||
});
|
||||
|
||||
@@ -425,7 +425,8 @@ export default {
|
||||
NProgress.start();
|
||||
exportBlob(
|
||||
'/blade-transport/other-expense-record/export-other-expense-record',
|
||||
this.buildExportParams()
|
||||
this.buildExportParams(),
|
||||
{ feedback: true }
|
||||
)
|
||||
.then(res => {
|
||||
downloadXls(
|
||||
@@ -449,7 +450,8 @@ export default {
|
||||
exportBlob(
|
||||
`/blade-transport/other-expense-record/export-template?${
|
||||
this.website.tokenHeader
|
||||
}=${getToken()}`
|
||||
}=${getToken()}`,
|
||||
{ feedback: true }
|
||||
).then(res => {
|
||||
downloadXls(res.data, '其他费用记录模板.xlsx');
|
||||
});
|
||||
|
||||
@@ -379,7 +379,8 @@ export default {
|
||||
NProgress.start();
|
||||
exportBlob(
|
||||
'/blade-transport/tire-replacement-record/export-tire-replacement-record',
|
||||
this.buildExportParams()
|
||||
this.buildExportParams(),
|
||||
{ feedback: true }
|
||||
)
|
||||
.then(res => {
|
||||
downloadXls(res.data, `换胎记录${this.$dayjs().format('YYYY-MM-DD HH:mm:ss')}.xlsx`);
|
||||
@@ -403,7 +404,8 @@ export default {
|
||||
exportBlob(
|
||||
`/blade-transport/tire-replacement-record/export-template?${
|
||||
this.website.tokenHeader
|
||||
}=${getToken()}`
|
||||
}=${getToken()}`,
|
||||
{ feedback: true }
|
||||
).then(res => {
|
||||
downloadXls(res.data, '换胎记录模板.xlsx');
|
||||
});
|
||||
|
||||
@@ -397,7 +397,8 @@ export default {
|
||||
NProgress.start();
|
||||
exportBlob(
|
||||
'/blade-transport/transport-change-record/export-transport-change-record',
|
||||
this.buildExportParams()
|
||||
this.buildExportParams(),
|
||||
{ feedback: true }
|
||||
)
|
||||
.then(res => {
|
||||
downloadXls(res.data, `变更记录${this.$dayjs().format('YYYY-MM-DD HH:mm:ss')}.xlsx`);
|
||||
@@ -421,7 +422,8 @@ export default {
|
||||
exportBlob(
|
||||
`/blade-transport/transport-change-record/export-template?${
|
||||
this.website.tokenHeader
|
||||
}=${getToken()}`
|
||||
}=${getToken()}`,
|
||||
{ feedback: true }
|
||||
).then(res => {
|
||||
downloadXls(res.data, '变更记录模板.xlsx');
|
||||
});
|
||||
|
||||
@@ -505,7 +505,8 @@ export default {
|
||||
NProgress.start();
|
||||
exportBlob(
|
||||
'/blade-transport/violation-record/export-violation-record',
|
||||
this.buildExportParams()
|
||||
this.buildExportParams(),
|
||||
{ feedback: true }
|
||||
)
|
||||
.then(res => {
|
||||
downloadXls(res.data, `违章记录${this.$dayjs().format('YYYY-MM-DD HH:mm:ss')}.xlsx`);
|
||||
@@ -529,7 +530,8 @@ export default {
|
||||
exportBlob(
|
||||
`/blade-transport/violation-record/export-template?${
|
||||
this.website.tokenHeader
|
||||
}=${getToken()}`
|
||||
}=${getToken()}`,
|
||||
{ feedback: true }
|
||||
).then(res => {
|
||||
downloadXls(res.data, '违章记录模板.xlsx');
|
||||
});
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-download"
|
||||
v-if="permission.work_claim_sign"
|
||||
@click.stop="handleClaim(scope.row)"
|
||||
>签收
|
||||
@@ -26,7 +25,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-view"
|
||||
v-if="permission.work_claim_detail"
|
||||
@click.stop="handleDetail(scope.row)"
|
||||
>详情
|
||||
@@ -34,7 +32,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-search"
|
||||
v-if="permission.work_claim_follow"
|
||||
@click.stop="handleImage(scope.row, scope.index)"
|
||||
>流程图
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-view"
|
||||
v-if="permission.work_done_detail"
|
||||
@click.stop="handleDetail(scope.row)"
|
||||
>详情
|
||||
@@ -27,7 +26,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-search"
|
||||
v-if="permission.work_done_follow"
|
||||
@click.stop="handleImage(scope.row, scope.index)"
|
||||
>流程图
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-view"
|
||||
v-if="permission.work_send_detail"
|
||||
@click.stop="handleDetail(scope.row)"
|
||||
>详情
|
||||
@@ -27,7 +26,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-search"
|
||||
v-if="permission.work_send_follow"
|
||||
@click.stop="handleImage(scope.row, scope.index)"
|
||||
>流程图
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-video-play"
|
||||
v-if="permission.work_start_flow"
|
||||
@click.stop="handleStart(scope.row)"
|
||||
>发起
|
||||
@@ -33,7 +32,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-search"
|
||||
v-if="permission.work_start_image"
|
||||
@click.stop="handleImage(scope.row, scope.index)"
|
||||
>流程图
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-video-play"
|
||||
v-if="permission.work_todo_handle"
|
||||
@click.stop="handleWork(scope.row)"
|
||||
>处理
|
||||
@@ -26,7 +25,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-view"
|
||||
v-if="permission.work_todo_detail"
|
||||
@click.stop="handleDetail(scope.row)"
|
||||
>详情
|
||||
@@ -34,7 +32,6 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
text
|
||||
icon="el-icon-search"
|
||||
v-if="permission.work_todo_follow"
|
||||
@click.stop="handleImage(scope.row, scope.index)"
|
||||
>流程图
|
||||
|
||||
@@ -48,14 +48,25 @@ export default ({
|
||||
define: {
|
||||
__VUE_I18N_FULL_INSTALL__: true,
|
||||
__VUE_I18N_LEGACY_API__: true,
|
||||
__INTLIFY_PROD_DEVTOOLS__: false
|
||||
__INTLIFY_PROD_DEVTOOLS__: false,
|
||||
},
|
||||
// server: {
|
||||
// port: 2888,
|
||||
// proxy: {
|
||||
// '/api': {
|
||||
// target: 'http://172.16.203.228:8000',
|
||||
// changeOrigin: true,
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
server: {
|
||||
port: 2888,
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://172.16.203.228:8000',
|
||||
target: 'http://localhost',
|
||||
//target: 'https://saber3.bladex.cn/api',
|
||||
changeOrigin: true,
|
||||
rewrite: path => path.replace(/^\/api/, ''),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user