This commit is contained in:
zxx 2023-11-11 16:50:10 +08:00
parent f00bb5f4a4
commit a986369529
66 changed files with 449 additions and 445 deletions

View File

@ -161,7 +161,7 @@ export default {
//
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
{ slots: { default: 'logo' }, width: 120, sortable: true, title: '公司Logo', showHeaderOverflow: true }, // logo
{ field: 'title', sortable: true, title: '公司名称', width: 250 }, //
// auth_stop_date

View File

@ -345,7 +345,7 @@ export default {
//
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
{ title: '操作', slots: { default: 'op' }, width: 120 },

View File

@ -106,7 +106,7 @@ export default {
//
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
{ title: '操作', slots: { default: 'op' }, width: 120 },

View File

@ -15,8 +15,9 @@
</a>
</div>
<div class="treepanel-content">
<a-tree :replaceFields="{children:'mes_enum', title:'title', key:'key'}" v-if="!treeLoading" show-line :tree-data="treeData" :default-expand-all="true" :block-node="true"
@select="onTreeSelect" :default-selected-keys="selectedKeys">
<a-tree :replaceFields="{ children: 'mes_enum', title: 'title', key: 'key' }" v-if="!treeLoading" show-line
:tree-data="treeData" :default-expand-all="true" :block-node="true" @select="onTreeSelect"
:default-selected-keys="selectedKeys">
<a-icon slot="switcherIcon" type="down" />
</a-tree>
</div>
@ -29,7 +30,7 @@
</div>
<vxe-table border show-overflow keep-source ref="xTable" :height="tableHeight" :data="detailsData"
:export-config="{}" :edit-config="{ trigger: 'click', mode: 'cell', icon: 'vxe-icon-edit', showStatus: false }">
<vxe-column width="80">
<vxe-column width="100">
<template #default="{ row }">
<div class="oplinks">
<a @click.stop="pageAdd(row)" title="新增">
@ -83,23 +84,23 @@ export default {
//
var pageData = {
modelName: "",
modelName: "", //
actions: {
treedata: `${BASE_URL.BASE_URL}/MesEnum/v1/mes/enum/list`,
delete: `${BASE_URL.BASE_URL}/MesEnum/v1/mes/enum/batchDelete`,
listdata: `${BASE_URL.BASE_URL}/MesEnum/v1/mes/enum/value/list`,
save: `${BASE_URL.BASE_URL}/MesEnum/v1/mes/enum/value/batchHandle`,
treedata: `${BASE_URL.BASE_URL}/MesEnum/v1/mes/enum/list`, //
delete: `${BASE_URL.BASE_URL}/MesEnum/v1/mes/enum/batchDelete`, //
listdata: `${BASE_URL.BASE_URL}/MesEnum/v1/mes/enum/value/list`, //
save: `${BASE_URL.BASE_URL}/MesEnum/v1/mes/enum/value/batchHandle`, //
},
tipTimes: 0,
detailsData: [
tipTimes: 0, //
detailsData: [ //
],
sourceDetailsData :[
sourceDetailsData: [ //
],
treeData: [],
treeLoading: true,
deletedDetailsData: [
treeData: [], //
treeLoading: true, //
deletedDetailsData: [ //
],
selectedKeys: [],
@ -113,10 +114,10 @@ export default {
},
created() {
this.$nextTick(() => {
this.tableHeight = this.$mk.getWindowSize().height - this.$mk.getOffsetTop(this.$refs.xTable.$el) - 40;
this.treeInit();
this.$nextTick(() => { //
//
this.tableHeight = this.$mk.getWindowSize().height - this.$mk.getOffsetTop(this.$refs.xTable.$el) - 40; //
this.treeInit(); //
});
@ -126,9 +127,9 @@ export default {
methods: {
treeInit() {
this.treeLoading = true;
this.$mk.post({
treeInit() { //
this.treeLoading = true; //
this.$mk.post({ //
url: this.actions.treedata,
loading: "加载中...",
data: {
@ -146,12 +147,13 @@ export default {
let treedata = {
title: "全部",
titleSys: "系统预置",
key: "root"
};
treedata[childrenFieldName] = r.data.MesEnum;
treedata[childrenFieldName] = r.data.MesEnum; //
function formatTreedata(d) {
function formatTreedata(d) { //
if (d.id) {
d.key = d.id.toString();
} else {
@ -171,7 +173,8 @@ export default {
});
},
treeAdd() {
treeAdd() { //
this.$mk.dialog.open({
page: () => import("./treeEdit"),
title: "新增-枚举分类",
@ -181,7 +184,8 @@ export default {
}
})
},
treeEdit() {
treeEdit() { //
if (!this.selectedKey || this.selectedKey == "root") {
this.$mk.error("请先选择枚举分类");
return;
@ -198,7 +202,10 @@ export default {
}
})
},
treeDelete() {
treeDelete() { //
if (!this.selectedKey || this.selectedKey == "root") {
this.$mk.error("请先选择枚举分类");
return;
@ -231,7 +238,7 @@ export default {
}
});
},
getDataId() {
getDataId() { // id
let dataId = this.dataId;
if (this.$route.params.id) {
@ -240,14 +247,13 @@ export default {
return dataId;
},
onTreeSelect(selectedKeys) {
onTreeSelect(selectedKeys) { //
if (selectedKeys && selectedKeys[0]) {
this.selectedKey = selectedKeys[0];
this.loadData(selectedKeys[0]);
}
},
findTreeNode(key) {
findTreeNode(key) { //
var find = (items) => {
for (let i = 0; i < items.length; i++) {
if (items[i].key == key) {
@ -263,7 +269,7 @@ export default {
};
return find(this.treeData);
},
getAllChildrenIds(items) {
getAllChildrenIds(items) { // id
let ids = [];
let eachItems = (arr) => {
arr.forEach(item => {
@ -279,13 +285,13 @@ export default {
eachItems(items);
return ids;
},
reloadData() {
reloadData() { //
if (this.selectedKey) {
this.loadData(this.selectedKey);
}
},
loadData(key) {
loadData(key) { //
let postLoad = (id) => {
this.$mk.post({
@ -334,7 +340,7 @@ export default {
},
findSourceInfo(idStr){
findSourceInfo(idStr) { //
for (var i = 0; i < this.sourceDetailsData.length; i++) {
let o = this.sourceDetailsData[i];
if (o.id.toString() == idStr) {
@ -342,7 +348,7 @@ export default {
}
}
},
ok() {
ok() { //
let save = () => {
@ -405,10 +411,10 @@ export default {
back() {
},
cancel() {
cancel() { //
this.back();
},
pageAdd(row) {
pageAdd(row) { //
const $table = this.$refs.xTable
const record = {
@ -424,7 +430,7 @@ export default {
},
pageDelete(row) {
pageDelete(row) { //
const $table = this.$refs.xTable;
if (row.id) {
this.deletedDetailsData.push(row.id)

View File

@ -56,6 +56,11 @@ export default {
items: [
{ field: 'name', title: '名称', span: 24, itemRender: { name: '$input', props: { placeholder: '请输入名称' } } },
// type 10
{ field: 'type', title: '是否系统内置', span: 24, itemRender: { name: '$switch', props: { openLabel: '是', openValue: 1, closeValue: 0, closeLabel: '否' } } },
// sys_name
{ field: 'sys_name', title: '系统内置名称', span: 24, itemRender: { name: '$input', props: { placeholder: '请输入系统内置名称' } } },
{ field: 'code', title: '编号', span: 24, itemRender: { name: '$input', props: { placeholder: '请输入编号' } } },
{ field: 'enum_id', title: '上级分类', span: 24, itemRender: { name: '$select', props: { placeholder: '请输入上级分类', options: [] } } }
]
@ -92,6 +97,7 @@ export default {
//
methods: {
//
loadEmuns() {
this.$mk.post({
url: this.actions.list,
@ -129,6 +135,7 @@ export default {
loadData() {
},
//
ok() {
let save = () => {

View File

@ -3,7 +3,7 @@
<a-tabs v-model="tabKey" hide-add>
<a-tab-pane key="1" tab="基础信息">
<!-- 基础信息 Start -->
<vxe-form :data="options.formOptions.data" ref="xForm" :title-width="options.formOptions.titleWidth"
:title-align="options.formOptions.titleAlign" :rules="options.formOptions.rules"
:items="options.formOptions.items" titleColon>
@ -22,17 +22,18 @@
</vxe-pulldown>
</template>
</vxe-form>
<!-- 基础信息 End -->
</a-tab-pane>
<a-tab-pane key="2" tab="料品属性">
<a-tab-pane key="2" tab="料品属性">
<!-- 料品属性 Start -->
<vxe-form :data="options.formOptions2.data" ref="xForm2" :title-width="options.formOptions2.titleWidth"
:title-align="options.formOptions2.titleAlign" :rules="options.formOptions2.rules"
:items="options.formOptions2.items" titleColon>
</vxe-form>
<!-- 料品属性 End -->
</a-tab-pane>
</a-tabs>
@ -65,16 +66,16 @@ export default {
data() {
let pageData = {
actions: {
list: `${BASE_URL.BASE_URL}/MesMaterials/v1/mes/materials/sort/list`,
actions: { // Api
list: `${BASE_URL.BASE_URL}/MesMaterials/v1/mes/materials/sort/list`, //
},
tabKey: '1',
sortName: '',
custom_attribute_value: [],
attributes: [],
gridParentOptions: {
height: 400,
id: 'datagrid_router_parent_1',
tabKey: '1', // tab
sortName: '', //
custom_attribute_value: [], //
attributes: [], //
gridParentOptions: { //
height: 400, //
id: 'datagrid_router_parent_1', // ID
proxyConfig: {
sort: true, // query
@ -86,7 +87,7 @@ export default {
// Promise
ajax: {
// queryreload
query: (options) => {
query: (options) => { //
const { page, sorts } = options;
var params = {};
params.page = page.currentPage;
@ -101,25 +102,25 @@ export default {
})
});
}
return this.loadParentGrid({ params });
return this.loadParentGrid({ params }); //
}
}
},
sortConfig: {
sortConfig: { //
},
treeConfig: {
transform: true,
expandAll: true,
rowField: 'id',
parentField: 'parent_id'
treeConfig: { //
transform: true, //
expandAll: true, //
rowField: 'id', //
parentField: 'parent_id' //
},
checkboxConfig: {
reserve: true,
highlight: true
checkboxConfig: { //
reserve: true, //
highlight: true //
},
columns: [
{ field: 'name', sortable: true, title: '分类名', showHeaderOverflow: true, treeNode: true },
{ field: 'code', sortable: true, title: '编号', showHeaderOverflow: true }
{ field: 'name', sortable: true, title: '分类名', showHeaderOverflow: true, treeNode: true }, //
{ field: 'code', sortable: true, title: '编号', showHeaderOverflow: true } //
]
},
options: {}
@ -130,7 +131,7 @@ export default {
},
computed: {
desc() {
desc() { //
return this.$t('editPageDesc')
}
},
@ -138,14 +139,14 @@ export default {
created() {
this.optionsInit();
this.dataInit();
this.optionsInit(); //
this.dataInit(); //
},
//
methods: {
//
loadParentGrid({ params }) {
@ -154,6 +155,8 @@ export default {
return this.$mk.getPagedData({ url: this.actions.list, data: params });
},
//
optionsInit() {
//
var pageData = {
@ -167,8 +170,8 @@ export default {
listPageUrl: "/MesMaterials/MesMaterialsList",
uploadDefaultImg: null,
detailDataFieldName: "mes_materials",
uploadDefaultImg: null, //
detailDataFieldName: "mes_materials", //
actions: {
// =============================== Start ===============================
@ -186,7 +189,7 @@ export default {
// =============================== End ===============================
productAttribute: `${BASE_URL.BASE_URL}/MesProductCustomAttribute/v1/get/productAttribute`
productAttribute: `${BASE_URL.BASE_URL}/MesProductCustomAttribute/v1/get/productAttribute` //
},
keyName: 'id',
@ -237,9 +240,9 @@ export default {
actionParams: {
search_rules_enum: [
{
column:"code",
column: "sys_name",
mode: "=",
value:"3"
value: "color"
}
]
},
@ -262,9 +265,9 @@ export default {
actionParams: {
search_rules_enum: [
{
column:"code",
column: "sys_name",
mode: "=",
value:"4"
value: "face"
}
]
},
@ -286,9 +289,9 @@ export default {
actionParams: {
search_rules_enum: [
{
column:"code",
column: "sys_name",
mode: "=",
value:"1"
value: "molding"
}
]
},
@ -312,9 +315,9 @@ export default {
actionParams: {
search_rules_enum: [
{
column:"code",
column: "sys_name",
mode: "=",
value:"2"
value: "production_type"
}
]
},
@ -340,9 +343,9 @@ export default {
actionParams: {
search_rules_enum: [
{
column:"code",
column: "sys_name",
mode: "=",
value:"5"
value: "soil"
}
]
},
@ -412,7 +415,7 @@ export default {
this.options = pageData;
},
//
attributeDataInit() {
this.$mk.post({
url: this.options.actions.productAttribute,
@ -495,6 +498,7 @@ export default {
});
},
//
dataInit() {
@ -549,6 +553,7 @@ export default {
}
},
//
getOldAttributeValue(attribute_id) {
for (let i = 0; i < this.custom_attribute_value.length; i++) {
if (this.custom_attribute_value[i].attribute_id.toString() == attribute_id.toString()) {
@ -558,6 +563,8 @@ export default {
return null;
},
//
getAttributeValue(attribute_id) {
return this.options.formOptions2.data["attr" + attribute_id.toString()];
@ -574,6 +581,8 @@ export default {
}
return dataId;
},
// id
getDataId_BigInt() {
let dataId = this.getDataId();
return this.$mk.toBigInt(dataId);
@ -700,15 +709,22 @@ export default {
this.back();
},
//
pulldownFocusEvent() {
this.$refs.pulldownParent.showPanel()
},
//
pulldownKeyupEvent() {
},
//
pulldownSuffixClick() {
this.$refs.pulldownParent.togglePanel()
},
//
pulldownCellClickEvent({ row }) {
if (row.children && row.children.length) {

View File

@ -100,7 +100,7 @@ export default {
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
{ title: '操作', slots: { default: 'op' }, width: 120 },

View File

@ -332,7 +332,7 @@ export default {
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
{ title: '操作', slots: { default: 'op' }, width: 120 },

View File

@ -291,7 +291,7 @@ export default {
//
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
{ title: '操作', slots: { default: 'op' }, width: 120 },

View File

@ -196,7 +196,7 @@ export default {
//
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
{ title: '操作', slots: { default: 'op' }, width: 120 },

View File

@ -142,7 +142,7 @@ export default {
//
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
{ title: '操作', slots: { default: 'op' }, width: 120 },

View File

@ -148,7 +148,7 @@ export default {
//
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -148,7 +148,7 @@ export default {
//
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -106,7 +106,7 @@ export default {
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -106,7 +106,7 @@ export default {
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -155,27 +155,27 @@ export default {
},
{
title: '布产单', span: 5,
field: 'production_id',
dataRule: {
fromField: "production_id"
},
itemRender: {
name: 'MkFormDataSelector', props: {
params: {
dataType: "object",
valueField: "id",
textField: "code",
columns: [ //
{ field: 'code', title: '编码' } //
],
listdataFieldName: 'MoldProductionOrder',
dataUrl: `${BASE_URL.BASE_URL}/MoldProductionOrder/v1/mold/production/order/list`
}
}
}
},
// {
// title: '', span: 5,
// field: 'production_id',
// dataRule: {
// fromField: "production_id"
// },
// itemRender: {
// name: 'MkFormDataSelector', props: {
// params: {
// dataType: "object",
// valueField: "id",
// textField: "code",
// columns: [ //
// { field: 'code', title: '' } //
// ],
// listdataFieldName: 'MoldProductionOrder',
// dataUrl: `${BASE_URL.BASE_URL}/MoldProductionOrder/v1/mold/production/order/list`
// }
// }
// }
// },
{ field: 'is_send', title: '发料状态', span: 3, itemRender: { name: '$select', props: { options: settings.options_is_send } } },
@ -198,7 +198,7 @@ export default {
id: 'datagrid_1', //
sortConfig: {
defaultSort: {
field: 'complete_time',
field: 'plan_complete_time',
order: 'desc'
},
trigger: 'cell', //
@ -216,11 +216,12 @@ export default {
{ slots: { default: 'column1' }, title: '查看详情', width: 120 },
{ field: 'department_name', title: '部门', sortable: true, width: 140 },
{ field: 'process_name', title: '工序名称', sortable: true, width: 100 },
{ title: '模具图片', slots: { default: 'column4' }, width: 90 },
{ title: '部件图片', slots: { default: 'column4' }, width: 90 },
{ field: 'component_name', title: '部件名称', sortable: true, width: 100 },
{ field: 'production_code', title: '布产单号', sortable: true, width: 100 },
{ field: 'mold_master_name', sortable: true, title: '模具师傅', width: 120 },
{ field: 'engineer_name', sortable: true, title: '工程师傅', width: 120 },
{ field: 'ask_complete_time', formatter: 'formatDate', width: 130, sortable: true, title: '预计完成时间', showHeaderOverflow: true },
{ field: 'plan_complete_time', formatter: 'formatDate', width: 130, sortable: true, title: '预计完成时间', showHeaderOverflow: true },
{ field: 'status', title: '状态', sortable: true, width: 100 },
{ field: 'send_time', formatter: 'formatDate', width: 130, sortable: true, title: '发料日期', showHeaderOverflow: true }, //
@ -264,6 +265,7 @@ export default {
item.department_name = item.department_detail.name;
item.process_name = item.process_detail.name;
item.production_code = item.production_detail.code;
item.component_name = item.component_detail.name;
});
},

View File

@ -232,15 +232,16 @@
<span v-else></span>
</template>
</vxe-column>
<vxe-column field="component_name" title="部件名称" width="110"></vxe-column>
<!-- <vxe-column field="production_id" title="布产单id" width="210"></vxe-column> -->
<vxe-column field="production_code" title="布产单号" width="110"></vxe-column>
<vxe-column field="mold_master_name" align="center" title="模具师傅" width="110"></vxe-column>
<vxe-column field="engineer_name" align="center" title="工程师傅" width="110"></vxe-column>
<vxe-column field="complete_time" align="center" formatter="formatDate" title="预计完成时间"
<vxe-column field="plan_complete_time" align="center" formatter="formatDate" title="预计完成时间"
width="160"></vxe-column>
<vxe-column field="status" title="状态" align="center" width="100"></vxe-column>
<!-- <vxe-column field="is_send" title="发料" width="160"></vxe-column> -->
<vxe-column field="send_time" formatter="formatDate" title="发料日期" width="160"></vxe-column>
<vxe-column field="send_time" align="center" formatter="formatDate" title="发料日期" width="140"></vxe-column>
<vxe-column field="reality_complete_time" formatter="formatDate" title="完工日期" width="160"></vxe-column>
<vxe-column field="remark" title="备注" width="160"></vxe-column>
</vxe-table>
@ -756,6 +757,7 @@ export default {
"company_token": process.env.VUE_APP_COMPANYTOKEN,
"search_rules": search_rules,
"order_bys": [
{ "column": "plan_complete_time", "order": "asc" }
],
"page": 1,
"limit": 200,
@ -772,6 +774,7 @@ export default {
item.department_name = item.department_detail.name
item.production_code = item.production_detail.code
item.process_name = item.process_detail.name
item.component_name = item.component_detail.name;
})
// this.detailDataProgress production_code ""

View File

@ -159,7 +159,7 @@ export default {
{ type: 'checkbox', width: '40' }, //
{ title: '操作', slots: { default: 'op' }, width: 120 },
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -149,7 +149,7 @@ export default {
//
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -149,7 +149,7 @@ export default {
//
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -158,7 +158,7 @@ export default {
columns: [
{ type: 'checkbox', width: '40' }, // +
{ title: '操作', slots: { default: 'op' }, width: 120 },
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -149,7 +149,7 @@ export default {
//
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -149,7 +149,7 @@ export default {
//
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -149,7 +149,7 @@ export default {
//
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -149,7 +149,7 @@ export default {
//
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -159,7 +159,7 @@ export default {
{ type: 'checkbox', width: '40' }, //
{ title: '操作', slots: { default: 'op' }, width: 120 },
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -149,7 +149,7 @@ export default {
//
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -149,7 +149,7 @@ export default {
//
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -159,7 +159,7 @@ export default {
{ type: 'checkbox', width: '40' }, //
{ title: '操作', slots: { default: 'op' }, width: 120 },
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -149,7 +149,7 @@ export default {
//
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -149,7 +149,7 @@ export default {
//
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -149,7 +149,7 @@ export default {
//
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -149,7 +149,7 @@ export default {
//
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -159,7 +159,7 @@ export default {
{ type: 'checkbox', width: '40' }, //
{ title: '操作', slots: { default: 'op' }, width: 120 },
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -149,7 +149,7 @@ export default {
//
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -149,7 +149,7 @@ export default {
//
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -166,7 +166,7 @@ export default {
{ type: 'checkbox', width: '40' }, //
{ title: '操作', slots: { default: 'op' }, width: 120 },
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -149,7 +149,7 @@ export default {
//
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -149,7 +149,7 @@ export default {
//
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -157,7 +157,7 @@ export default {
//
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -149,7 +149,7 @@ export default {
//
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -149,7 +149,7 @@ export default {
//
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -229,7 +229,7 @@ export default {
columns: [
{ type: 'checkbox', width: '40' }, //
{ title: '操作', slots: { default: 'op' }, width: 120 },
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -227,7 +227,7 @@ export default {
//
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -227,7 +227,7 @@ export default {
//
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -149,7 +149,7 @@ export default {
//
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -227,7 +227,7 @@ export default {
//
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -227,7 +227,7 @@ export default {
//
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -227,7 +227,7 @@ export default {
//
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -227,7 +227,7 @@ export default {
//
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -227,7 +227,7 @@ export default {
//
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -149,7 +149,7 @@ export default {
//
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -237,7 +237,7 @@ export default {
//
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -149,7 +149,7 @@ export default {
//
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -237,7 +237,7 @@ export default {
//
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -237,7 +237,7 @@ export default {
//
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -237,7 +237,7 @@ export default {
//
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -237,7 +237,7 @@ export default {
//
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -237,7 +237,7 @@ export default {
//
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -237,7 +237,7 @@ export default {
//
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -149,7 +149,7 @@ export default {
//
columns: [
{ type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, //
{ type: 'seq', width: '40' }, //
// =============================== Start ===============================

View File

@ -39,6 +39,39 @@ const view = {
icon: 'idcard',
component: view.blank
},
exp403: {
authority: '*',
name: 'exp403',
path: '403',
component: () => import('@/pages/base/exception/403')
},
exp404: {
name: 'exp404',
path: '404',
component: () => import('@/pages/base/exception/404')
},
exp500: {
name: 'exp500',
path: '500',
component: () => import('@/pages/base/exception/500')
},
components: {
name: '小组件',
icon: 'appstore-o',
component: view.page
},
taskCard: {
name: '任务卡片',
component: () => import('@/pages/base/components/TaskCard')
},
palette: {
name: '颜色复选框',
component: () => import('@/pages/base/components/Palette')
},
analysis: {
name: '分析页',
component: () => import('@/pages/dashboard/analysis')
@ -133,6 +166,20 @@ const view = {
icon: 'warning',
component: view.blank
},
//================================================================================================================================
// 以上为自动生成的路由,以下为手动添加的路由
//================================================================================================================================
//================================================================================================================================
// 以下为项目的路由
//================================================================================================================================
TouchMesReporting : {
name: '报工',
path: '/touch/mesreporting',
@ -154,92 +201,9 @@ const view = {
component: () => import('@/pages/Middle/Mold/Touch/Reporting')
},
exp403: {
authority: '*',
name: 'exp403',
path: '403',
component: () => import('@/pages/base/exception/403')
},
exp404: {
name: 'exp404',
path: '404',
component: () => import('@/pages/base/exception/404')
},
exp500: {
name: 'exp500',
path: '500',
component: () => import('@/pages/base/exception/500')
},
components: {
name: '小组件',
icon: 'appstore-o',
component: view.page
},
taskCard: {
name: '任务卡片',
component: () => import('@/pages/base/components/TaskCard')
},
palette: {
name: '颜色复选框',
component: () => import('@/pages/base/components/Palette')
},
//================================================================================================================================
// 以上为自动生成的路由,以下为手动添加的路由
//================================================================================================================================
//================================================================================================================================
// 以下为项目的路由
//================================================================================================================================
WorkReport:{
name: '报工管理',
icon: 'idcard',
component: view.page,
authority: {
permission:['']
}
},
WorkReporList:{
name: '报工列表',
component: () => import('@/pages/base/plan/WorkReporList'),
authority: {
permission:[''],
}
},
Payroll:{
name: '工资管理',
icon: 'idcard',
component: view.page,
authority: {
permission: ['Payroll-All'],
}
},
PayrollList:{
name: '工资列表',
component: () => import('@/pages/base/plan/PayrollList'),
authority: {
permission:['Payroll-All','Payroll-List'],
}
},
PayrollSettings:{
name: '工资设置',
component: () => import('@/pages/base/plan/PayrollSettings'),
authority: {
permission:['Payroll-All','Payroll-Settings'],
}
},
}
console.log(BaseRouterMap)
// console.log(BaseRouterMap)
export default BaseRouterMap

View File

@ -1,3 +1,5 @@
// 路由守卫
import { hasAuthority } from '@/utils/authority-utils' // 权限判断
import { loginIgnore } from '@/router/index' // 不用登录白名单
import { checkAuthorization } from '@/utils/request' // 登录校验

View File

@ -29,7 +29,7 @@ if (Authorization != null) {
}
})
getRoutesConfig().then(result => { // 获取路由配置
console.log("=================result:" + result)
// console.log("=================result:" + result)
if (result.data.data != null) {
const routesConfig = result.data.data;
console.log(routesConfig)
@ -111,6 +111,7 @@ const loginIgnore = { // 登录白名单
// 解决重复点击路由报错的BUG
const originalPush = Router.prototype.push // 保存原型对象中的push方法
Router.prototype.push = function push(location) { // 重写原型对象中的push方法
return originalPush.call(this, location).catch((err) => err) // 抛出错误
}

View File

@ -1,8 +1,8 @@
import routerMap from '@/router/router.map'
import { mergeI18nFromRoutes } from '@/utils/i18n'
import Router from 'vue-router'
import deepMerge from 'deepmerge'
import basicOptions from '@/router/async/config.async'
import routerMap from '@/router/router.map' // 路由组件注册表
import { mergeI18nFromRoutes } from '@/utils/i18n' // 合并路由国际化数据
import Router from 'vue-router' // 引入vue-router
import deepMerge from 'deepmerge' // 引入deepmerge 深度合并
import basicOptions from '@/router/async/config.async' // 引入异步路由配置
//应用配置 初始化
let appOptions = {
@ -193,7 +193,7 @@ function loadRoutes(routesConfig) { // 加载路由
//routesConfig = mergeMenus(routesConfig);
if (!routesConfig) {
var routesconfig = store.getters['account/routesConfig']
console.log("=================routesConfig:", routesconfig)
// console.log("=================routesConfig:", routesconfig)
if (!routesconfig) {
return;
}else{
@ -224,9 +224,12 @@ function loadRoutes(routesConfig) { // 加载路由
// 合并路由 生成路由表
const finalRoutes = mergeRoutes(basicOptions.routes, routes)
// 格式化路由
formatRoutes(finalRoutes)
router.options = { ...router.options, routes: finalRoutes } // 路由配置
router.matcher = new Router({ ...router.options, routes: [] }).matcher // 重置路由