This commit is contained in:
parent
f00bb5f4a4
commit
a986369529
|
|
@ -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 时间戵转换为日期格式
|
||||
|
|
|
|||
|
|
@ -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 },
|
||||
|
||||
|
|
|
|||
|
|
@ -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 },
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -56,6 +56,11 @@ export default {
|
|||
|
||||
items: [
|
||||
{ field: 'name', title: '名称', span: 24, itemRender: { name: '$input', props: { placeholder: '请输入名称' } } },
|
||||
// 是否系统内置 type 开为1,关为0
|
||||
{ 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 = () => {
|
||||
|
|
|
|||
|
|
@ -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: {
|
||||
// 当点击工具栏查询按钮或者手动提交指令 query或reload 时会被触发
|
||||
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) {
|
||||
|
|
|
|||
|
|
@ -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 },
|
||||
|
||||
|
|
|
|||
|
|
@ -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 },
|
||||
|
||||
|
|
|
|||
|
|
@ -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 },
|
||||
|
||||
|
|
|
|||
|
|
@ -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 },
|
||||
|
||||
|
|
|
|||
|
|
@ -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 },
|
||||
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ export default {
|
|||
// 表格列配置
|
||||
columns: [
|
||||
{ type: 'checkbox', width: '40' }, // 多选框
|
||||
{ type: 'seq', width: 'auto' }, // 序号
|
||||
{ type: 'seq', width: '40' }, // 序号
|
||||
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ export default {
|
|||
// 表格列配置
|
||||
columns: [
|
||||
{ type: 'checkbox', width: '40' }, // 多选框
|
||||
{ type: 'seq', width: 'auto' }, // 序号
|
||||
{ type: 'seq', width: '40' }, // 序号
|
||||
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ export default {
|
|||
|
||||
columns: [
|
||||
{ type: 'checkbox', width: '40' }, // 多选框
|
||||
{ type: 'seq', width: 'auto' }, // 序号
|
||||
{ type: 'seq', width: '40' }, // 序号
|
||||
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ export default {
|
|||
|
||||
columns: [
|
||||
{ type: 'checkbox', width: '40' }, // 多选框
|
||||
{ type: 'seq', width: 'auto' }, // 序号
|
||||
{ type: 'seq', width: '40' }, // 序号
|
||||
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
});
|
||||
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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 等于 "" 的数据删除
|
||||
|
|
|
|||
|
|
@ -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 ===============================
|
||||
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ export default {
|
|||
// 表格列配置
|
||||
columns: [
|
||||
{ type: 'checkbox', width: '40' }, // 多选框
|
||||
{ type: 'seq', width: 'auto' }, // 序号
|
||||
{ type: 'seq', width: '40' }, // 序号
|
||||
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ export default {
|
|||
// 表格列配置
|
||||
columns: [
|
||||
{ type: 'checkbox', width: '40' }, // 多选框
|
||||
{ type: 'seq', width: 'auto' }, // 序号
|
||||
{ type: 'seq', width: '40' }, // 序号
|
||||
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
|
|
|||
|
|
@ -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 ===============================
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ export default {
|
|||
// 表格列配置
|
||||
columns: [
|
||||
{ type: 'checkbox', width: '40' }, // 多选框
|
||||
{ type: 'seq', width: 'auto' }, // 序号
|
||||
{ type: 'seq', width: '40' }, // 序号
|
||||
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ export default {
|
|||
// 表格列配置
|
||||
columns: [
|
||||
{ type: 'checkbox', width: '40' }, // 多选框
|
||||
{ type: 'seq', width: 'auto' }, // 序号
|
||||
{ type: 'seq', width: '40' }, // 序号
|
||||
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ export default {
|
|||
// 表格列配置
|
||||
columns: [
|
||||
{ type: 'checkbox', width: '40' }, // 多选框
|
||||
{ type: 'seq', width: 'auto' }, // 序号
|
||||
{ type: 'seq', width: '40' }, // 序号
|
||||
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ export default {
|
|||
// 表格列配置
|
||||
columns: [
|
||||
{ type: 'checkbox', width: '40' }, // 多选框
|
||||
{ type: 'seq', width: 'auto' }, // 序号
|
||||
{ type: 'seq', width: '40' }, // 序号
|
||||
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
|
|
|||
|
|
@ -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 ===============================
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ export default {
|
|||
// 表格列配置
|
||||
columns: [
|
||||
{ type: 'checkbox', width: '40' }, // 多选框
|
||||
{ type: 'seq', width: 'auto' }, // 序号
|
||||
{ type: 'seq', width: '40' }, // 序号
|
||||
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ export default {
|
|||
// 表格列配置
|
||||
columns: [
|
||||
{ type: 'checkbox', width: '40' }, // 多选框
|
||||
{ type: 'seq', width: 'auto' }, // 序号
|
||||
{ type: 'seq', width: '40' }, // 序号
|
||||
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
|
|
|||
|
|
@ -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 ===============================
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ export default {
|
|||
// 表格列配置
|
||||
columns: [
|
||||
{ type: 'checkbox', width: '40' }, // 多选框
|
||||
{ type: 'seq', width: 'auto' }, // 序号
|
||||
{ type: 'seq', width: '40' }, // 序号
|
||||
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ export default {
|
|||
// 表格列配置
|
||||
columns: [
|
||||
{ type: 'checkbox', width: '40' }, // 多选框
|
||||
{ type: 'seq', width: 'auto' }, // 序号
|
||||
{ type: 'seq', width: '40' }, // 序号
|
||||
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ export default {
|
|||
// 表格列配置
|
||||
columns: [
|
||||
{ type: 'checkbox', width: '40' }, // 多选框
|
||||
{ type: 'seq', width: 'auto' }, // 序号
|
||||
{ type: 'seq', width: '40' }, // 序号
|
||||
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ export default {
|
|||
// 表格列配置
|
||||
columns: [
|
||||
{ type: 'checkbox', width: '40' }, // 多选框
|
||||
{ type: 'seq', width: 'auto' }, // 序号
|
||||
{ type: 'seq', width: '40' }, // 序号
|
||||
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
|
|
|||
|
|
@ -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 ===============================
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ export default {
|
|||
// 表格列配置
|
||||
columns: [
|
||||
{ type: 'checkbox', width: '40' }, // 多选框
|
||||
{ type: 'seq', width: 'auto' }, // 序号
|
||||
{ type: 'seq', width: '40' }, // 序号
|
||||
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ export default {
|
|||
// 表格列配置
|
||||
columns: [
|
||||
{ type: 'checkbox', width: '40' }, // 多选框
|
||||
{ type: 'seq', width: 'auto' }, // 序号
|
||||
{ type: 'seq', width: '40' }, // 序号
|
||||
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
|
|
|||
|
|
@ -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 ===============================
|
||||
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ export default {
|
|||
// 表格列配置
|
||||
columns: [
|
||||
{ type: 'checkbox', width: '40' }, // 多选框
|
||||
{ type: 'seq', width: 'auto' }, // 序号
|
||||
{ type: 'seq', width: '40' }, // 序号
|
||||
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ export default {
|
|||
// 表格列配置
|
||||
columns: [
|
||||
{ type: 'checkbox', width: '40' }, // 多选框
|
||||
{ type: 'seq', width: 'auto' }, // 序号
|
||||
{ type: 'seq', width: '40' }, // 序号
|
||||
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ export default {
|
|||
// 表格列配置
|
||||
columns: [
|
||||
{ type: 'checkbox', width: '40' }, // 多选框
|
||||
{ type: 'seq', width: 'auto' }, // 序号
|
||||
{ type: 'seq', width: '40' }, // 序号
|
||||
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ export default {
|
|||
// 表格列配置
|
||||
columns: [
|
||||
{ type: 'checkbox', width: '40' }, // 多选框
|
||||
{ type: 'seq', width: 'auto' }, // 序号
|
||||
{ type: 'seq', width: '40' }, // 序号
|
||||
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ export default {
|
|||
// 表格列配置
|
||||
columns: [
|
||||
{ type: 'checkbox', width: '40' }, // 多选框
|
||||
{ type: 'seq', width: 'auto' }, // 序号
|
||||
{ type: 'seq', width: '40' }, // 序号
|
||||
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
|
|
|||
|
|
@ -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 ===============================
|
||||
|
|
|
|||
|
|
@ -227,7 +227,7 @@ export default {
|
|||
// 表格列配置
|
||||
columns: [
|
||||
{ type: 'checkbox', width: '40' }, // 多选框
|
||||
{ type: 'seq', width: 'auto' }, // 序号
|
||||
{ type: 'seq', width: '40' }, // 序号
|
||||
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
|
|
|||
|
|
@ -227,7 +227,7 @@ export default {
|
|||
// 表格列配置
|
||||
columns: [
|
||||
{ type: 'checkbox', width: '40' }, // 多选框
|
||||
{ type: 'seq', width: 'auto' }, // 序号
|
||||
{ type: 'seq', width: '40' }, // 序号
|
||||
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ export default {
|
|||
// 表格列配置
|
||||
columns: [
|
||||
{ type: 'checkbox', width: '40' }, // 多选框
|
||||
{ type: 'seq', width: 'auto' }, // 序号
|
||||
{ type: 'seq', width: '40' }, // 序号
|
||||
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
|
|
|||
|
|
@ -227,7 +227,7 @@ export default {
|
|||
// 表格列配置
|
||||
columns: [
|
||||
{ type: 'checkbox', width: '40' }, // 多选框
|
||||
{ type: 'seq', width: 'auto' }, // 序号
|
||||
{ type: 'seq', width: '40' }, // 序号
|
||||
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
|
|
|||
|
|
@ -227,7 +227,7 @@ export default {
|
|||
// 表格列配置
|
||||
columns: [
|
||||
{ type: 'checkbox', width: '40' }, // 多选框
|
||||
{ type: 'seq', width: 'auto' }, // 序号
|
||||
{ type: 'seq', width: '40' }, // 序号
|
||||
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
|
|
|||
|
|
@ -227,7 +227,7 @@ export default {
|
|||
// 表格列配置
|
||||
columns: [
|
||||
{ type: 'checkbox', width: '40' }, // 多选框
|
||||
{ type: 'seq', width: 'auto' }, // 序号
|
||||
{ type: 'seq', width: '40' }, // 序号
|
||||
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
|
|
|||
|
|
@ -227,7 +227,7 @@ export default {
|
|||
// 表格列配置
|
||||
columns: [
|
||||
{ type: 'checkbox', width: '40' }, // 多选框
|
||||
{ type: 'seq', width: 'auto' }, // 序号
|
||||
{ type: 'seq', width: '40' }, // 序号
|
||||
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
|
|
|||
|
|
@ -227,7 +227,7 @@ export default {
|
|||
// 表格列配置
|
||||
columns: [
|
||||
{ type: 'checkbox', width: '40' }, // 多选框
|
||||
{ type: 'seq', width: 'auto' }, // 序号
|
||||
{ type: 'seq', width: '40' }, // 序号
|
||||
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ export default {
|
|||
// 表格列配置
|
||||
columns: [
|
||||
{ type: 'checkbox', width: '40' }, // 多选框
|
||||
{ type: 'seq', width: 'auto' }, // 序号
|
||||
{ type: 'seq', width: '40' }, // 序号
|
||||
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ export default {
|
|||
// 表格列配置
|
||||
columns: [
|
||||
{ type: 'checkbox', width: '40' }, // 多选框
|
||||
{ type: 'seq', width: 'auto' }, // 序号
|
||||
{ type: 'seq', width: '40' }, // 序号
|
||||
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ export default {
|
|||
// 表格列配置
|
||||
columns: [
|
||||
{ type: 'checkbox', width: '40' }, // 多选框
|
||||
{ type: 'seq', width: 'auto' }, // 序号
|
||||
{ type: 'seq', width: '40' }, // 序号
|
||||
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ export default {
|
|||
// 表格列配置
|
||||
columns: [
|
||||
{ type: 'checkbox', width: '40' }, // 多选框
|
||||
{ type: 'seq', width: 'auto' }, // 序号
|
||||
{ type: 'seq', width: '40' }, // 序号
|
||||
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ export default {
|
|||
// 表格列配置
|
||||
columns: [
|
||||
{ type: 'checkbox', width: '40' }, // 多选框
|
||||
{ type: 'seq', width: 'auto' }, // 序号
|
||||
{ type: 'seq', width: '40' }, // 序号
|
||||
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ export default {
|
|||
// 表格列配置
|
||||
columns: [
|
||||
{ type: 'checkbox', width: '40' }, // 多选框
|
||||
{ type: 'seq', width: 'auto' }, // 序号
|
||||
{ type: 'seq', width: '40' }, // 序号
|
||||
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ export default {
|
|||
// 表格列配置
|
||||
columns: [
|
||||
{ type: 'checkbox', width: '40' }, // 多选框
|
||||
{ type: 'seq', width: 'auto' }, // 序号
|
||||
{ type: 'seq', width: '40' }, // 序号
|
||||
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ export default {
|
|||
// 表格列配置
|
||||
columns: [
|
||||
{ type: 'checkbox', width: '40' }, // 多选框
|
||||
{ type: 'seq', width: 'auto' }, // 序号
|
||||
{ type: 'seq', width: '40' }, // 序号
|
||||
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ export default {
|
|||
// 表格列配置
|
||||
columns: [
|
||||
{ type: 'checkbox', width: '40' }, // 多选框
|
||||
{ type: 'seq', width: 'auto' }, // 序号
|
||||
{ type: 'seq', width: '40' }, // 序号
|
||||
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ export default {
|
|||
// 表格列配置
|
||||
columns: [
|
||||
{ type: 'checkbox', width: '40' }, // 多选框
|
||||
{ type: 'seq', width: 'auto' }, // 序号
|
||||
{ type: 'seq', width: '40' }, // 序号
|
||||
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -1,3 +1,5 @@
|
|||
// 路由守卫
|
||||
|
||||
import { hasAuthority } from '@/utils/authority-utils' // 权限判断
|
||||
import { loginIgnore } from '@/router/index' // 不用登录白名单
|
||||
import { checkAuthorization } from '@/utils/request' // 登录校验
|
||||
|
|
|
|||
|
|
@ -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) // 抛出错误
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 // 重置路由
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue