Commit 66fdd543 authored by 仇晓婷's avatar 仇晓婷

Merge branch 'product' of http://git.mes123.com/zhouyx/mes-ui into product

parents 90f57519 0c4ad817
...@@ -21,6 +21,9 @@ ...@@ -21,6 +21,9 @@
</div> </div>
<div class="btns"> <div class="btns">
<slot name="buttons"></slot> <slot name="buttons"></slot>
<Button @click="export2Excel" v-if="exportTitle.length>0">
导出
</Button>
<Button v-if="set&&type=='table'" @click="config=!config"> <Button v-if="set&&type=='table'" @click="config=!config">
<Icon type="md-build" title="列设置" /> <Icon type="md-build" title="列设置" />
</Button> </Button>
...@@ -64,6 +67,7 @@ ...@@ -64,6 +67,7 @@
</li> </li>
</ul> </ul>
</Drawer> </Drawer>
<FooterToolbar v-if="batch" v-show="footerToolbar"> <FooterToolbar v-if="batch" v-show="footerToolbar">
<div class="tip">已选{{selectItems.length}}</div> <div class="tip">已选{{selectItems.length}}</div>
<slot name="batch"></slot> <slot name="batch"></slot>
...@@ -212,6 +216,10 @@ export default { ...@@ -212,6 +216,10 @@ export default {
type: Number, type: Number,
default: 40, default: 40,
}, },
exportTitle: {
type: String,
default: "",
}
}, },
created() { created() {
this.columns.forEach((u) => { this.columns.forEach((u) => {
...@@ -462,6 +470,81 @@ export default { ...@@ -462,6 +470,81 @@ export default {
this.footerToolbar = false; this.footerToolbar = false;
this.$refs.table.selectAll(false); this.$refs.table.selectAll(false);
}, },
//导出excel
export2Excel() {
//当前显示数据
var where = [];
var conditions = this.conditions;
if (conditions) {
Object.keys(conditions).forEach((u) => {
let v = conditions[u].value;
let op = conditions[u].op;
if (!this.$u.isNull(v)) {
if (op == "Range") {
let times = [];
v.map((u) => {
if (!this.$u.isNull(u)) {
times.push(this.$u.toTime(u));
}
});
v = times.join(",");
} else if (op.indexOf("In") > -1) {
v = v.join(",");
}
if (!this.$u.isNull(v)) {
where.push({
fieldName: u,
fieldValue: v,
conditionalType: op,
});
}
}
});
}
let searchs = {
pageIndex: 1,
conditions: where,
pageSize: 1000
}
this.$api.post(this.action, searchs).then((r) => {
let list = []
list = r.result.items;
const tHeader = []; // 设置Excel的表格第一行的标题
const filterVal = []; //list里对象的属性
var tempCol = [];
var columnsCur = this.$u.clone(this.columnsNow); //导出列标题信息griddata this.$refs.grid.columnsCur
columnsCur.forEach((el) => {
if ((el.hide && !el.import) || (!el.hide && el.key != "action" && el.type != "selection" && el.key != "ico")) {
if (el.code) {
tempCol.push({
key: el.key,
code: el.code
}); //临时存放code数据字典的字段及对应的数据字典code
}
tHeader.push(el.title);
filterVal.push(el.key);
}
});
list.forEach((e) => {
//给导出数据增加数据字典对应的name
tempCol.forEach((ele) => {
e[ele.key] = this.$u.dirName(
this.$store.getters.dictionaryByKey(ele.code),
e[ele.key]
);
});
});
let nowDate = this.$u.getNowTime(); //年月日时分秒yyyyMMddhhmmss
//获取导出数据结束
this.$u.outExcel(this.exportTitle +
"(" + nowDate + ")",
tHeader,
filterVal,
list
);
});
},
}, },
computed: { computed: {
columnsNow() { columnsNow() {
......
import Api from '@/plugins/request'
import { getJSON } from 'js-cookie';
export default {
index: `${systemUrl}/importcenter/paged`,
paged(params) {
return Api.post(`${systemUrl}/importcenter/paged`, params);
},
get(params) {
return Api.get(`${systemUrl}/importcenter/get`, params);
},
create(params) {
return Api.post(`${systemUrl}/importcenter/create`, params);
},
update(params) {
return Api.post(`${systemUrl}/importcenter/update`, params);
},
delete(id) {
return Api.delete(`${systemUrl}/importcenter/delete`, {
params: {
id: id
}
});
},
deletes(params) {
return Api.post(`${systemUrl}/importcenter/batchdelete`, params);
},
openExcel(params) {//处理时打开以前上传的excel返回数据
return Api.post(`${systemUrl}/importcenter/open`, params);
},
importUser(params) {//用户管理导入
return Api.post(`${systemUrl}/userimportservice/import`, params);
},
updateimportstatus(params) {//用户管理导入
return Api.post(`${systemUrl}/importcenter/updateimportstatus`, params);
},
}
<template>
<div class="h100">
<Tabs type="card" width="100">
<TabPane label="excel数据">
<TablePaste hide-table :input-props="inputProps" @on-success="handleSuccess" @on-error="handleError" />
</TabPane>
<TabPane label="预览">
<Table :border="true" :columns="columnsImport" :data="excelData" :height="tableHeight" ref="tableExcel" class="tableCommon"></Table>
</TabPane>
</Tabs>
</div>
</template>
<script>
import Api from "./api";
export default {
name: "detailExcel",
data() {
return {
entity: {},
downUrl: fileUrlDown,
fileUrlPath: "",
excelRows: 100,
tableHeight: '',
inputProps: {
rows: 10,
placeholder: "请从Excel复制一段表格数据,粘贴在这里",
},
columnsImport: [],
excelData: []
};
},
props: {
eid: Number,
},
created() {
this.excelRows = parseInt((window.innerHeight - 231) / 21) + 1;
this.inputProps.rows = this.excelRows
this.tableHeight = window.innerHeight - 200
},
mounted() {
window.onresize = () => {
///浏览器窗口大小变化
return (() => {
window.screenHeight = window.innerHeight;
this.excelRows = parseInt((window.screenHeight - 231) / 21) + 1;
this.inputProps.rows = this.excelRows
this.tableHeight = window.innerHeight - 200
})();
};
},
methods: {
handleClose() {
this.$emit("on-close");
},
downFile(path) {
//alert(path)
let truePath = path;
if (truePath.length > 2) {
if (
truePath.substring(0, 7).toLowerCase() == "http://" ||
truePath.substring(0, 8).toLowerCase() == "https://"
) {
window.open(truePath, "_blank");
} else {
this.fileUrlPath = this.downUrl + path;
window.open(this.fileUrlPath, "_blank");
}
}
},
//粘贴excel成功
handleSuccess(tableData) {
//初始化数据
this.excelData = [];
this.columnsImport = [];
//处理colum和data
let tabColum = tableData.columns
let tabData = tableData.data
let arrData = []
tabData.forEach(ele => {
let objData = {}
tabColum.forEach(el => {
objData[el.title] = ele[el.key]
})
arrData.push(objData)
})
//处理title和key一致
tabColum.forEach(el => {
el.key = el.title
})
this.columnsImport = tabColum;
this.columnsImport.unshift({
type: 'index',
width: 80,
align: 'right',
title: '序号'
})
this.excelData = arrData;
this.$emit("on-datalength", this.excelData.length)
},
//粘贴excel失败
handleError(tableData, errorIndex) {
//console.log(tableData, errorIndex);
this.$Message.error("表格数据有误");
},
//粘贴excel相关end
},
watch: {
eid(v) {
if (v > 0) {
this.load(v);
}
},
},
};
</script>
This diff is collapsed.
<template> <template>
<Tooltip trigger="hover" v-if="title" :content="title" placement="top-end"> <Tooltip trigger="hover" v-if="title" :content="title" placement="top-end">
<a class="op" :class="css" @click="handler"> <a class="op" :class="css" @click="handler">
<slot> <slot>
<Icon v-if="type=='icon'" :type="icon" /> <Icon v-if="type=='icon'" :type="icon" :color="color" />
<span v-else="type=='text'" v-text="text"></span> <span v-else="type=='text'" v-text="text"></span>
</slot> </slot>
</a> </a>
</Tooltip> </Tooltip>
<a class="op" v-else :class="css" @click="handler"> <a class="op" v-else :class="css" @click="handler">
<slot> <slot>
<Icon v-if="type=='icon'" :type="icon" /> <Icon v-if="type=='icon'" :type="icon" :color="color" />
<span v-else="type=='text'" v-text="text"></span> <span v-else="type=='text'" v-text="text"></span>
</slot> </slot>
</a> </a>
</template> </template>
<script> <script>
export default { export default {
name: "op", name: "op",
...@@ -34,6 +35,9 @@ export default { ...@@ -34,6 +35,9 @@ export default {
msg: { msg: {
type: String, type: String,
default: "确认要删除吗?" default: "确认要删除吗?"
},
color: {
type: String
} }
}, },
data() { data() {
...@@ -62,7 +66,7 @@ export default { ...@@ -62,7 +66,7 @@ export default {
}, },
methods: { methods: {
handler() { handler() {
if (this.oprate == "delete"||this.oprate == "remove") { if (this.oprate == "delete" || this.oprate == "remove") {
this.$Modal.confirm({ this.$Modal.confirm({
title: this.title, title: this.title,
content: "<p>" + this.msg + "</p>", content: "<p>" + this.msg + "</p>",
...@@ -77,6 +81,7 @@ export default { ...@@ -77,6 +81,7 @@ export default {
} }
}; };
</script> </script>
<style lang="less"> <style lang="less">
a.op { a.op {
display: inline; display: inline;
......
...@@ -11753,7 +11753,7 @@ ...@@ -11753,7 +11753,7 @@
"dependencies": { "dependencies": {
"source-map": { "source-map": {
"version": "0.6.1", "version": "0.6.1",
"resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz", "resolved": "http://r.cnpmjs.org/source-map/download/source-map-0.6.1.tgz",
"integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=",
"dev": true, "dev": true,
"optional": true "optional": true
......
<template> <template>
<div class="h100"> <div class="h100">
<DataGrid :columns="columns" ref="grid" :action="action"> <DataGrid :columns="columns" ref="grid" :action="action" exportTitle="导入中心">
<template slot="easySearch"> <template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline> <Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys"> <FormItem prop="keys">
......
...@@ -84,6 +84,7 @@ ...@@ -84,6 +84,7 @@
</Modal> </Modal>
</div> </div>
</template> </template>
<script> <script>
import MasterData from "./masterData.vue"; import MasterData from "./masterData.vue";
...@@ -126,17 +127,14 @@ export default { ...@@ -126,17 +127,14 @@ export default {
}, },
methods: { methods: {
clickItem(val) { clickItem(val) {
console.log(val);
this.nodeInfo.codeRuleId = val; this.nodeInfo.codeRuleId = val;
this.model8 = val; this.model8 = val;
this.cityList.forEach((e) => { this.cityList.forEach((e) => {
if (val == e.id) { if (val == e.id) {
this.downName = e.name; this.downName = e.name;
this.nodeInfo.codeRuleType = e.type; this.nodeInfo.codeRuleType = e.type;
} }
}); });
this.model8 = val;
this.loadTree(this.nodeInfo.codeRuleId, this.nodeInfo.codeRuleType); this.loadTree(this.nodeInfo.codeRuleId, this.nodeInfo.codeRuleType);
}, },
listSlecet() { listSlecet() {
...@@ -214,7 +212,10 @@ export default { ...@@ -214,7 +212,10 @@ export default {
onOk: () => { onOk: () => {
Api.delete(this.nodeInfo.id).then((r) => { Api.delete(this.nodeInfo.id).then((r) => {
if (r.success) { if (r.success) {
this.loadTree(this.nodeInfo.codeRuleId); this.loadTree(
this.nodeInfo.codeRuleId,
this.nodeInfo.codeRuleType
);
this.$Message.success("删除成功"); this.$Message.success("删除成功");
} }
}); });
...@@ -281,13 +282,17 @@ export default { ...@@ -281,13 +282,17 @@ export default {
// this.$refs.dataTable.dataColumns = tableData; // this.$refs.dataTable.dataColumns = tableData;
// } // }
}, },
loadTree(id) { loadTree(id, codeRuleType) {
let data = { let data = {
conditions: [ conditions: [
{ fieldName: "codeRuleId", fieldValue: id, conditionalType: "Equal" }, {
fieldName: "codeRuleId",
fieldValue: id,
conditionalType: "Equal",
},
{ {
fieldName: "codeRuleType", fieldName: "codeRuleType",
fieldValue: this.nodeInfo.codeRuleType, fieldValue: codeRuleType,
conditionalType: "Equal", conditionalType: "Equal",
}, },
], ],
...@@ -322,6 +327,7 @@ export default { ...@@ -322,6 +327,7 @@ export default {
ids.push(b.id); ids.push(b.id);
if (b.children) { if (b.children) {
addId(b.children); addId(b.children);
function addId(data) { function addId(data) {
data.map((u) => { data.map((u) => {
ids.push(u.id); ids.push(u.id);
...@@ -345,6 +351,7 @@ export default { ...@@ -345,6 +351,7 @@ export default {
let expand = this.expand; let expand = this.expand;
let result = []; let result = [];
search(this.keys, items); search(this.keys, items);
function search(keys, data) { function search(keys, data) {
data.map((u) => { data.map((u) => {
if (keys.length < u.title) { if (keys.length < u.title) {
...@@ -365,7 +372,8 @@ export default { ...@@ -365,7 +372,8 @@ export default {
}, },
}; };
</script> </script>
<style lang="less" >
<style lang="less">
.classification { .classification {
font-family: Microsoft YaHei; font-family: Microsoft YaHei;
...@@ -381,6 +389,7 @@ export default { ...@@ -381,6 +389,7 @@ export default {
background: #eee; background: #eee;
padding-left: 10px; padding-left: 10px;
} }
.p-list { .p-list {
h3 { h3 {
height: 50px; height: 50px;
...@@ -393,22 +402,26 @@ export default { ...@@ -393,22 +402,26 @@ export default {
opacity: 1; opacity: 1;
padding-left: 10px; padding-left: 10px;
} }
.search { .search {
height: 50px; height: 50px;
padding: 5px 10px; padding: 5px 10px;
} }
.fg { .fg {
flex: none; flex: none;
height: 100%; height: 100%;
overflow: auto; overflow: auto;
padding-left: 10px; padding-left: 10px;
} }
.tree { .tree {
height: calc(100vh - 215px); height: calc(100vh - 215px);
overflow: auto; overflow: auto;
} }
} }
} }
.show_menu { .show_menu {
width: 30px; width: 30px;
height: 30px; height: 30px;
...@@ -416,6 +429,7 @@ export default { ...@@ -416,6 +429,7 @@ export default {
top: 100px; top: 100px;
left: 0; left: 0;
z-index: 9; z-index: 9;
.menu_play { .menu_play {
width: 30px; width: 30px;
height: 30px; height: 30px;
...@@ -428,11 +442,13 @@ export default { ...@@ -428,11 +442,13 @@ export default {
background: #ffffff; background: #ffffff;
box-shadow: #ccc 2px 2px 4px 1px; box-shadow: #ccc 2px 2px 4px 1px;
} }
.menu_play:hover { .menu_play:hover {
background-color: #2d8cf0; background-color: #2d8cf0;
color: white; color: white;
} }
} }
.ivu-layout-content { .ivu-layout-content {
// margin-left: 5px; // margin-left: 5px;
background: rgba(255, 255, 255, 1); background: rgba(255, 255, 255, 1);
......
<template> <template>
<div class="master-data"> <div class="master-data">
<!-- <Table border :columns="columns" :data="dataColumns" :height="tableHeight"></Table> --> <!-- <Table border :columns="columns" :data="dataColumns" :height="tableHeight"></Table> -->
<DataGrid <DataGrid :columns="columns" ref="grid" :conditions="easySearch" :action="action" :high="false" :height="tableHeight">
:columns="columns"
ref="grid"
:conditions="easySearch"
:action="action"
:high="false"
:height="tableHeight"
>
<template slot="easySearch"> <template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline> <Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys"> <FormItem prop="keys">
...@@ -20,8 +13,9 @@ ...@@ -20,8 +13,9 @@
</Form> </Form>
</template> </template>
</DataGrid> </DataGrid>
</div> </div>
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
export default { export default {
...@@ -33,8 +27,14 @@ export default { ...@@ -33,8 +27,14 @@ export default {
tableHeight: "", tableHeight: "",
dataColumns: [], dataColumns: [],
easySearch: { easySearch: {
keys: { op: "code,name", value: null }, keys: {
id: { op: "In", value: "" } op: "code,name",
value: null
},
id: {
op: "In",
value: ""
}
}, },
columns: [ columns: [
// { // {
...@@ -71,20 +71,28 @@ export default { ...@@ -71,20 +71,28 @@ export default {
width: 260, width: 260,
align: "left", align: "left",
render: (h, params) => { render: (h, params) => {
return h("div", { class: "action" }, [ return h("div", {
class: "action"
}, [
h( h(
"op", "op", {
{ attrs: {
attrs: { oprate: "edit" }, oprate: "edit"
on: { click: () => this.edit(params.row) } },
on: {
click: () => this.edit(params.row)
}
}, },
"编辑" "编辑"
), ),
h( h(
"op", "op", {
{ attrs: {
attrs: { oprate: "delete" }, oprate: "delete"
on: { click: () => this.remove(params.row.id) } },
on: {
click: () => this.remove(params.row.id)
}
}, },
"删除" "删除"
) )
...@@ -94,7 +102,10 @@ export default { ...@@ -94,7 +102,10 @@ export default {
] ]
}; };
}, },
async fetch({ store, params }) { async fetch({
store,
params
}) {
await store.dispatch("loadDictionary"); // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
created() { created() {
...@@ -143,6 +154,7 @@ export default { ...@@ -143,6 +154,7 @@ export default {
} }
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.spare-parts { .spare-parts {
width: 100%; width: 100%;
......
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
</Layout> </Layout>
</div> </div>
</template> </template>
<script> <script>
import MasterData from "./masterData.vue"; import MasterData from "./masterData.vue";
...@@ -74,6 +75,7 @@ export default { ...@@ -74,6 +75,7 @@ export default {
nodeInfo: { nodeInfo: {
categoryId: 0, categoryId: 0,
rootCategoryId: 0, rootCategoryId: 0,
rootCategoryName: "",
ids: [], ids: [],
addChange: true, addChange: true,
codeRuleId: 0, codeRuleId: 0,
...@@ -86,7 +88,9 @@ export default { ...@@ -86,7 +88,9 @@ export default {
detail: null, detail: null,
showMenu: true, showMenu: true,
dataList: [], dataList: [],
codeRuleId: "",
rootCategoryId: null,
categoryId: null,
}; };
}, },
async fetch({ store, params }) { async fetch({ store, params }) {
...@@ -98,16 +102,14 @@ export default { ...@@ -98,16 +102,14 @@ export default {
}, },
methods: { methods: {
clickItem(val) { clickItem(val) {
this.codeRuleId = val;
this.nodeInfo.codeRuleId = val; this.nodeInfo.codeRuleId = val;
this.model8 = val; this.model8 = val;
this.cityList.forEach((e) => { this.cityList.forEach((e) => {
if (val == e.id) { if (val == e.id) {
this.downName = e.name; this.downName = e.name;
this.nodeInfo.codeRuleType = e.type;
} }
}); });
this.loadTree(this.codeRuleId, this.nodeInfo.codeRuleType); this.loadTree(this.nodeInfo.codeRuleId, this.nodeInfo.codeRuleType);
}, },
listSlecet() { listSlecet() {
let data = { let data = {
...@@ -164,14 +166,17 @@ export default { ...@@ -164,14 +166,17 @@ export default {
); );
}, },
handleSelect(root, data) { handleSelect(root, data) {
let pid = null; //定义最顶级id let pid = -1; //定义最顶级id
let upId = data.upId; var pname = "";
var upId = data.upId;
let roots = root; let roots = root;
function addId(roots, upId) { function addId(roots, upId) {
roots.map((u) => { roots.map((u) => {
if (u.node.id == upId) { if (u.node.id == upId) {
if (u.node.upId == 0) { if (u.node.upId == 0) {
pid = u.node.id; pid = u.node.id;
pname = u.node.name;
} else { } else {
upId = u.node.upId; upId = u.node.upId;
addId(roots, upId); addId(roots, upId);
...@@ -179,18 +184,26 @@ export default { ...@@ -179,18 +184,26 @@ export default {
} }
}); });
} }
addId(roots, upId); addId(roots, upId);
this.nodeInfo.categoryId = data.id; this.nodeInfo.categoryId = data.id;
if (pid == null) { this.nodeInfo.rootCategoryName = data.name;
if (pid == -1) {
this.nodeInfo.rootCategoryId = data.id; this.nodeInfo.rootCategoryId = data.id;
this.nodeInfo.rootCategoryName = data.name;
} else { } else {
this.nodeInfo.rootCategoryId = pid; this.nodeInfo.rootCategoryId = pid;
this.nodeInfo.rootCategoryName = pname;
} }
}, },
loadTree(id, codeRuleType) { loadTree(id, codeRuleType) {
let data = { let data = {
conditions: [ conditions: [
{ fieldName: "codeRuleId", fieldValue: id, conditionalType: "Equal" }, {
fieldName: "codeRuleId",
fieldValue: id,
conditionalType: "Equal",
},
{ {
fieldName: "codeRuleType", fieldName: "codeRuleType",
fieldValue: codeRuleType, fieldValue: codeRuleType,
...@@ -231,6 +244,7 @@ export default { ...@@ -231,6 +244,7 @@ export default {
ids.push(b.value); ids.push(b.value);
if (b.children) { if (b.children) {
addId(b.children); addId(b.children);
function addId(data) { function addId(data) {
data.map((u) => { data.map((u) => {
ids.push(u.value); ids.push(u.value);
...@@ -252,6 +266,7 @@ export default { ...@@ -252,6 +266,7 @@ export default {
let expand = this.expand; let expand = this.expand;
let result = []; let result = [];
search(this.keys, items); search(this.keys, items);
function search(keys, data) { function search(keys, data) {
data.map((u) => { data.map((u) => {
if (keys.length < u.title) { if (keys.length < u.title) {
...@@ -272,7 +287,8 @@ export default { ...@@ -272,7 +287,8 @@ export default {
}, },
}; };
</script> </script>
<style lang="less" >
<style lang="less">
.classification { .classification {
font-family: Microsoft YaHei; font-family: Microsoft YaHei;
...@@ -288,6 +304,7 @@ export default { ...@@ -288,6 +304,7 @@ export default {
background: #eee; background: #eee;
padding-left: 10px; padding-left: 10px;
} }
.p-list { .p-list {
h3 { h3 {
height: 50px; height: 50px;
...@@ -300,22 +317,26 @@ export default { ...@@ -300,22 +317,26 @@ export default {
opacity: 1; opacity: 1;
padding-left: 10px; padding-left: 10px;
} }
.search { .search {
height: 50px; height: 50px;
padding: 5px 10px; padding: 5px 10px;
} }
.fg { .fg {
flex: none; flex: none;
height: 100%; height: 100%;
overflow: auto; overflow: auto;
padding-left: 10px; padding-left: 10px;
} }
.tree { .tree {
height: calc(100vh - 215px); height: calc(100vh - 215px);
overflow: auto; overflow: auto;
} }
} }
} }
.show_menu { .show_menu {
width: 30px; width: 30px;
height: 30px; height: 30px;
...@@ -323,6 +344,7 @@ export default { ...@@ -323,6 +344,7 @@ export default {
top: 100px; top: 100px;
left: 0; left: 0;
z-index: 9; z-index: 9;
.menu_play { .menu_play {
width: 30px; width: 30px;
height: 30px; height: 30px;
...@@ -335,11 +357,13 @@ export default { ...@@ -335,11 +357,13 @@ export default {
background: #ffffff; background: #ffffff;
box-shadow: #ccc 2px 2px 4px 1px; box-shadow: #ccc 2px 2px 4px 1px;
} }
.menu_play:hover { .menu_play:hover {
background-color: #2d8cf0; background-color: #2d8cf0;
color: white; color: white;
} }
} }
.ivu-layout-content { .ivu-layout-content {
// margin-left: 5px; // margin-left: 5px;
background: rgba(255, 255, 255, 1); background: rgba(255, 255, 255, 1);
......
This diff is collapsed.
This diff is collapsed.
...@@ -44,5 +44,9 @@ export default { ...@@ -44,5 +44,9 @@ export default {
getmaterialdefinitionproperty(params){ getmaterialdefinitionproperty(params){
return Api.get(`${material}/custompropertydefinition/getmaterialdefinitionproperty`,params); return Api.get(`${material}/custompropertydefinition/getmaterialdefinitionproperty`,params);
}, },
//批量导入
import(params) {
return Api.post(`${resourceUrl}/resourceimportservice/import`, params);
},
} }
\ No newline at end of file
This diff is collapsed.
...@@ -61,6 +61,7 @@ import DTSearch from '@/components/page/dtSearch.vue' ...@@ -61,6 +61,7 @@ import DTSearch from '@/components/page/dtSearch.vue'
import InputTime from '@/components/page/inputTime.vue' import InputTime from '@/components/page/inputTime.vue'
import OutputTime from '@/components/page/outputTime.vue' import OutputTime from '@/components/page/outputTime.vue'
import ViewerImg from '@/components/page/viewer.vue' import ViewerImg from '@/components/page/viewer.vue'
import ImportExcel from '@/components/page/import/process.vue'
// import FormMaking from 'form-making' // import FormMaking from 'form-making'
// import 'form-making/dist/FormMaking.css' // import 'form-making/dist/FormMaking.css'
...@@ -127,6 +128,7 @@ Vue.component("OutputTime", OutputTime) ...@@ -127,6 +128,7 @@ Vue.component("OutputTime", OutputTime)
Vue.component("ViewerImg", ViewerImg) Vue.component("ViewerImg", ViewerImg)
Vue.component("StoreTree", StoreTree) Vue.component("StoreTree", StoreTree)
Vue.component("StoreSelect", StoreSelect) Vue.component("StoreSelect", StoreSelect)
Vue.component("ImportExcel",ImportExcel)
......
...@@ -27,7 +27,7 @@ export default ({ ...@@ -27,7 +27,7 @@ export default ({
next({ next({
name: 'login', name: 'login',
query: { query: {
redirect: to.fullPath redirect: "/account/login?tenant="+util.cookies.get('tenantCode')
} }
}); });
} }
......
...@@ -27,7 +27,7 @@ window.apsUrl = `http://${systemApi.aps}:10111/api/services/app`;//aps排产(61) ...@@ -27,7 +27,7 @@ window.apsUrl = `http://${systemApi.aps}:10111/api/services/app`;//aps排产(61)
window.technologyUrl =`http://${address}:10000/technology/`;//新工艺规程接口 window.technologyUrl =`http://${address}:10000/technology/`;//新工艺规程接口
window.iconImg = `/imgicon/`; window.iconImg = `/imgicon/`;
window.mncImg = `/images/mnc/`;//mnc图片 window.mncImg = `/images/mnc/`;//mnc图片
window.material = `http://${address}:10000/material`; //物料管理 window.material = `http://${address}:10000/material`; //物料管理 10032
window.Platform = `http://${address}:10000/platform`; //计划管理10131 window.Platform = `http://${address}:10000/platform`; //计划管理10131
/* window.systemUrl = `http://${address}:10020/api/services/app`; //System-api 系统管理(基础数据) /* window.systemUrl = `http://${address}:10020/api/services/app`; //System-api 系统管理(基础数据)
......
...@@ -40,7 +40,7 @@ export const actions = { ...@@ -40,7 +40,7 @@ export const actions = {
if (res.result) { if (res.result) {
util.cookies.set('uuid', res.result.userId); util.cookies.set('uuid', res.result.userId);
util.cookies.set('tenantCode', res.result.tenantCode ); util.cookies.set('tenantCode', res.result.tenantCode||res.result.tanantCode);
util.cookies.set('token', res.result.accessToken); util.cookies.set('token', res.result.accessToken);
sessionStorage.setItem('token', res.result.accessToken) sessionStorage.setItem('token', res.result.accessToken)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment