✨ 列表导出补齐创建人创建时间,并修复组织类型提交
多模块列表与导出展示创建人、创建时间;组织类型强制提交数字编码,避免中文 dictKey 反序列化失败。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -204,7 +204,7 @@ import { exportBlob } from '@/api/common';
|
||||
import { getDeptTree } from '@/api/system/dept';
|
||||
import { config, excelOption, formatCargoValue, option } from '@/option/business/common-cargo';
|
||||
import { getDictionary } from '@/api/system/dictbiz';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { getToken, isAdministrator } from '@/utils/auth';
|
||||
import { openImportDialog } from '@/utils/import-excel';
|
||||
import { downloadXls } from '@/utils/util';
|
||||
import { mapGetters } from 'vuex';
|
||||
@@ -250,10 +250,7 @@ export default {
|
||||
};
|
||||
},
|
||||
isAdmin() {
|
||||
const authority = this.userInfo && this.userInfo.authority;
|
||||
return Array.isArray(authority)
|
||||
? authority.includes('admin')
|
||||
: String(authority || '').includes('admin');
|
||||
return isAdministrator(this.userInfo);
|
||||
},
|
||||
ids() {
|
||||
return this.selectionList.map(item => item.id).join(',');
|
||||
|
||||
@@ -321,7 +321,7 @@ import { exportBlob } from '@/api/common';
|
||||
import { getDeptTree } from '@/api/system/dept';
|
||||
import { addressTypeOptions } from '@/option/base/common-address';
|
||||
import { config, excelOption, option } from '@/option/business/common-route';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { getToken, isAdministrator } from '@/utils/auth';
|
||||
import { openImportDialog } from '@/utils/import-excel';
|
||||
import { normalizeMapSearchResults, searchAmapPlaceText } from '@/utils/map-search';
|
||||
import { downloadXls } from '@/utils/util';
|
||||
@@ -390,10 +390,7 @@ export default {
|
||||
};
|
||||
},
|
||||
isAdmin() {
|
||||
const authority = this.userInfo && this.userInfo.authority;
|
||||
return Array.isArray(authority)
|
||||
? authority.includes('admin')
|
||||
: String(authority || '').includes('admin');
|
||||
return isAdministrator(this.userInfo);
|
||||
},
|
||||
ids() {
|
||||
return this.selectionList.map(item => item.id).join(',');
|
||||
|
||||
@@ -5241,7 +5241,7 @@ import { getDictionary as getSystemDictionary } from '@/api/system/dict';
|
||||
import { addressTypeOptions } from '@/option/base/common-address';
|
||||
import { packageOptions } from '@/option/business/common';
|
||||
import { formatUpdateUserName } from '@/utils/audit';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { getToken, isAdministrator } from '@/utils/auth';
|
||||
import { openImportDialog } from '@/utils/import-excel';
|
||||
import { normalizeMapSearchResults, searchAmapPlaceText } from '@/utils/map-search';
|
||||
import { applyTableMenuWidth } from '@/utils/table-menu';
|
||||
@@ -6348,10 +6348,7 @@ export default {
|
||||
return this.currencyRemark(currency);
|
||||
},
|
||||
isAdmin() {
|
||||
const authority = this.userInfo && this.userInfo.authority;
|
||||
return Array.isArray(authority)
|
||||
? authority.includes('admin')
|
||||
: String(authority || '').includes('admin');
|
||||
return isAdministrator(this.userInfo);
|
||||
},
|
||||
canViewAllDept() {
|
||||
return this.isAdmin;
|
||||
|
||||
@@ -1115,6 +1115,7 @@ import '@open-file-viewer/core/style.css';
|
||||
import pdfWorkerSrc from 'pdfjs-dist/build/pdf.worker.mjs?url';
|
||||
import { h, resolveComponent } from 'vue';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { isAdministrator } from '@/utils/auth';
|
||||
|
||||
const AMAP_KEY = '653b7cf105ad7fb8ec9b2f5198ade315';
|
||||
const AMAP_SECURITY_CODE = '5aab65c632e48ebae0d0e28f5b28e21a';
|
||||
@@ -1361,7 +1362,7 @@ export default {
|
||||
},
|
||||
isAdmin() {
|
||||
return (
|
||||
String(this.userInfo?.authority || '').includes('admin') ||
|
||||
isAdministrator(this.userInfo) ||
|
||||
this.userInfo?.authority?.includes?.('admin')
|
||||
);
|
||||
},
|
||||
|
||||
@@ -2740,7 +2740,7 @@ import { getDictionary as getSystemDictionary } from '@/api/system/dict';
|
||||
import { addressTypeOptions } from '@/option/base/common-address';
|
||||
import { packageOptions } from '@/option/business/common';
|
||||
import { formatUpdateUserName } from '@/utils/audit';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { getToken, isAdministrator } from '@/utils/auth';
|
||||
import { normalizeMapSearchResults, searchAmapPlaceText } from '@/utils/map-search';
|
||||
import { applyTableMenuWidth } from '@/utils/table-menu';
|
||||
import { downloadFileByUrl, downloadXls } from '@/utils/util';
|
||||
@@ -3610,10 +3610,7 @@ export default {
|
||||
return this.currencyRemark(value);
|
||||
},
|
||||
isAdmin() {
|
||||
const authority = this.userInfo && this.userInfo.authority;
|
||||
return Array.isArray(authority)
|
||||
? authority.includes('admin')
|
||||
: String(authority || '').includes('admin');
|
||||
return isAdministrator(this.userInfo);
|
||||
},
|
||||
canCreate() {
|
||||
return this.hasPermission(`${this.config.permission}_add`);
|
||||
|
||||
@@ -3097,7 +3097,7 @@ import { getDictionary as getSystemDictionary } from '@/api/system/dict';
|
||||
import { addressTypeOptions } from '@/option/base/common-address';
|
||||
import { packageOptions } from '@/option/business/common';
|
||||
import { formatUpdateUserName } from '@/utils/audit';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { getToken, isAdministrator } from '@/utils/auth';
|
||||
import { openImportDialog } from '@/utils/import-excel';
|
||||
import { normalizeMapSearchResults, searchAmapPlaceText } from '@/utils/map-search';
|
||||
import { applyTableMenuWidth } from '@/utils/table-menu';
|
||||
@@ -3837,10 +3837,7 @@ export default {
|
||||
return this.currencyRemark(currency);
|
||||
},
|
||||
isAdmin() {
|
||||
const authority = this.userInfo && this.userInfo.authority;
|
||||
return Array.isArray(authority)
|
||||
? authority.includes('admin')
|
||||
: String(authority || '').includes('admin');
|
||||
return isAdministrator(this.userInfo);
|
||||
},
|
||||
canViewAllDept() {
|
||||
return this.isAdmin;
|
||||
|
||||
@@ -1017,7 +1017,7 @@ import { getDeptTree } from '@/api/system/dept';
|
||||
import { getDictionary as getSystemDictionary } from '@/api/system/dict';
|
||||
import { getDictionary as getBizDictionary } from '@/api/system/dictbiz';
|
||||
import { config, option } from '@/option/business/contract-manage';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { getToken, isAdministrator } from '@/utils/auth';
|
||||
import { downloadFileByUrl, downloadXls } from '@/utils/util';
|
||||
import { submitMkApprovalFlow } from '@/utils/mk-approval';
|
||||
import BillingPlanEditor from './components/billing-plan-editor.vue';
|
||||
@@ -1312,10 +1312,7 @@ export default {
|
||||
return { addBtn: this.canCreate };
|
||||
},
|
||||
isAdmin() {
|
||||
const authority = this.userInfo?.authority;
|
||||
return Array.isArray(authority)
|
||||
? authority.includes('admin')
|
||||
: String(authority || '').includes('admin');
|
||||
return isAdministrator(this.userInfo);
|
||||
},
|
||||
canCreate() {
|
||||
return this.hasPermission(`${this.config.permission}_add`);
|
||||
|
||||
@@ -345,6 +345,12 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数据来源" prop="dataSource" min-width="130" show-overflow-tooltip />
|
||||
<el-table-column
|
||||
label="创建人"
|
||||
prop="createUserName"
|
||||
min-width="120"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
prop="createTime"
|
||||
|
||||
@@ -70,6 +70,8 @@
|
||||
<p class="project-name">{{ row.projectName || '-' }}</p>
|
||||
<p>{{ timeRange(row) }}</p>
|
||||
<p>{{ goodsSummary(row) }}</p>
|
||||
<p>创建人:{{ row.createUserName || '-' }}</p>
|
||||
<p>创建时间:{{ row.createTime || '-' }}</p>
|
||||
</section>
|
||||
<section class="route-progress">
|
||||
<div class="route-track">
|
||||
|
||||
@@ -416,7 +416,7 @@ import { getList as getProjectList } from '@/api/business/project-apply';
|
||||
import { getDeptTree } from '@/api/system/dept';
|
||||
import { exportBlob } from '@/api/common';
|
||||
import { config, option } from '@/option/business/process-config';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { getToken, isAdministrator } from '@/utils/auth';
|
||||
import { downloadXls } from '@/utils/util';
|
||||
import { mapGetters } from 'vuex';
|
||||
import NProgress from 'nprogress';
|
||||
@@ -524,10 +524,7 @@ export default {
|
||||
};
|
||||
},
|
||||
isAdmin() {
|
||||
const authority = this.userInfo && this.userInfo.authority;
|
||||
return Array.isArray(authority)
|
||||
? authority.includes('admin')
|
||||
: String(authority || '').includes('admin');
|
||||
return isAdministrator(this.userInfo);
|
||||
},
|
||||
ids() {
|
||||
return this.selectionList.map(item => item.id).join(',');
|
||||
|
||||
@@ -911,7 +911,7 @@ import { getDeptTree, getPlatformCompanySelect } from '@/api/system/dept';
|
||||
import { getDictionary as getSystemDictionary } from '@/api/system/dict';
|
||||
import { getDictionary as getBizDictionary } from '@/api/system/dictbiz';
|
||||
import { getList as getUserList } from '@/api/system/user';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { getToken, isAdministrator } from '@/utils/auth';
|
||||
import { downloadFileByUrl, downloadXls } from '@/utils/util';
|
||||
import { getMKApprovalUrl } from '@/api/system/business-process';
|
||||
import { loadMkEnabled, submitMkApprovalFlow } from '@/utils/mk-approval';
|
||||
@@ -1286,10 +1286,7 @@ export default {
|
||||
};
|
||||
},
|
||||
isAdmin() {
|
||||
const authority = this.userInfo && this.userInfo.authority;
|
||||
return Array.isArray(authority)
|
||||
? authority.includes('admin')
|
||||
: String(authority || '').includes('admin');
|
||||
return isAdministrator(this.userInfo);
|
||||
},
|
||||
canViewAllDept() {
|
||||
return this.isAdmin;
|
||||
|
||||
@@ -309,7 +309,7 @@ import {
|
||||
getList as getProjectList,
|
||||
} from '@/api/business/project-apply';
|
||||
import { config, option } from '@/option/business/temporary-credit-limit';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { getToken, isAdministrator } from '@/utils/auth';
|
||||
import { downloadFileByUrl, downloadXls } from '@/utils/util';
|
||||
import { ElImageViewer } from 'element-plus';
|
||||
import { OpenFileViewer } from '@open-file-viewer/vue';
|
||||
@@ -423,10 +423,7 @@ export default {
|
||||
return String(width);
|
||||
},
|
||||
isAdmin() {
|
||||
const authority = this.userInfo?.authority;
|
||||
return Array.isArray(authority)
|
||||
? authority.includes('admin')
|
||||
: String(authority || '').includes('admin');
|
||||
return isAdministrator(this.userInfo);
|
||||
},
|
||||
canCreate() {
|
||||
return this.hasPermission(`${this.config.permission}_add`);
|
||||
|
||||
@@ -45,6 +45,7 @@ import { useStore } from 'vuex';
|
||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
||||
import md5 from 'js-md5';
|
||||
import * as api from '@/api/business/voucher-manage';
|
||||
import { isAdministrator } from '@/utils/auth';
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
@@ -52,9 +53,7 @@ const store = useStore();
|
||||
const voucherId = route.query.id;
|
||||
const isSuperAdmin = computed(() => {
|
||||
const authority = store.getters.userInfo?.authority;
|
||||
return Array.isArray(authority)
|
||||
? authority.includes('admin')
|
||||
: String(authority || '').includes('admin');
|
||||
return isAdministrator({ authority });
|
||||
});
|
||||
const loading = ref(false), rows = ref([]), voucher = ref({ voucherBatchNo: route.query.batchNo || '' });
|
||||
const page = reactive({ current: 1, size: 10, total: 0 });
|
||||
|
||||
@@ -101,7 +101,8 @@
|
||||
prop="relatedWaybillCount"
|
||||
label="凭证已关联数量"
|
||||
width="125"
|
||||
/><el-table-column prop="unRelatedWaybillCount" label="凭证未关联数量" width="125" />
|
||||
/> <el-table-column prop="unRelatedWaybillCount" label="凭证未关联数量" width="125" />
|
||||
<el-table-column prop="createUserName" label="创建人" min-width="120" />
|
||||
<el-table-column prop="createTime" label="创建时间" min-width="170" />
|
||||
<el-table-column
|
||||
prop="auditStatus"
|
||||
@@ -504,6 +505,7 @@
|
||||
import { computed, reactive, ref, watch, onMounted } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { useStore } from 'vuex';
|
||||
import { isAdministrator as checkAdministrator } from '@/utils/auth';
|
||||
import md5 from 'js-md5';
|
||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
||||
import { WarnTriangleFilled } from '@element-plus/icons-vue';
|
||||
@@ -517,7 +519,7 @@ const store = useStore();
|
||||
// 权限判断
|
||||
const permission = computed(() => store.getters.permission);
|
||||
const userInfo = computed(() => store.getters.userInfo);
|
||||
const isAdmin = computed(() => userInfo.value?.authority?.includes('admin'));
|
||||
const isAdmin = computed(() => checkAdministrator(userInfo.value));
|
||||
const hasPermission = code => {
|
||||
if (isAdmin.value) return true;
|
||||
return permission.value?.[code] === true;
|
||||
|
||||
Reference in New Issue
Block a user