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: [ columns: [
{ type: 'checkbox', width: '40' }, // { type: 'checkbox', width: '40' }, //
{ type: 'seq', width: 'auto' }, // { type: 'seq', width: '40' }, //
{ slots: { default: 'logo' }, width: 120, sortable: true, title: '公司Logo', showHeaderOverflow: true }, // logo { slots: { default: 'logo' }, width: 120, sortable: true, title: '公司Logo', showHeaderOverflow: true }, // logo
{ field: 'title', sortable: true, title: '公司名称', width: 250 }, // { field: 'title', sortable: true, title: '公司名称', width: 250 }, //
// auth_stop_date // auth_stop_date

View File

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

View File

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

View File

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

View File

@ -42,7 +42,7 @@ export default {
data: { data: {
"name": "", "name": "",
"code": "", "code": "",
enum_id:"0" enum_id: "0"
}, },
titleWidth: 150, titleWidth: 150,
@ -56,6 +56,11 @@ export default {
items: [ items: [
{ field: 'name', title: '名称', span: 24, itemRender: { name: '$input', props: { placeholder: '请输入名称' } } }, { 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: 'code', title: '编号', span: 24, itemRender: { name: '$input', props: { placeholder: '请输入编号' } } },
{ field: 'enum_id', title: '上级分类', span: 24, itemRender: { name: '$select', props: { placeholder: '请输入上级分类', options: [] } } } { field: 'enum_id', title: '上级分类', span: 24, itemRender: { name: '$select', props: { placeholder: '请输入上级分类', options: [] } } }
] ]
@ -77,9 +82,9 @@ export default {
}, },
useBigInt: true useBigInt: true
}).then(a => { }).then(a => {
if(a.data.mes_enum.enum_id){ if (a.data.mes_enum.enum_id) {
a.data.mes_enum.enum_id = a.data.mes_enum.enum_id.toString(); a.data.mes_enum.enum_id = a.data.mes_enum.enum_id.toString();
}else{ } else {
a.data.mes_enum.enum_id = "0" a.data.mes_enum.enum_id = "0"
} }
this.formOptions.data = a.data.mes_enum; this.formOptions.data = a.data.mes_enum;
@ -92,6 +97,7 @@ export default {
// //
methods: { methods: {
//
loadEmuns() { loadEmuns() {
this.$mk.post({ this.$mk.post({
url: this.actions.list, url: this.actions.list,
@ -118,7 +124,7 @@ export default {
console.log(a.data.MesEnum) console.log(a.data.MesEnum)
if (a.data.MesEnum) { if (a.data.MesEnum) {
a.data.MesEnum.forEach(item => { a.data.MesEnum.forEach(item => {
options_emuns.push({ value: item.id.toString(), id:item.id, label: item.name }); options_emuns.push({ value: item.id.toString(), id: item.id, label: item.name });
}); });
} }
this.formOptions.items[2].itemRender.props.options = options_emuns; this.formOptions.items[2].itemRender.props.options = options_emuns;
@ -129,6 +135,7 @@ export default {
loadData() { loadData() {
}, },
//
ok() { ok() {
let save = () => { let save = () => {
@ -136,8 +143,8 @@ export default {
let postdata = Object.assign({ id: this.dataId }, this.formOptions.data); let postdata = Object.assign({ id: this.dataId }, this.formOptions.data);
let options = this.formOptions.items[2].itemRender.props.options; let options = this.formOptions.items[2].itemRender.props.options;
options.forEach(item=>{ options.forEach(item => {
if(item.value == postdata.enum_id){ if (item.value == postdata.enum_id) {
postdata.enum_id = item.id; postdata.enum_id = item.id;
} }
}); });

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -232,15 +232,16 @@
<span v-else></span> <span v-else></span>
</template> </template>
</vxe-column> </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_id" title="布产单id" width="210"></vxe-column> -->
<vxe-column field="production_code" title="布产单号" width="110"></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="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="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> width="160"></vxe-column>
<vxe-column field="status" title="状态" align="center" width="100"></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="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="reality_complete_time" formatter="formatDate" title="完工日期" width="160"></vxe-column>
<vxe-column field="remark" title="备注" width="160"></vxe-column> <vxe-column field="remark" title="备注" width="160"></vxe-column>
</vxe-table> </vxe-table>
@ -756,6 +757,7 @@ export default {
"company_token": process.env.VUE_APP_COMPANYTOKEN, "company_token": process.env.VUE_APP_COMPANYTOKEN,
"search_rules": search_rules, "search_rules": search_rules,
"order_bys": [ "order_bys": [
{ "column": "plan_complete_time", "order": "asc" }
], ],
"page": 1, "page": 1,
"limit": 200, "limit": 200,
@ -772,6 +774,7 @@ export default {
item.department_name = item.department_detail.name item.department_name = item.department_detail.name
item.production_code = item.production_detail.code item.production_code = item.production_detail.code
item.process_name = item.process_detail.name item.process_name = item.process_detail.name
item.component_name = item.component_detail.name;
}) })
// this.detailDataProgress production_code "" // this.detailDataProgress production_code ""

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -39,6 +39,39 @@ const view = {
icon: 'idcard', icon: 'idcard',
component: view.blank 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: { analysis: {
name: '分析页', name: '分析页',
component: () => import('@/pages/dashboard/analysis') component: () => import('@/pages/dashboard/analysis')
@ -133,6 +166,20 @@ const view = {
icon: 'warning', icon: 'warning',
component: view.blank component: view.blank
}, },
//================================================================================================================================
// 以上为自动生成的路由,以下为手动添加的路由
//================================================================================================================================
//================================================================================================================================
// 以下为项目的路由
//================================================================================================================================
TouchMesReporting : { TouchMesReporting : {
name: '报工', name: '报工',
path: '/touch/mesreporting', path: '/touch/mesreporting',
@ -154,92 +201,9 @@ const view = {
component: () => import('@/pages/Middle/Mold/Touch/Reporting') 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 export default BaseRouterMap

View File

@ -1,6 +1,8 @@
import {hasAuthority} from '@/utils/authority-utils' // 权限判断 // 路由守卫
import {loginIgnore} from '@/router/index' // 不用登录白名单
import {checkAuthorization} from '@/utils/request' // 登录校验 import { hasAuthority } from '@/utils/authority-utils' // 权限判断
import { loginIgnore } from '@/router/index' // 不用登录白名单
import { checkAuthorization } from '@/utils/request' // 登录校验
import NProgress from 'nprogress' // 进度条 import NProgress from 'nprogress' // 进度条
NProgress.configure({ showSpinner: false }) // 进度条配置 是否显示加载ico NProgress.configure({ showSpinner: false }) // 进度条配置 是否显示加载ico
@ -29,12 +31,12 @@ const progressStart = (to, from, next) => {
*/ */
const loginGuard = (to, from, next, options) => { const loginGuard = (to, from, next, options) => {
// console.log("进入loginGuard登录守卫") // console.log("进入loginGuard登录守卫")
const {message} = options // 获取message const { message } = options // 获取message
// console.log('loginIgnore.includes(to)', loginIgnore.includes(to)) // console.log('loginIgnore.includes(to)', loginIgnore.includes(to))
// console.log('checkAuthorization():', checkAuthorization()) // console.log('checkAuthorization():', checkAuthorization())
if (!loginIgnore.includes(to) && !checkAuthorization()) { // 如果不是白名单 并且 登录校验失败 if (!loginIgnore.includes(to) && !checkAuthorization()) { // 如果不是白名单 并且 登录校验失败
message.warning('登录已失效,请重新登录') message.warning('登录已失效,请重新登录')
next({path: '/login'}) // 跳转到登录页面 next({ path: '/login' }) // 跳转到登录页面
} else { } else {
// console.log('进入loginGuard登录守卫next()') // console.log('进入loginGuard登录守卫next()')
next() // 如果是白名单,正常跳转 next() // 如果是白名单,正常跳转
@ -52,13 +54,13 @@ const loginGuard = (to, from, next, options) => {
*/ */
const authorityGuard = (to, from, next, options) => { const authorityGuard = (to, from, next, options) => {
const {store, message} = options const { store, message } = options
const permissions = store.getters['account/permissions'] // 获取权限数据 const permissions = store.getters['account/permissions'] // 获取权限数据
if (to.meta.authority !== undefined){ if (to.meta.authority !== undefined) {
if (!hasAuthority(to, permissions)) { // 判断是否有权限 if (!hasAuthority(to, permissions)) { // 判断是否有权限
// 如果没有权限跳转到403页面 // 如果没有权限跳转到403页面
message.warning(`对不起,您无权访问页面: ${to.fullPath},请联系管理员`) message.warning(`对不起,您无权访问页面: ${to.fullPath},请联系管理员`)
next({path: '/403'}) next({ path: '/403' })
// NProgress.done() // NProgress.done()
} else { } else {
// console.log('进入authorityGuard权限守卫next()') // console.log('进入authorityGuard权限守卫next()')
@ -77,7 +79,7 @@ const authorityGuard = (to, from, next, options) => {
*/ */
const redirectGuard = (to, from, next, options) => { const redirectGuard = (to, from, next, options) => {
// console.log("进入redirectGuard混合导航模式") // console.log("进入redirectGuard混合导航模式")
const {store} = options // 获取store const { store } = options // 获取store
@ -109,7 +111,7 @@ const redirectGuard = (to, from, next, options) => {
const redirect = getFirstChild(subMenu) // 获取第一个子菜单 const redirect = getFirstChild(subMenu) // 获取第一个子菜单
console.log("subMenu.length", subMenu.length) console.log("subMenu.length", subMenu.length)
console.log("redirect", redirect) console.log("redirect", redirect)
return next({path: redirect.fullPath}) // 重定向到第一个子菜单 return next({ path: redirect.fullPath }) // 重定向到第一个子菜单
} }
} }
} }

View File

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

View File

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