Commit cd795b18 authored by renjintao's avatar renjintao

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

parents 00cc6099 e9f50b41
<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" />
......
...@@ -2,22 +2,20 @@ ...@@ -2,22 +2,20 @@
<Poptip placement="bottom-start" trigger="hover" width="240" transfer> <Poptip placement="bottom-start" trigger="hover" width="240" transfer>
<label :class="css">{{ user.name }}</label> <label :class="css">{{ user.name }}</label>
<div slot="content"> <div slot="content">
<Avatar <Avatar v-if="user.face" size="large" :src="user.face"></Avatar>
v-if="user.face"
size="large"
:src="user.face"
></Avatar>
<Avatar <Avatar
v-else v-else
size="large" size="large"
style="color: #f56a00;background-color: #fde3cf; text-align:center" style="color: #f56a00;background-color: #fde3cf; text-align:center"
:icon="user.gender=='男'?'md-person':'md-woman'" :icon="user.gender=='男'?'md-person':'md-woman'"
></Avatar> ></Avatar>
<div>姓名:{{ user.name }} <div>
姓名:{{ user.name }}
<tag v-if="user.isDeleted">已删除</tag> <tag v-if="user.isDeleted">已删除</tag>
</div> </div>
<div>状态: <div>
<state :value="user.status" type="tag" code="User.base.status"/> 状态:
<state :value="user.status" type="tag" code="User.base.status" />
</div> </div>
<div>性别:{{ user.gender }}</div> <div>性别:{{ user.gender }}</div>
<div>部门:{{ user.department }}</div> <div>部门:{{ user.department }}</div>
...@@ -27,7 +25,7 @@ ...@@ -27,7 +25,7 @@
</template> </template>
<script> <script>
export default { export default {
name: 'User', name: "User",
props: { props: {
value: { value: {
type: [Number, String], type: [Number, String],
...@@ -38,58 +36,55 @@ export default { ...@@ -38,58 +36,55 @@ export default {
return { return {
user: { user: {
name: this.value, name: this.value,
face: '', face: "",
gender: '', gender: "",
roles: '', roles: "",
department: '', status:0,
loginName: '', department: "",
loginName: "",
id: 0 id: 0
}, },
css:"s0" css: "s0"
} };
}, },
mounted() { mounted() {
//{"id":77,"name":"杨华馥","gender":"男","department":"北京生产车间","roles":"admin","status":1,"isDeleted":false} //{"id":77,"name":"杨华馥","gender":"男","department":"北京生产车间","roles":"admin","status":1,"isDeleted":false}
this.load() this.load();
}, },
methods: { methods: {
load() { load() {
if (this.value) { if (this.value) {
var user = this.$store.getters.getUser(this.value) var user = this.$store.getters.getUser(this.value);
if (user) { if (user) {
this.user = user this.user = user;
} else { if (this.user.isDeleted) {
this.$api this.css = "s2";
.get(`${systemUrl}/user/getuser`, { id: this.value }) } else if (this.user.status == 1) {
.then((r) => { this.css = "s1";
// alert(JSON.stringify( r.result))
if (r.success) {
this.user = r.result
if(this.user.isDeleted){
this.css="s2"
}else if(this.user.status==1){
this.css="s1"
} }
if(this.user.face){ if (this.user.face) {
this.user.face=fileUrlDown+this.user.face; this.user.face = fileUrlDown + this.user.face;
} }
// this.$store.commit('addUser', r.result)
}
})
} }
} }
} }
}, },
watch: { watch: {
value(v) { value(v) {
if (v > 0) this.load() if (v > 0) this.load();
} }
} }
} };
</script> </script>
<style lang="less"> <style lang="less">
.s2{color: red;} .s2 {
.s1{color: #333} color: red;
.s0{color:#ddd} }
.s1 {
color: #333;
}
.s0 {
color: #ddd;
}
</style> </style>
\ No newline at end of file
...@@ -924,14 +924,14 @@ export default { ...@@ -924,14 +924,14 @@ export default {
demandStartDate: '投料时间', demandStartDate: '投料时间',
demandFinishDate: '节点时间', demandFinishDate: '节点时间',
//tempTitle------ //tempTitle------
stage:'阶段', stage: '阶段',
materialId:'材料', materialId: '材料',
routing_Method:'工艺方法', routing_Method: '工艺方法',
outer_Envelope_Size:'外包络尺寸', outer_Envelope_Size: '外包络尺寸',
guestName:'甲方客户', guestName: '甲方客户',
taskCode:'甲方任务号', taskCode: '甲方任务号',
putintDocmentCode:'甲方投产输入文件(编号)', putintDocmentCode: '甲方投产输入文件(编号)',
technologyDocmentCode:'甲方技术输入文件(编号)', technologyDocmentCode: '甲方技术输入文件(编号)',
}, },
mes_part_task_plan_simulate: { mes_part_task_plan_simulate: {
id: '', id: '',
...@@ -1259,5 +1259,27 @@ export default { ...@@ -1259,5 +1259,27 @@ export default {
productionRequirement: '生产要求', productionRequirement: '生产要求',
standard: '标准指标', standard: '标准指标',
qualityTemplateName: '模板文件名称', qualityTemplateName: '模板文件名称',
},
plan_resource: {
id: '',
creationTime: '创建时间',
creatorUserId: '创建人',
lastModificationTime: '更新时间',
lastModifierUserId: '更新人',
isDeleted: '删除人',
deletionTime: '删除时间',
deleterUserId: '删除人',
title: '资源名称',
code: '资源编号',
type: '资源类型',
property: '属性',
departId: '部门id',
departTitle: '部门',
calId: '工作日历编号',
holidayCalId: '加班日历编号',
calName: '工作日历名称',
holidayCalName: '加班日历名称',
isimportant:'关重',
capabilityValue:'能力值',
} }
} }
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
</Header> </Header>
<div class="i-tabs"> <div class="i-tabs">
<transition name="fade-quick"> <transition name="fade-quick">
<i-tabs v-if="tabs" v-show="showHeader" @on-reload="handleReload" /> <i-tabs v-show="showHeader" @on-reload="handleReload" />
</transition> </transition>
</div> </div>
<Content class="i-layout-content"> <Content class="i-layout-content">
......
...@@ -22,6 +22,10 @@ export default { ...@@ -22,6 +22,10 @@ export default {
menus: [] menus: []
}; };
}, },
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
await store.dispatch("loadUsers");//加载缓存的用户
},
created() { created() {
// 处理路由 得到每一级的路由设置 // 处理路由 得到每一级的路由设置
this.$store.commit("admin/page/init", frameInRoutes); this.$store.commit("admin/page/init", frameInRoutes);
...@@ -66,7 +70,6 @@ export default { ...@@ -66,7 +70,6 @@ export default {
} }
}, },
methods: { methods: {
getMenu() { getMenu() {
this.$http.sysUser.getusermenu().then(res => { this.$http.sysUser.getusermenu().then(res => {
if (res.result) { if (res.result) {
......
...@@ -96,6 +96,17 @@ henq.getDate = (strDate) => { ...@@ -96,6 +96,17 @@ henq.getDate = (strDate) => {
}).match(/\d+/g) + ')'); }).match(/\d+/g) + ')');
return date; return date;
} }
henq.group=(array, f)=> {
const groups = {};
array.forEach(function (o) {
const group = JSON.stringify(f(o));
groups[group] = groups[group] || [];
groups[group].push(o);
});
return Object.keys(groups).map(function (group) {
return groups[group];
});
}
henq.toTree = (list, rootId, format, parentFiledName) => { henq.toTree = (list, rootId, format, parentFiledName) => {
var upId = parentFiledName; var upId = parentFiledName;
let i = 0; let i = 0;
......
...@@ -25,6 +25,10 @@ export default { ...@@ -25,6 +25,10 @@ export default {
saveTeamentry(params){ saveTeamentry(params){
return Api.post(`${PlanUrl}/teamsdispatchs/saveteamentry`, params); return Api.post(`${PlanUrl}/teamsdispatchs/saveteamentry`, params);
}, },
// 删除拆分项
deleteItem(params){
return Api.get(`${PlanUrl}/teamsdispatchs/deldispatch`, params);
},
//删除: //删除:
delete(params) { delete(params) {
return Api.delete(`${PlanUrl}/mesorder/delete`, { return Api.delete(`${PlanUrl}/mesorder/delete`, {
......
...@@ -14,16 +14,70 @@ ...@@ -14,16 +14,70 @@
<Radio label="2">已排产</Radio> <Radio label="2">已排产</Radio>
</RadioGroup> </RadioGroup>
{{listTask.length}} {{listTask.length}}
<span class="check">
<RadioGroup v-model="listShow" type="button" size="small">
<Radio label="订单" title="订单分类">
<Icon type="ios-albums" />
</Radio>
<Radio label="工单" title="时间顺序">
<Icon type="ios-calendar" />
</Radio>
</RadioGroup>
</span>
</p> </p>
<div class="dispatch_part_body" :style="{height:byheight}"> <div class="dispatch_part_body" v-if="listShow == '订单'" :style="{height:byheight}">
<!-- {{ids}} --> <!-- {{ids}} -->
<Collapse simple>
<Panel v-for="(item,index) in listOrder" :key="index" :name="item.mesCode">
<b>订单号:{{item[0].mesCode}} <Tag>{{item.length}}</Tag></b>
<!-- 订单号:{{item[0].mesCode}} {{item.length}} -->
<p slot="content">
<Row :gutter="15" class="card_body01">
<Col span="8" class="dispatch_card" v-for="(li,index) in item" :key="li.id">
<Card>
<p slot="title" class="card_top">
<Checkbox v-model="li.checked" :disabled="li.status!=-1" >
<Icon type="ios-pricetags" />工序{{li.process_seq}}{{li.process_name}}
</Checkbox>
</p>
<div class="h60">
<p class="g_title">{{li.productName}}--{{li.equipCode}}</p>
<p>
产品数量:{{li.quantity}}
<op
title="拆分"
type="icon"
icon="md-cut"
v-if="li.quantity > 1 && li.pid == 0 && li.status==-1"
@click="setChai(li,index)"
></op>
<op
title="删除"
type="icon"
icon="md-close-circle"
v-else-if="li.pid != 0"
@click="removeDetail(li,index)"
></op>
</p>
<p>{{li.beginTime}}--{{li.endTime}}</p>
<p>人员 :{{li.userNames}}</p>
<!-- <p>设备 :{{item.equipCode}}</p> -->
</div>
</Card>
</Col>
</Row>
</p>
</Panel>
</Collapse>
</div>
<div class="dispatch_part_body" v-else-if="listShow == '工单'" :style="{height:byheight}">
<Row :gutter="15" class="card_body01"> <Row :gutter="15" class="card_body01">
<Col span="8" class="dispatch_card" v-for="(item,index) in listTask" :key="index"> <Col span="8" class="dispatch_card" v-for="(item,index) in listTask" :key="index">
<Card> <Card>
<p slot="title" class="card_top"> <p slot="title" class="card_top">
<Checkbox <Checkbox
v-model="item.checked" v-model="item.checked"
:disabled="item.dispatchStatus==2" :disabled="item.status!=-1"
>订单号:{{item.mesCode}}</Checkbox> >订单号:{{item.mesCode}}</Checkbox>
</p> </p>
<div class="h60"> <div class="h60">
...@@ -36,7 +90,7 @@ ...@@ -36,7 +90,7 @@
title="拆分" title="拆分"
type="icon" type="icon"
icon="md-cut" icon="md-cut"
v-if="item.quantity > 1 && item.pid == 0" v-if="item.quantity > 1 && item.pid == 0 && item.status==-1"
@click="setChai(item,index)" @click="setChai(item,index)"
></op> ></op>
<op <op
...@@ -49,6 +103,7 @@ ...@@ -49,6 +103,7 @@
<!-- --> <!-- -->
</p> </p>
<p>{{item.beginTime}}--{{item.endTime}}</p> <p>{{item.beginTime}}--{{item.endTime}}</p>
<p>人员 :{{item.userNames}}</p>
<!-- <p>设备 :{{item.equipCode}}</p> --> <!-- <p>设备 :{{item.equipCode}}</p> -->
</div> </div>
</Card> </Card>
...@@ -246,6 +301,7 @@ export default { ...@@ -246,6 +301,7 @@ export default {
byheight: '450px', byheight: '450px',
button1: '全部', button1: '全部',
button2: '设备', button2: '设备',
listShow: '订单',
shebei: '', shebei: '',
dateRange: { dateRange: {
//禁选工时时间区间 //禁选工时时间区间
...@@ -263,11 +319,13 @@ export default { ...@@ -263,11 +319,13 @@ export default {
listSheBei: [], //设备列表 listSheBei: [], //设备列表
listMan: [], //人员列表 listMan: [], //人员列表
listTask: [], //工单列表数据 listTask: [], //工单列表数据
listTitle: [],//订单号列表
newList: [], //选中数据 newList: [], //选中数据
chaiModal: false, //拆分弹框 chaiModal: false, //拆分弹框
chaiNum: 1, //拆分数量 chaiNum: 1, //拆分数量
maxnum: 1, maxnum: 1,
rowIndex: 0, //多选项的index rowIndex: 0, //多选项的index
chaiId:0,
entity: { entity: {
taskTime: '', //工时 taskTime: '', //工时
userIds: null, //选中人员 userIds: null, //选中人员
...@@ -349,7 +407,7 @@ export default { ...@@ -349,7 +407,7 @@ export default {
this.shebeiId = id this.shebeiId = id
this.footerToolbar = true this.footerToolbar = true
}, },
// 获取查询人员 listTask // 获取查询人员
getselectuser(id) { getselectuser(id) {
let parme = { departmentId: id, type: '2' } let parme = { departmentId: id, type: '2' }
Api.getUser(parme).then((res) => { Api.getUser(parme).then((res) => {
...@@ -374,7 +432,13 @@ export default { ...@@ -374,7 +432,13 @@ export default {
let parme = { departmentId: id, DispatchStatus: this.status } let parme = { departmentId: id, DispatchStatus: this.status }
Api.getEntryList(parme).then((res) => { Api.getEntryList(parme).then((res) => {
var savedUl = [] var savedUl = []
var pid
res.result.map((u) => { res.result.map((u) => {
if(u.pid){
pid = u.pid
}else{
pid = 0
}
let detailnew = { let detailnew = {
beginTime: u.beginTime,//开始时间 beginTime: u.beginTime,//开始时间
dispatchStatus: u.dispatchStatus,// dispatchStatus: u.dispatchStatus,//
...@@ -394,13 +458,27 @@ export default { ...@@ -394,13 +458,27 @@ export default {
routingHeaderId: u.routingHeaderId,// routingHeaderId: u.routingHeaderId,//
status: u.status,// status: u.status,//
userIds: u.userIds,// userIds: u.userIds,//
pid: 0, //拆分项id userNames: u.userNames,
pid: pid, //拆分项id
} }
savedUl.push(detailnew) savedUl.push(detailnew)
}) })
this.listTask = savedUl this.listTask = savedUl
}) })
}, },
// 数组去重
getArray(a) {
const hash = {}
const len = a.length
const result = []
for (let i = 0; i < len; i++) {
if (!hash[a[i]]) {
hash[a[i]] = true
result.push(a[i])
}
}
return result
},
// 时间改变方法 // 时间改变方法
handleChange(daterange) { handleChange(daterange) {
this.newList.map((u) => { this.newList.map((u) => {
...@@ -416,6 +494,7 @@ export default { ...@@ -416,6 +494,7 @@ export default {
}, },
// 过滤条件 // 过滤条件
changeStatus(a) { changeStatus(a) {
// console.log(a)
this.getUserInfoFn() this.getUserInfoFn()
}, },
// 打开抽屉 // 打开抽屉
...@@ -424,13 +503,6 @@ export default { ...@@ -424,13 +503,6 @@ export default {
let formData = this.listTask let formData = this.listTask
let timebegin = formData[0].beginTime let timebegin = formData[0].beginTime
let timend = formData[0].endTime let timend = formData[0].endTime
if (this.button2 == '设备') {
this.entity.taskTime = [timebegin,timend]
this.facilityModal = true
} else {
this.pentity.taskTime = [timebegin,timend]
this.manModal = true
}
this.newList = [] this.newList = []
chekids.forEach((v) => { chekids.forEach((v) => {
var item = formData.filter((u) => { var item = formData.filter((u) => {
...@@ -440,6 +512,21 @@ export default { ...@@ -440,6 +512,21 @@ export default {
this.newList.push(item[0]) this.newList.push(item[0])
} }
}) })
if (this.button2 == '设备') {
this.entity.taskTime = [timebegin,timend]
this.facilityModal = true
} else {
this.pentity.taskTime = [timebegin,timend]
if(formData.map(t=>{
this.newList.filter(m=>{
if(m.id = t.id){
console.log(m.checked)
}
})
})){
}
this.manModal = true
}
console.log('选中的数据', this.newList) console.log('选中的数据', this.newList)
}, },
// 设备派工 // 设备派工
...@@ -450,7 +537,6 @@ export default { ...@@ -450,7 +537,6 @@ export default {
u.remark = this.entity.remark u.remark = this.entity.remark
u.equipId = this.shebeiId u.equipId = this.shebeiId
}) })
// console.log(item)
this.$refs['formValidate'].validate((valid) => { this.$refs['formValidate'].validate((valid) => {
if(valid){ if(valid){
Api.saveTeamentry(item).then((res) => { Api.saveTeamentry(item).then((res) => {
...@@ -474,10 +560,13 @@ export default { ...@@ -474,10 +560,13 @@ export default {
u.userIds = this.peploeId u.userIds = this.peploeId
u.remark = this.pentity.remark u.remark = this.pentity.remark
}) })
// console.log(item)
this.$refs['formpepole'].validate((valid) => { this.$refs['formpepole'].validate((valid) => {
if(valid){ if(valid){
Api.saveTeamentry(item).then((res) => { let params = {
isDispatch: 1,//派工是1,保存是0
entryList: item
}
Api.saveTeamentry(params).then((res) => {
if (res.success) { if (res.success) {
this.$Message.success('人员派工成功。') this.$Message.success('人员派工成功。')
this.getUserInfoFn() this.getUserInfoFn()
...@@ -490,7 +579,6 @@ export default { ...@@ -490,7 +579,6 @@ export default {
this.$Message.error('校验不通过...') this.$Message.error('校验不通过...')
} }
}) })
}, },
// 拆分方法 // 拆分方法
setChai(item, index) { setChai(item, index) {
...@@ -502,18 +590,44 @@ export default { ...@@ -502,18 +590,44 @@ export default {
okChai() { okChai() {
var detail = this.$u.clone(this.listTask[this.rowIndex]) var detail = this.$u.clone(this.listTask[this.rowIndex])
this.listTask[this.rowIndex].quantity -= this.chaiNum this.listTask[this.rowIndex].quantity -= this.chaiNum
// detail.pid = this.$u.guid() detail.pid = detail.id
detail.pid = this.$u.guid() detail.id = 0
detail.quantity = this.chaiNum detail.quantity = this.chaiNum
this.listTask.splice(this.rowIndex + 1, 0, detail) this.listTask.splice(this.rowIndex + 1, 0, detail)
console.log("拆分后数据",this.listTask)
this.saveFameData()
this.getUserInfoFn()
},
// 拆分保存
saveFameData() {
let params = {
isDispatch: 0,//派工是1,保存是0
entryList: this.listTask
}
Api.saveTeamentry(params).then((res) => {
if (res.success) {
this.$Message.success('拆分成功。')
} else {
this.$Message.error('拆分失败...')
}
})
}, },
// 删除行 // 删除行
removeDetail(item, index) { removeDetail(item, index) {
let oldList = this.listTask; let delid = {id:item.id}
let clickRow = oldList.filter(listRow=>listRow.process_name===item.process_name)[0]; Api.deleteItem(delid).then((res) => {
clickRow.quantity += this.chaiNum if (res.success) {
this.listTask.splice(index, 1)
this.$Message.success('拆分项已删除。') this.$Message.success('拆分项已删除。')
this.getUserInfoFn()
} else {
this.$Message.error('拆分项删除失败!')
}
})
// let oldList = this.listTask;
// let clickRow = oldList.filter(listRow=>listRow.process_name===item.process_name)[0];
// clickRow.quantity += this.chaiNum
// this.listTask.splice(index, 1)
// this.$Message.success('拆分项已删除。')
}, },
cancle() {//取消 cancle() {//取消
this.facilityModal = false this.facilityModal = false
...@@ -534,6 +648,13 @@ export default { ...@@ -534,6 +648,13 @@ export default {
} }
return ids return ids
}, },
listOrder(){
let orders= this.$u.group(this.listTask,u=>{
return u.mesCode
})
console.warn("listOrder",orders)
return orders;
},
peploeId() { peploeId() {
let peploeId = [] let peploeId = []
this.listMan.map((u) => { this.listMan.map((u) => {
......
...@@ -34,11 +34,7 @@ ...@@ -34,11 +34,7 @@
<Row :gutter="16"> <Row :gutter="16">
<Col span="11"> <Col span="11">
<FormItem label="所属部门" prop="shop_name"> <FormItem label="所属部门" prop="shop_name">
<Input <Input v-model="formItem.shop_name" readonly placeholder="请选择..." style="width:327px">
v-model="formItem.shop_name"
readonly
placeholder="请选择..."
style="width:327px" >
<Button slot="append" @click="selectDepart">选择</Button> <Button slot="append" @click="selectDepart">选择</Button>
</Input> </Input>
</FormItem> </FormItem>
...@@ -50,20 +46,20 @@ ...@@ -50,20 +46,20 @@
</Col> </Col>
</Row> </Row>
<Row :gutter="16"> <Row :gutter="16">
<Col span="11"> <Col span="12">
<FormItem label="设备图片"> <FormItem label="设备图片">
<!-- <Upload multiple type="drag" action="//jsonplaceholder.typicode.com/posts/"> <!-- <Upload multiple type="drag" action="//jsonplaceholder.typicode.com/posts/">
<span>上传图片</span> <span>上传图片</span>
<Icon type="ios-cloud-upload" size="30" style="color: #3399ff"></Icon> <Icon type="ios-cloud-upload" size="30" style="color: #3399ff"></Icon>
</Upload> --> </Upload>-->
<inputFile ref="refqcFile" v-model="imgName" :parms="qcfileparms" files /> <inputFile ref="refqcFile" v-model="imgName" :parms="qcfileparms" files />
</FormItem> </FormItem>
</Col> </Col>
<Col span="11" offset="1"> <Col span="11" offset="1">
<FormItem label="是否关重" prop="isimportant"> <FormItem label="是否关重" prop="isimportant">
<Select v-model="isimportant"> <Select v-model="isimportant">
<Option :value="1" ></Option> <Option :value="1"></Option>
<Option :value="2" ></Option> <Option :value="2"></Option>
</Select> </Select>
</FormItem> </FormItem>
</Col> </Col>
...@@ -71,7 +67,12 @@ ...@@ -71,7 +67,12 @@
<Row :gutter="16"> <Row :gutter="16">
<Col span="11"> <Col span="11">
<FormItem label="能力系数"> <FormItem label="能力系数">
<InputNumber :min="0" v-model="formItem.capability_value" size="large" style="width:240px"></InputNumber> <InputNumber
:min="0"
v-model="formItem.capability_value"
size="large"
style="width:240px"
></InputNumber>
</FormItem> </FormItem>
</Col> </Col>
<Col span="11" offset="1"> <Col span="11" offset="1">
...@@ -80,6 +81,13 @@ ...@@ -80,6 +81,13 @@
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
<Row :gutter="16">
<Col :span="12">
<FormItem label="属性">
<Checkbox v-model="property">排产资源</Checkbox>
</FormItem>
</Col>
</Row>
</Form> </Form>
<div slot="footer"> <div slot="footer">
<!-- class="footers" --> <!-- class="footers" -->
...@@ -97,180 +105,194 @@ ...@@ -97,180 +105,194 @@
</template> </template>
<script> <script>
import Department from '@/components/modalTree/department.vue' import Department from "@/components/modalTree/department.vue";
import service from '@/plugins/request' import service from "@/plugins/request";
export default { export default {
components: { components: {
Department Department
}, },
name: '', name: "",
data() { data() {
return { return {
qcfileparms: 'app=newEquipment&eid=23&name=newEquipment', qcfileparms: "app=newEquipment&eid=23&name=newEquipment",
modalShow: false, modalShow: false,
showDeptTree: false, showDeptTree: false,
saveId:'', saveId: "",
title:'', title: "",
editId:'', editId: "",
data1:[], data1: [],
cityList:[], cityList: [],
imgName: '', imgName: "",
formItem: { formItem: {
equip_name: '', equip_name: "",
equip_id: '', equip_id: "",
equip_type: [], equip_type: [],
equip_pic: '', equip_pic: "",
equip_status: '', equip_status: "",
equip_ip: '', equip_ip: "",
shop_id: '', shop_id: "",
shop_name: '', shop_name: "",
isimportant:2, isimportant: 2,
location:'', location: "",
capability_value:1, capability_value: 1
}, },
isimportant:2, property: true,
isimportant: 2,
ruleValidate: { ruleValidate: {
equip_id: [ equip_id: [
{ {
required: true, required: true,
message: '设备编号不能为空!', message: "设备编号不能为空!",
trigger: 'blur' trigger: "blur"
} }
], ],
shop_name: [ shop_name: [
{ {
required: true, required: true,
message: '所属部门不能为空!', message: "所属部门不能为空!",
trigger: 'blur' trigger: "blur"
} }
] ]
} }
} };
}, },
created() { created() {
this.laodaction(); this.laodaction();
}, },
watch: { watch: {
imgName(newName, oldName) { imgName(newName, oldName) {
if (newName != '') { if (newName != "") {
const imgPathsArr = JSON.parse(newName) const imgPathsArr = JSON.parse(newName);
this.formItem.equip_pic = imgPathsArr[0].filePath this.formItem.equip_pic = imgPathsArr[0].filePath;
} }
} }
}, },
methods: { methods: {
selectDepart() { selectDepart() {
this.showDeptTree = true this.showDeptTree = true;
}, },
laodaction(){ laodaction() {
let url = `${systemUrl}/equiptype/getpaged`, let url = `${systemUrl}/equiptype/getpaged`,
that = this; that = this;
service.get(`${url}`, ).then(res => { service.get(`${url}`).then(res => {
let selectdata = res.result.items; let selectdata = res.result.items;
// console.log(selectdata) // console.log(selectdata)
selectdata.forEach(item => { selectdata.forEach(item => {
that.cityList.push({ that.cityList.push({
value: item.equip_type_name, value: item.equip_type_name,
label: item.equip_type_name, label: item.equip_type_name,
id: item.id, id: item.id
}) });
// console.log(that.cityList) // console.log(that.cityList)
}); });
}); });
}, },
preservation() {}, preservation() {},
close() { close() {
this.modalShow = false this.modalShow = false;
}, },
// 添加/编辑 弹框的保存 // 添加/编辑 弹框的保存
saveOk(){ saveOk() {
if (!this.formItem.equip_id) { if (!this.formItem.equip_id) {
this.$Message.error('设备编号不能为空!') this.$Message.error("设备编号不能为空!");
return return;
} }
if (!this.formItem.shop_name) { if (!this.formItem.shop_name) {
this.$Message.error('所属部门不能为空!') this.$Message.error("所属部门不能为空!");
return return;
} }
let saveId = this.editId, let saveId = this.editId,
url = `${systemUrl}/equipinfo/createorupdate`; url = `${systemUrl}/equipinfo/createorupdate`;
// console.log(saveId); // console.log(saveId);
if(!saveId){ saveId == "" } if (!saveId) {
if(this.title == '编辑设备'){ saveId == "";
}
if (this.title == "编辑设备") {
//this.$Message.success(saveId); //this.$Message.success(saveId);
// if(this.formItem.selectName){ // if(this.formItem.selectName){
let arr=this.formItem.equip_type; let arr = this.formItem.equip_type;
let str=arr.join(','); let str = arr.join(",");
let url = `${systemUrl}/equipinfo/createorupdate`; let url = `${systemUrl}/equipinfo/createorupdate`;
var ar1 = this.data1.find((val) => { var ar1 = this.data1.find(val => {
if(val.id!=saveId) if (val.id != saveId) return val.equip_id == this.formItem.equip_id;
return val.equip_id == this.formItem.equip_id });
})
if (ar1) { if (ar1) {
this.$Message.error('设备编号已存在!'); this.$Message.error("设备编号已存在!");
return return;
}
if (this.property == true) {
this.property = 2;
} else {
this.property = "";
} }
let paramsdata = { let paramsdata = {
"id": saveId, id: saveId,
"equip_id": this.formItem.equip_id, equip_id: this.formItem.equip_id,
"equip_name": this.formItem.equip_name, equip_name: this.formItem.equip_name,
"equip_status": this.formItem.equip_status, equip_status: this.formItem.equip_status,
"equip_pic": this.formItem.equip_pic, equip_pic: this.formItem.equip_pic,
"equip_ip": this.formItem.equip_ip, equip_ip: this.formItem.equip_ip,
"shop_id": this.formItem.shop_id, shop_id: this.formItem.shop_id,
"eqstyle": str, eqstyle: str,
"isimportant":this.isimportant, isimportant: this.isimportant,
"location":this.formItem.location, location: this.formItem.location,
"capability_value":this.formItem.capability_value, capability_value: this.formItem.capability_value,
property: this.property
}; };
// console.log(paramsdata); // console.log(paramsdata);
service.post(`${url}`, {equipInfo: paramsdata}).then(res=>{ service.post(`${url}`, { equipInfo: paramsdata }).then(res => {
if(res.success) { if (res.success) {
this.$emit('getMessage'); this.$emit("getMessage");
this.modalShow=false; this.modalShow = false;
this.$Message.success('编辑成功'); this.$Message.success("编辑成功");
} }
}); });
// } // }
} }
if(this.title == '新增设备'){ if (this.title == "新增设备") {
let arr=this.formItem.equip_type; let arr = this.formItem.equip_type;
let str=arr.join(','); let str = arr.join(",");
//console.log(str); //console.log(str);
let url = `${systemUrl}/equipinfo/createorupdate`; let url = `${systemUrl}/equipinfo/createorupdate`;
var ar = this.data1.find((val) => { var ar = this.data1.find(val => {
return val.equip_id == this.formItem.equip_id return val.equip_id == this.formItem.equip_id;
}) });
if (ar ) { if (ar) {
this.$Message.error('设备编号已存在!'); this.$Message.error("设备编号已存在!");
return return;
} }
let paramsdata = {
"id": this.saveId,
"equip_id": this.formItem.equip_id,
"equip_name": this.formItem.equip_name,
"equip_status": this.formItem.equip_status,
"equip_pic": this.formItem.equip_pic,
"equip_ip": this.formItem.equip_ip,
"shop_id": this.formItem.shop_id,
"eqstyle": str,
"isimportant":this.isimportant,
"location":this.formItem.location,
"capability_value":this.formItem.capability_value,
if (this.property == true) {
this.property = 2;
} else {
this.property = "";
}
let paramsdata = {
id: this.saveId,
equip_id: this.formItem.equip_id,
equip_name: this.formItem.equip_name,
equip_status: this.formItem.equip_status,
equip_pic: this.formItem.equip_pic,
equip_ip: this.formItem.equip_ip,
shop_id: this.formItem.shop_id,
eqstyle: str,
isimportant: this.isimportant,
location: this.formItem.location,
capability_value: this.formItem.capability_value,
property: this.property
}; };
//console.log(this.formItem.equip_type); //console.log(this.formItem.equip_type);
service.post(`${url}`, {equipInfo: paramsdata}).then(res=>{ service.post(`${url}`, { equipInfo: paramsdata }).then(res => {
if(res.success) { if (res.success) {
this.$emit('getMessage'); this.$emit("getMessage");
this.modalShow=false; this.modalShow = false;
this.$Message.success('新增成功') this.$Message.success("新增成功");
} }
}); });
} }
},
} }
} }
};
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
clearable clearable
style="width:235px;flaot:left;" style="width:235px;flaot:left;"
/> />
<Button type="primary" class="" @click="easySearch">查询</Button> <Button type="primary" class @click="easySearch">查询</Button>
<!-- <Button @click="advancedSearch" type="success" style="margin-left:8px;">高级搜索</Button> --> <!-- <Button @click="advancedSearch" type="success" style="margin-left:8px;">高级搜索</Button> -->
</Col> </Col>
<Col span="12" style=" text-align: right;"> <Col span="12" style=" text-align: right;">
...@@ -371,106 +371,106 @@ ...@@ -371,106 +371,106 @@
ok-text="确定" ok-text="确定"
cancel-text="取消" cancel-text="取消"
@on-ok="deleOk" @on-ok="deleOk"
>此操作将永久删除该数据, 是否继续?</Modal> --> >此操作将永久删除该数据, 是否继续?</Modal>-->
</div> </div>
</template> </template>
<script> <script>
import TreeType from './components/treeType.vue' //左侧树列表 import TreeType from "./components/treeType.vue"; //左侧树列表
import NewEquipment from './components/newEquipment.vue' //新增设备弹框 import NewEquipment from "./components/newEquipment.vue"; //新增设备弹框
import service from '@/plugins/request' import service from "@/plugins/request";
export default { export default {
components: { components: {
TreeType, TreeType,
NewEquipment NewEquipment
}, },
name: '', name: "",
data() { data() {
return { return {
downUrl: fileUrlDown, downUrl: fileUrlDown,
fileUrlPath: '', fileUrlPath: "",
ruleValidate:{}, ruleValidate: {},
tbHeight: '', tbHeight: "",
total: 0, total: 0,
page: 1, page: 1,
pageSize: 10, pageSize: 10,
shopid: '', shopid: "",
treeData: [], treeData: [],
treeHeight: '', treeHeight: "",
treeInputSearch: '', treeInputSearch: "",
loading: false, loading: false,
seleId: 0, seleId: 0,
eid: '', eid: "",
eid1: '', eid1: "",
ptimes: '', ptimes: "",
ptimee: '', ptimee: "",
atimes: '', atimes: "",
atimee: '', atimee: "",
inputtime: '', inputtime: "",
mainstatus: '', mainstatus: "",
failurenotes: '', failurenotes: "",
etype: '', etype: "",
eqid: '', eqid: "",
eqname: '', eqname: "",
borw: '', borw: "",
show: false, show: false,
show2: false, show2: false,
show3: false, show3: false,
show4: false, show4: false,
show5: false, show5: false,
show6: false, show6: false,
title: '新增设备', title: "新增设备",
title1: '设备维修', title1: "设备维修",
title2: '设备保养', title2: "设备保养",
editId: '', editId: "",
typepk: [], typepk: [],
value1: '', value1: "",
formItemMain: { formItemMain: {
equip_name: '', equip_name: "",
equip_pk: '', equip_pk: "",
equip_down_type: '', equip_down_type: "",
plan_start: '', plan_start: "",
plan_finish: '', plan_finish: "",
input_time: '', input_time: "",
notes: '' notes: ""
}, },
formItemMain1: { formItemMain1: {
equip_name: '', equip_name: "",
equip_pk: '', equip_pk: "",
equip_down_type: '', equip_down_type: "",
plan_start: '', plan_start: "",
plan_finish: '', plan_finish: "",
actual_start: '', actual_start: "",
actual_finish: '', actual_finish: "",
failure_notes: '', failure_notes: "",
status: '' status: ""
}, },
sysdata: [ sysdata: [
{ {
value: '月度保养', value: "月度保养",
label: '月度保养' label: "月度保养"
}, },
{ {
value: '季度保养', value: "季度保养",
label: '季度保养' label: "季度保养"
}, },
{ {
value: '精度检查', value: "精度检查",
label: '精度检查' label: "精度检查"
}, },
{ {
value: '常规保养', value: "常规保养",
label: '常规保养' label: "常规保养"
} }
], ],
sysdata1: [ sysdata1: [
{ {
value: '维护中', value: "维护中",
label: '维护中' label: "维护中"
}, },
{ {
value: '完成', value: "完成",
label: '维护完成' label: "维护完成"
} }
], ],
column: [ column: [
...@@ -480,82 +480,82 @@ export default { ...@@ -480,82 +480,82 @@ export default {
// align: 'center' // align: 'center'
// }, // },
{ {
type: 'index', type: "index",
width: 60, width: 60,
align: 'center' align: "center"
}, },
{ {
title: '设备名称', title: "设备名称",
key: 'equip_name' key: "equip_name"
}, },
{ {
title: '设备编号', title: "设备编号",
key: 'equip_id' key: "equip_id"
}, },
{ {
title: '设备类型', title: "设备类型",
key: 'type_name' key: "type_name"
}, },
{ {
title: '设备图片', title: "设备图片",
key: 'equip_pic', key: "equip_pic",
render: (h, params) => { render: (h, params) => {
return h('div', { class: 'action' }, [ return h("div", { class: "action" }, [
h( h(
'a', "a",
{ {
attrs: { attrs: {
oprate: 'detail', oprate: "detail",
href: this.fileUrlPath, href: this.fileUrlPath,
target: '_blank' target: "_blank"
}, },
on: { on: {
click: () => { click: () => {
this.downFile(params) this.downFile(params);
} }
} }
}, },
'查看图片' "查看图片"
), )
]) ]);
} }
}, },
{ {
title: '设备状态', title: "设备状态",
key: 'equip_status' key: "equip_status"
}, },
{ {
title: '设备IP', title: "设备IP",
key: 'equip_ip' key: "equip_ip"
}, },
{ {
title: '所属部门', title: "所属部门",
key: 'shop_name' key: "shop_name"
}, },
{ {
title: '是否关重', title: "是否关重",
key: 'isimportant', key: "isimportant",
render: (h,params) => { render: (h, params) => {
let statuse = params.row.isimportant let statuse = params.row.isimportant;
let text = statuse == 1 ? '是' : (statuse==2? '否':'') let text = statuse == 1 ? "是" : statuse == 2 ? "否" : "";
return h('span',{},text) return h("span", {}, text);
} }
}, },
{ {
title: '位置', title: "位置",
key: 'location' key: "location"
}, },
{ {
title: '能力系数', title: "能力系数",
key: 'capability_value' key: "capability_value"
}, },
{ {
title: '操作', title: "操作",
key: 'action', key: "action",
align: 'center', align: "center",
width: 280, width: 280,
render: (h, params) => { render: (h, params) => {
return h('div', { class: 'action' },[ return h("div", { class: "action" }, [
// h( // h(
// 'op', // 'op',
// { // {
...@@ -569,66 +569,66 @@ export default { ...@@ -569,66 +569,66 @@ export default {
// '查看' // '查看'
// ), // ),
h( h(
'op', "op",
{ {
attrs:{ attrs: {
oprate:'detail', oprate: "detail",
class:'edit' class: "edit"
}, },
on: { on: {
click: () => { click: () => {
this.edit(params) this.edit(params);
} }
} }
}, },
'编辑' "编辑"
), ),
h( h(
'op', "op",
{ {
attrs:{ attrs: {
oprate:'delete' oprate: "delete"
}, },
style: { style: {
color: 'red', color: "red"
}, },
on: { on: {
click: () => { click: () => {
this.del(params) this.del(params);
} }
} }
}, },
'删除' "删除"
), ),
h( h(
'op', "op",
{ {
attrs:{ attrs: {
oprate:'detail' oprate: "detail"
}, },
on: { on: {
click: () => { click: () => {
this.Main(params) this.Main(params);
} }
} }
}, },
'保养' "保养"
), ),
h( h(
'op', "op",
{ {
attrs:{ attrs: {
oprate:'detail' oprate: "detail"
}, },
on: { on: {
click: () => { click: () => {
this.Main1(params) this.Main1(params);
} }
} }
}, },
'维修' "维修"
) )
]) ]);
} }
} }
], ],
...@@ -639,85 +639,85 @@ export default { ...@@ -639,85 +639,85 @@ export default {
// align: 'center' // align: 'center'
// }, // },
{ {
title: '维护状态', title: "维护状态",
key: 'status' key: "status"
}, },
{ {
title: '计划人', title: "计划人",
key: 'input_name' key: "input_name"
}, },
{ {
title: '报修时间', title: "报修时间",
key: 'input_time' key: "input_time"
}, },
{ {
title: '保养人', title: "保养人",
key: 'maintain_name' key: "maintain_name"
}, },
{ {
title: '计划开始时间', title: "计划开始时间",
key: 'plan_start' key: "plan_start"
}, },
{ {
title: '计划完成时间', title: "计划完成时间",
key: 'plan_finish' key: "plan_finish"
}, },
{ {
title: '实际开始时间', title: "实际开始时间",
key: 'actual_start' key: "actual_start"
}, },
{ {
title: '实际结束时间', title: "实际结束时间",
key: 'actual_finish' key: "actual_finish"
}, },
{ {
title: '维保类型', title: "维保类型",
key: 'equip_down_type' key: "equip_down_type"
} }
], ],
datatable1: [], datatable1: [],
datatable: [ datatable: [
{ {
name: '3D打印机', name: "3D打印机",
name1: 'EOS M290', name1: "EOS M290",
name2: 'New York No. 1 Lake Park', name2: "New York No. 1 Lake Park",
name3: '2016-10-03', name3: "2016-10-03",
name4: '正常', name4: "正常",
name5: '102.10.0.80', name5: "102.10.0.80",
name6: '车间1', name6: "车间1",
name7: '' name7: ""
}, },
{ {
name: '3D打印机', name: "3D打印机",
name1: 'EOS M290', name1: "EOS M290",
name2: 'New York No. 1 Lake Park', name2: "New York No. 1 Lake Park",
name3: '2016-10-03', name3: "2016-10-03",
name4: '正常', name4: "正常",
name5: '102.10.0.80', name5: "102.10.0.80",
name6: '车间1', name6: "车间1",
name7: '' name7: ""
}, },
{ {
name: '3D打印机', name: "3D打印机",
name1: 'EOS M290', name1: "EOS M290",
name2: 'New York No. 1 Lake Park', name2: "New York No. 1 Lake Park",
name3: '2016-10-03', name3: "2016-10-03",
name4: '正常', name4: "正常",
name5: '102.10.0.80', name5: "102.10.0.80",
name6: '车间1', name6: "车间1",
name7: '' name7: ""
} }
], ],
page: 1 //当前页 整形 选填 默认1 page: 1 //当前页 整形 选填 默认1
} };
}, },
created() { created() {
this.laodaction() this.laodaction();
this.treeHeight = window.innerHeight-140 this.treeHeight = window.innerHeight - 140;
this.tbHeight = window.innerHeight - 250 this.tbHeight = window.innerHeight - 250;
}, },
mounted() { mounted() {
this.initTree() this.initTree();
window.onresize = () => { window.onresize = () => {
///浏览器窗口大小变化 ///浏览器窗口大小变化
return (() => { return (() => {
...@@ -729,60 +729,60 @@ export default { ...@@ -729,60 +729,60 @@ export default {
}, },
methods: { methods: {
initTree() { initTree() {
this.$http.department.getDepartmentTree(this.treeData) this.$http.department.getDepartmentTree(this.treeData);
}, },
//搜索查询 //搜索查询
easySearch() { easySearch() {
this.page = 1 this.page = 1;
this.pageSize = 10 this.pageSize = 10;
this.laodaction() this.laodaction();
}, },
handleChange(date) { handleChange(date) {
this.formItemMain.plan_start = date this.formItemMain.plan_start = date;
}, },
handleChange1(date) { handleChange1(date) {
this.formItemMain.plan_finish = date this.formItemMain.plan_finish = date;
}, },
handleChange2(date) { handleChange2(date) {
this.formItemMain.input_time = date this.formItemMain.input_time = date;
}, },
handleChange3(date) { handleChange3(date) {
this.formItemMain1.plan_start = date this.formItemMain1.plan_start = date;
}, },
handleChange4(date) { handleChange4(date) {
this.formItemMain1.plan_finish = date this.formItemMain1.plan_finish = date;
}, },
handleChange5(date) { handleChange5(date) {
this.formItemMain1.actual_start = date this.formItemMain1.actual_start = date;
}, },
handleChange6(date) { handleChange6(date) {
this.formItemMain1.actual_finish = date this.formItemMain1.actual_finish = date;
}, },
handleChange7(date) { handleChange7(date) {
this.formItemMain1.plan_start = date this.formItemMain1.plan_start = date;
}, },
handleChange8(date) { handleChange8(date) {
this.formItemMain1.plan_finish = date this.formItemMain1.plan_finish = date;
}, },
handleChange9(date) { handleChange9(date) {
this.formItemMain1.actual_start = date this.formItemMain1.actual_start = date;
}, },
handleChange10(date) { handleChange10(date) {
this.formItemMain1.actual_finish = date this.formItemMain1.actual_finish = date;
}, },
laodaction() { laodaction() {
let url = `${systemUrl}/equipinfo/getpaged` let url = `${systemUrl}/equipinfo/getpaged`;
service service
.get(`${url}`,{ .get(`${url}`, {
equip_name: this.value1, equip_name: this.value1,
shopid: this.shopid, shopid: this.shopid,
pageindex: this.page, pageindex: this.page,
pageSize: this.pageSize pageSize: this.pageSize
}) })
.then((res) => { .then(res => {
this.datatable = res.result.items this.datatable = res.result.items;
this.total = res.result.totalCount this.total = res.result.totalCount;
}) });
}, },
//高级搜索 //高级搜索
advancedSearch() { advancedSearch() {
...@@ -790,88 +790,89 @@ export default { ...@@ -790,88 +790,89 @@ export default {
}, },
//设备保养 //设备保养
newMain() { newMain() {
if (this.eid == '') { if (this.eid == "") {
this.$Message.error('请选择设备!') this.$Message.error("请选择设备!");
return return;
} }
this.formItemMain.equip_pk = this.eqid this.formItemMain.equip_pk = this.eqid;
this.formItemMain.equip_name = this.eqname this.formItemMain.equip_name = this.eqname;
this.show = true this.show = true;
}, },
newMain1() { newMain1() {
if (this.eid == '') { if (this.eid == "") {
this.$Message.error('请选择设备!') this.$Message.error("请选择设备!");
return return;
} }
this.formItemMain.equip_pk = this.eqid this.formItemMain.equip_pk = this.eqid;
this.formItemMain.equip_name = this.eqname this.formItemMain.equip_name = this.eqname;
this.show5 = true this.show5 = true;
}, },
//新增设备 //新增设备
newEquipment() { newEquipment() {
this.$refs.equipment.modalShow = true this.$refs.equipment.property = true;
this.$refs.equipment.title = '新增设备' this.$refs.equipment.modalShow = true;
this.$refs.equipment.data1 = this.datatable this.$refs.equipment.title = "新增设备";
this.$refs.equipment.$refs.refqcFile.newName= '' this.$refs.equipment.data1 = this.datatable;
this.$refs.equipment.isimportant= 2 this.$refs.equipment.$refs.refqcFile.newName = "";
this.$refs.equipment.isimportant = 2;
//this.$refs.equipment.refqcFile.newName = '' //this.$refs.equipment.refqcFile.newName = ''
this.$refs.equipment.formItem = { this.$refs.equipment.formItem = {
equip_name: '', equip_name: "",
equip_id: '', equip_id: "",
equip_type: [], equip_type: [],
equip_pic: '', equip_pic: "",
equip_status: '', equip_status: "",
equip_ip: '', equip_ip: "",
shop_id: '', shop_id: "",
shop_name: '', shop_name: "",
isimportant:2, isimportant: 2,
location:'', location: "",
capability_value:1, capability_value: 1
} };
}, },
// 删除 // 删除
deleted() { deleted() {
this.$Modal.confirm({ this.$Modal.confirm({
title: '删除', title: "删除",
content: '<p>您确定要删除此设备吗</p>', content: "<p>您确定要删除此设备吗</p>",
onOk: () => { onOk: () => {
this.$Message.info('删除成功') this.$Message.info("删除成功");
}, },
onCancel: () => { onCancel: () => {
this.$Message.info('已取消') this.$Message.info("已取消");
} }
}) });
}, },
// 分页 // 分页
pageChange(num) { pageChange(num) {
//console.log(num); //console.log(num);
this.page = num this.page = num;
this.laodaction() this.laodaction();
}, },
pageSizeChange(limit) { pageSizeChange(limit) {
//console.log(limit) //console.log(limit)
this.pageSize = limit this.pageSize = limit;
this.laodaction() this.laodaction();
}, },
selectionData(row) { selectionData(row) {
console.log(row) console.log(row);
}, },
selectionRow(currentRow, oldCurrentRow) { selectionRow(currentRow, oldCurrentRow) {
this.eqid = currentRow.equip_id this.eqid = currentRow.equip_id;
this.eqname = currentRow.equip_name this.eqname = currentRow.equip_name;
this.eid = currentRow.id this.eid = currentRow.id;
}, },
selectionRow1(currentRow, oldCurrentRow) { selectionRow1(currentRow, oldCurrentRow) {
this.ptimes = currentRow.plan_start this.ptimes = currentRow.plan_start;
this.ptimee = currentRow.plan_finish this.ptimee = currentRow.plan_finish;
this.atimes = currentRow.actual_start this.atimes = currentRow.actual_start;
this.atimee = currentRow.actual_finish this.atimee = currentRow.actual_finish;
this.inputtime = currentRow.input_time this.inputtime = currentRow.input_time;
this.etype = currentRow.equip_down_type this.etype = currentRow.equip_down_type;
this.mainstatus = currentRow.status this.mainstatus = currentRow.status;
this.eid1 = currentRow.id this.eid1 = currentRow.id;
this.failurenotes = currentRow.failure_notes this.failurenotes = currentRow.failure_notes;
this.borw = currentRow.maintain_type this.borw = currentRow.maintain_type;
}, },
saveOk() { saveOk() {
// if(this.formItemMain.plan_start=='') // if(this.formItemMain.plan_start=='')
...@@ -887,38 +888,36 @@ export default { ...@@ -887,38 +888,36 @@ export default {
// console.log(str); // console.log(str);
// console.log(this.formItemMain.plan_start); // console.log(this.formItemMain.plan_start);
// return; // return;
let url = `${systemUrl}/equipmaintainplan/createorupdate` let url = `${systemUrl}/equipmaintainplan/createorupdate`;
let paramsdata = { let paramsdata = {
id: '', id: "",
equip_pk: this.eid, equip_pk: this.eid,
equip_down_type: this.formItemMain.equip_down_type, equip_down_type: this.formItemMain.equip_down_type,
plan_start: this.formItemMain.plan_start, plan_start: this.formItemMain.plan_start,
plan_finish: this.formItemMain.plan_finish, plan_finish: this.formItemMain.plan_finish,
maintain_type: '1' maintain_type: "1"
} };
console.log(paramsdata) console.log(paramsdata);
service service.post(`${url}`, { equipMaintainPlan: paramsdata }).then(res => {
.post(`${url}`, { equipMaintainPlan: paramsdata })
.then((res) => {
if (res.success) { if (res.success) {
this.changestatus(this.eid) this.changestatus(this.eid);
this.show = false this.show = false;
setTimeout(() => { setTimeout(() => {
this.laodaction() this.laodaction();
}, 1000) }, 1000);
this.$Message.success('新增成功') this.$Message.success("新增成功");
} }
}) });
}, },
downFile(path) { downFile(path) {
console.log(path) console.log(path);
var path1 = path.row.equip_pic var path1 = path.row.equip_pic;
if (path1 != '') { if (path1 != "") {
this.fileUrlPath = this.downUrl + path1 this.fileUrlPath = this.downUrl + path1;
} else { } else {
this.fileUrlPath = 'javascript:void(0)' this.fileUrlPath = "javascript:void(0)";
this.$Message.error('无图片') this.$Message.error("无图片");
return return;
} }
}, },
saveOk1() { saveOk1() {
...@@ -929,38 +928,36 @@ export default { ...@@ -929,38 +928,36 @@ export default {
// return; // return;
// } // }
let url = `${systemUrl}/equipmaintainplan/createorupdate` let url = `${systemUrl}/equipmaintainplan/createorupdate`;
let paramsdata = { let paramsdata = {
id: '', id: "",
equip_pk: this.eid, equip_pk: this.eid,
notes: this.formItemMain.notes, notes: this.formItemMain.notes,
input_time: this.formItemMain.input_time, input_time: this.formItemMain.input_time,
equip_down_type: '设备故障', equip_down_type: "设备故障",
maintain_type: '2' maintain_type: "2"
} };
console.log(paramsdata) console.log(paramsdata);
service service.post(`${url}`, { equipMaintainPlan: paramsdata }).then(res => {
.post(`${url}`, { equipMaintainPlan: paramsdata })
.then((res) => {
if (res.success) { if (res.success) {
this.changestatus(this.eid) this.changestatus(this.eid);
this.show = false this.show = false;
setTimeout(() => { setTimeout(() => {
this.laodaction() this.laodaction();
}, 1000) }, 1000);
this.$Message.success('新增成功') this.$Message.success("新增成功");
} }
}) });
}, },
edit(data) { edit(data) {
this.$refs.equipment.$refs.refqcFile.newName= data.row.equip_pic this.$refs.equipment.$refs.refqcFile.newName = data.row.equip_pic;
this.$refs.equipment.data1 = this.datatable this.$refs.equipment.data1 = this.datatable;
let url = `${systemUrl}/equipbelongtype/getbyid` let url = `${systemUrl}/equipbelongtype/getbyid`;
service.get(`${url}`, { Id: data.row.id }).then((res) => { service.get(`${url}`, { Id: data.row.id }).then(res => {
console.log(data) console.log(data);
this.typepk = res.result this.typepk = res.result;
this.$refs.equipment.title = '编辑设备' this.$refs.equipment.title = "编辑设备";
this.$refs.equipment.modalShow = true this.$refs.equipment.modalShow = true;
this.$refs.equipment.formItem = { this.$refs.equipment.formItem = {
equip_name: data.row.equip_name, equip_name: data.row.equip_name,
equip_id: data.row.equip_id, equip_id: data.row.equip_id,
...@@ -970,109 +967,112 @@ export default { ...@@ -970,109 +967,112 @@ export default {
equip_ip: data.row.equip_ip, equip_ip: data.row.equip_ip,
shop_id: data.row.shop_id, shop_id: data.row.shop_id,
shop_name: data.row.shop_name, shop_name: data.row.shop_name,
isimportant:data.row.isimportant, isimportant: data.row.isimportant,
location:data.row.location, location: data.row.location,
capability_value:data.row.capability_value, capability_value: data.row.capability_value
};
if (data.row.property == 2) {
this.$refs.equipment.property = true;
} else {
this.$refs.equipment.property = false;
} }
this.$refs.equipment.isimportant = data.row.isimportant this.$refs.equipment.isimportant = data.row.isimportant;
this.$refs.equipment.editId = data.row.id this.$refs.equipment.editId = data.row.id;
}) });
}, },
del(data) { del(data) {
this.seleId = data.row.id this.seleId = data.row.id;
let url = `${systemUrl}/equipinfo/delete`, let url = `${systemUrl}/equipinfo/delete`,
uId = this.seleId uId = this.seleId;
service service.delete(`${systemUrl}/equipinfo/delete?id=${uId}`).then(res => {
.delete(`${systemUrl}/equipinfo/delete?id=${uId}`)
.then((res) => {
if (res.success) { if (res.success) {
this.laodaction() this.laodaction();
this.$Message.success('删除成功') this.$Message.success("删除成功");
} }
}) });
}, },
Main(data) { Main(data) {
this.eid1 = '' this.eid1 = "";
this.seleId = data.row.id this.seleId = data.row.id;
let url = `${systemUrl}/equipmaintainplan/getpaged` let url = `${systemUrl}/equipmaintainplan/getpaged`;
service service
.get(`${url}`,{ equipid: this.seleId, maintain_type: '1' }) .get(`${url}`, { equipid: this.seleId, maintain_type: "1" })
.then((res) => { .then(res => {
//console.log(res) //console.log(res)
this.datatable1 = res.result.items this.datatable1 = res.result.items;
if (this.datatable1.length == 0) { if (this.datatable1.length == 0) {
this.$Message.error('该设备没有保养数据!') this.$Message.error("该设备没有保养数据!");
this.show3 = false this.show3 = false;
return return;
} }
this.show3 = true this.show3 = true;
}) });
console.log(this.datatable1) console.log(this.datatable1);
}, },
Main1(data) { Main1(data) {
this.eid1 = '' this.eid1 = "";
this.seleId = data.row.id this.seleId = data.row.id;
let url = `${systemUrl}/equipmaintainplan/getpaged` let url = `${systemUrl}/equipmaintainplan/getpaged`;
service service
.get(`${url}`, { equipid: this.seleId, maintain_type: '2' }) .get(`${url}`, { equipid: this.seleId, maintain_type: "2" })
.then((res) => { .then(res => {
//console.log(res) //console.log(res)
this.datatable1 = res.result.items this.datatable1 = res.result.items;
if (this.datatable1.length == 0) { if (this.datatable1.length == 0) {
this.$Message.error('该设备没有维修数据!') this.$Message.error("该设备没有维修数据!");
this.show3 = false this.show3 = false;
return return;
} }
this.show3 = true this.show3 = true;
}) });
}, },
loadmain(id) { loadmain(id) {
let url = `${systemUrl}/equipmaintainplan/getpaged` let url = `${systemUrl}/equipmaintainplan/getpaged`;
service service
.get(`${url}`,{ equipid: id, maintain_type: this.borw }) .get(`${url}`, { equipid: id, maintain_type: this.borw })
.then((res) => { .then(res => {
//console.log(res) //console.log(res)
this.datatable1 = res.result.items this.datatable1 = res.result.items;
}) });
}, },
changestatus(id) { changestatus(id) {
let url = `${systemUrl}/equipmaintainplan/changestatus` let url = `${systemUrl}/equipmaintainplan/changestatus`;
service.post(`${url}`, { equipid: id }).then((res) => { service.post(`${url}`, { equipid: id }).then(res => {
//console.log(res) //console.log(res)
}) });
}, },
newMainBack() { newMainBack() {
if (this.eid1 == '') { if (this.eid1 == "") {
this.$Message.error('请选择维保任务!') this.$Message.error("请选择维保任务!");
return return;
} }
if (this.mainstatus == '完成') { if (this.mainstatus == "完成") {
this.$Message.error('该维保任务已完成!') this.$Message.error("该维保任务已完成!");
return return;
} }
if (this.borw == '1') { if (this.borw == "1") {
this.show4 = true this.show4 = true;
this.formItemMain1.plan_start = this.ptimes this.formItemMain1.plan_start = this.ptimes;
this.formItemMain1.plan_finish = this.ptimee this.formItemMain1.plan_finish = this.ptimee;
this.formItemMain1.actual_start = this.atimes this.formItemMain1.actual_start = this.atimes;
this.formItemMain1.actual_finish = this.atimee this.formItemMain1.actual_finish = this.atimee;
this.formItemMain1.failure_notes = this.failurenotes this.formItemMain1.failure_notes = this.failurenotes;
} }
if (this.borw == '2') { if (this.borw == "2") {
this.show6 = true this.show6 = true;
this.formItemMain1.plan_start = this.ptimes this.formItemMain1.plan_start = this.ptimes;
this.formItemMain1.plan_finish = this.ptimee this.formItemMain1.plan_finish = this.ptimee;
this.formItemMain1.actual_start = this.atimes this.formItemMain1.actual_start = this.atimes;
this.formItemMain1.actual_finish = this.atimee this.formItemMain1.actual_finish = this.atimee;
this.formItemMain1.failure_notes = this.failurenotes this.formItemMain1.failure_notes = this.failurenotes;
} }
console.log(this.formItemMain1.plan_start) console.log(this.formItemMain1.plan_start);
}, },
saveOkBack() { saveOkBack() {
// console.log(str); // console.log(str);
let url = `${systemUrl}/equipmaintainplan/createorupdate` let url = `${systemUrl}/equipmaintainplan/createorupdate`;
let paramsdata = { let paramsdata = {
id: this.eid1, id: this.eid1,
equip_pk: this.eid, equip_pk: this.eid,
...@@ -1085,29 +1085,27 @@ export default { ...@@ -1085,29 +1085,27 @@ export default {
input_time: this.inputtime, input_time: this.inputtime,
maintain_type: this.borw, maintain_type: this.borw,
status: this.formItemMain1.status status: this.formItemMain1.status
} };
console.log(paramsdata) console.log(paramsdata);
service service.post(`${url}`, { equipMaintainPlan: paramsdata }).then(res => {
.post(`${url}`, { equipMaintainPlan: paramsdata })
.then((res) => {
if (res.success) { if (res.success) {
this.changestatus(this.eid) this.changestatus(this.eid);
this.loadmain(this.eid) this.loadmain(this.eid);
setTimeout(() => { setTimeout(() => {
this.laodaction() this.laodaction();
}, 1000) }, 1000);
this.eid1 = '' this.eid1 = "";
this.show4 = false this.show4 = false;
this.$Message.success('更新成功') this.$Message.success("更新成功");
} }
}) });
}, },
selectTreeNode(value) { selectTreeNode(value) {
if (value != '') { if (value != "") {
this.shopid = value[0].value this.shopid = value[0].value;
this.page = 1 this.page = 1;
this.pageSize = 10 this.pageSize = 10;
this.laodaction() this.laodaction();
} }
// if (value != "") { // if (value != "") {
// this.searchObj.departmentId = null // this.searchObj.departmentId = null
...@@ -1119,27 +1117,27 @@ export default { ...@@ -1119,27 +1117,27 @@ export default {
}, },
computed: { computed: {
searchList() { searchList() {
let nodeList = this.treeData let nodeList = this.treeData;
var text = this.treeInputSearch var text = this.treeInputSearch;
var newNodeList = [] var newNodeList = [];
function searchTree(nodeLists, value) { function searchTree(nodeLists, value) {
for (let i = 0; i < nodeLists.length; i++) { for (let i = 0; i < nodeLists.length; i++) {
if (nodeLists[i].title.indexOf(value) != -1) { if (nodeLists[i].title.indexOf(value) != -1) {
newNodeList.push(nodeLists[i]) newNodeList.push(nodeLists[i]);
} else if (nodeLists[i].children.length > 0) { } else if (nodeLists[i].children.length > 0) {
searchTree(nodeLists[i].children, value) searchTree(nodeLists[i].children, value);
} }
} }
} }
if (text != '') { if (text != "") {
searchTree(nodeList, text) searchTree(nodeList, text);
} else { } else {
return nodeList return nodeList;
} }
return newNodeList return newNodeList;
} }
} }
} };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
......
// import Api from '@/api/axios'
import Api from '@/plugins/request'
export default {
index: `${systemUrl}/planresource/paged`,
paged(params) {
return Api.post(`${systemUrl}/planresource/paged`, params);
},
get(params) {
return Api.get(`${systemUrl}/planresource/get`, params);
},
create(params) {
return Api.post(`${systemUrl}/mesdailyworksched/list`, params);
},
create1(params) {
return Api.post(`${systemUrl}/mesholidaycal/list`, params);
},
update(params) {
return Api.post(`${systemUrl}/equipcalendarwork/createorupdate`, params);
},
//删除:
delete(params) {
return Api.delete(`${systemUrl}/planresource/delete`, { params: params });
},
}
\ No newline at end of file
<template>
<div>
<DataGrid :columns="columns" ref="grid" :action="action" :high="false">
<template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys">
<Input placeholder="请输入关键字资源名称/资源编号/资源类型/部门" v-model="easySearch.keys.value" />
</FormItem>
<FormItem>
<Button type="primary" @click="search">查询</Button>
</FormItem>
</Form>
</template>
</DataGrid>
<Modal v-model="editModal" title="编辑" footer-hide>
<Set :eid="curId" @on-close="cancel" @on-ok="addOk" />
</Modal>
<Modal v-model="deletelModal" title="删除" @on-ok="removeOk" @on-cancel="cancel">
<p>确定删除?</p>
</Modal>
</div>
</template>
<script>
import Api from "./api";
import Set from "./set";
export default {
name: "list",
components: {
Set
},
data() {
return {
action: Api.index,
easySearch: {
keys: { op: "title,code,type,departTitle", value: null }
},
editModal: false,
deletelModal: false,
curId: 0,
columns: [
{ key: "id", title: this.l("id"), hide: true, align: "left" },
// {
// key: "deleterUserId",
// title: this.l("deleterUserId"),
// hide: true,
// align: "left"
// },
{
key: "title",
title: this.l("title"),
align: "left",
easy: true,
high: true
},
{
key: "code",
title: this.l("code"),
align: "left",
easy: true,
high: true
},
{
key: "type",
title: this.l("type"),
align: "center",
code: "aps.resource.type",
easy: true,
high: true
},
// {
// key: "property",
// title: this.l("property"),
// align: "left",
// high: true
// },
// {
// key: "departId",
// title: this.l("departId"),
// align: "left",
// high: true
// },
{
key: "departTitle",
title: this.l("departTitle"),
align: "left",
easy: true,
high: true
},
{
key: "calId",
title: this.l("calId"),
align: "center",
easy: true,
high: true
},
{
key: "holidayCalId",
title: this.l("holidayCalId"),
align: "center",
easy: true,
high: true
},
{
key: "calName",
title: this.l("calName"),
align: "left",
easy: true,
high: true
},
{
key: "holidayCalName",
title: this.l("holidayCalName"),
align: "left",
easy: true,
high: true
},
{
title: "操作",
key: "id",
width: 140,
align: "center",
render: (h, params) => {
return h("div", { class: "action" }, [
h(
"op",
{
attrs: { oprate: "edit" },
on: { click: () => this.edit(params.row.id) }
},
"设置日历"
),
h(
"op",
{
attrs: { oprate: "remove" },
on: { click: () => this.remove(params.row.id) }
},
"删除"
)
]);
}
}
]
};
},
mounted() {
console.log(this);
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: {
addOk() {
this.$refs.grid.load();
this.editModal = false;
this.curId = 0;
},
search() {
this.$refs.grid.reload(this.easySearch);
},
edit(id) {
this.editModal = true;
this.curId = id;
},
remove(id) {
this.deletelModal = true;
this.curId = id;
},
removeOk() {
Api.delete({ id: this.curId }).then(r => {
if (r.success) {
this.$refs.grid.load();
this.deletelModal = false;
this.$Message.success("删除成功");
}
});
},
removeCancel() {
this.deletelModal = false;
},
cancel() {
this.curId = 0;
this.addModal = false;
this.detailModal = false;
this.editModal = false;
this.deletedlModal = false;
},
l(key) {
let vkey = "plan_resource" + "." + key;
return this.$t(vkey) || key;
}
}
};
</script>
<style lang="less">
</style>
\ No newline at end of file
<template>
<Form ref="form" :model="entity" :rules="rules" :label-width="90">
<Row>
<Col span="12">
<FormItem label="资源名称" prop="equip_name">
<Input v-model="formItem.equip_name" placeholder="请输入设备名称" readonly></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem label="资源编号" prop="equip_id">
<Input v-model="formItem.equip_id" placeholder="请输入设备编号" readonly></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem label="工作日历" prop="work">
<Select v-model="formItem1.calendarwork_pk" clearable placeholder="请选择...">
<Option v-for="item in workList" :value="item.id" :key="item.calName">{{ item.calName }}</Option>
</Select>
</FormItem>
</Col>
<Col :span="12">
<FormItem label="加班日历" prop="overtime">
<Select v-model="formItem2.calendarovertime_pk" clearable placeholder="请选择...">
<Option
v-for="item in overtimeList"
:value="item.id"
:key="item.holidayCalName"
>{{ item.holidayCalName }}</Option>
</Select>
</FormItem>
</Col>
</Row>
<FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button>
<Button @click="handleClose" class="ml20">取消</Button>
</FormItem>
</Form>
</template>
<script>
import Api from "./api";
export default {
name: "Edit",
data() {
return {
disabled: false,
workList: [],
overtimeList: [],
formItem: {
equip_name: "",
equip_id: ""
},
formItem1: {
id: 0,
equip_pk: 0,
calendarwork_pk: 0
},
formItem2: {
id: 0,
equip_pk: 0,
calendarovertime_pk: 0
},
entity: {},
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }]
}
};
},
props: {
eid: Number
},
created() {
this.laodaction();
},
methods: {
laodaction() {
let parmse = {
pageIndex: 1,
conditions: [],
pageSize: 10
};
Api.create(parmse).then(r => {
if (r.success) {
this.workList = r.result;
} else {
this.$Message.error("获取数据失败...");
}
});
Api.create1(parmse).then(r => {
if (r.success) {
this.overtimeList = r.result;
} else {
this.$Message.error("获取数据失败...");
}
});
},
load(v) {
Api.get({ id: v }).then(r => {
this.formItem.equip_name = r.result.title;
this.formItem.equip_id = r.result.code;
this.formItem1.equip_pk = r.result.id;
this.formItem2.equip_pk = r.result.id;
});
},
handleSubmit() {
this.$refs.form.validate(v => {
if (v) {
this.disabled = true;
Api.update({
equipCalendarWork: this.formItem1,
equipCalendarOverTime: this.formItem2
})
.then(r => {
this.disabled = false;
if (r.success) {
this.$Message.success("保存成功");
this.$emit("on-ok");
} else {
this.$Message.error("保存失败");
}
})
.catch(err => {
this.disabled = false;
this.$Message.error("保存失败");
console.warn(err);
});
}
});
},
handleClose() {
this.$emit("on-close");
},
l(key) {
key = "plan_resource" + "." + key;
return this.$t(key);
}
},
watch: {
eid(v) {
if (v != 0) {
this.formItem1.calendarwork_pk = "";
this.formItem2.calendarovertime_pk = "";
this.load(v);
}
}
}
};
</script>
\ No newline at end of file
import createVuexAlong from 'vuex-along' import createVuexAlong from 'vuex-along'
import Api from '@/plugins/request' import Api from '@/plugins/request'
export const state = () => ({ export const state=()=>({
counter: 0, counter:0,
dictionary: new Map(), //所有字典项 dictionary: new Map(),//所有字典项
userMap: [], //所有用户缓存; userMap:new Map(),//所有用户缓存;
userInfo: { userInfo:{
userId: 0, userId:0,
userName: "" userName:""
}, },
cart:[], cart:[],
count: 0, count: 0,
...@@ -15,7 +15,7 @@ export const state = () => ({ ...@@ -15,7 +15,7 @@ export const state = () => ({
countAll:0,//整机排产 countAll:0,//整机排产
countRun:0,//流水排产 countRun:0,//流水排产
}) })
export const getters = { export const getters={
dictionaryByKey: (state) => (key) => { dictionaryByKey: (state) => (key) => {
let result = []; let result = [];
let items = state.dictionary.get(key); let items = state.dictionary.get(key);
...@@ -25,26 +25,15 @@ export const getters = { ...@@ -25,26 +25,15 @@ export const getters = {
} }
return result; return result;
}, },
getUser: state => key => { getUser:(state)=>key=>{
// try{ // debugger
// if(state.userMap.has(key)){ if(state.userMap&&state.userMap.get){
// return state.userMap.get(key); return state.userMap.get(key);
// }
// }catch(e){
// console.log(e);
// }
let user = state.userMap.filter(u => {
return u.id == key
});
if (user.length > 0) {
return user[0]
} else {
return null;
} }
} }
} }
export const mutations = { export const mutations={
increment(state) { increment(state){
state.counter++ state.counter++
}, },
setUserInfo(state, userInfo) { setUserInfo(state, userInfo) {
...@@ -52,7 +41,10 @@ export const mutations = { ...@@ -52,7 +41,10 @@ export const mutations = {
// sessionStorage.setItem("userInfo", JSON.stringify(userInfo)); // sessionStorage.setItem("userInfo", JSON.stringify(userInfo));
// sessionStorage.setItem("token", userInfo.token); // sessionStorage.setItem("token", userInfo.token);
}, },
addUser(state, user) { setUsers(state,users){
state.userMap=users;
},
addUser(state,user){
state.userMap.push(user); state.userMap.push(user);
}, },
setDictionary(state, dictionary) { setDictionary(state, dictionary) {
...@@ -78,26 +70,24 @@ export const mutations = { ...@@ -78,26 +70,24 @@ export const mutations = {
} }
} }
export const actions = { export const actions={
async loadUser({ async loadUser({commit},key){
commit
}, key) {
let { let { result } = await Api.get(`${systemUrl}/user/getuser`,{id:key});
result console.warn("result",result)
} = await this.$api.get(`${systemUrl}/user/getuser`, { commit("addUser",result);
id: key },
async loadUsers({commit}){
let { result } = await Api.get(`${systemUrl}/user/getuserlist`);
var map=new Map();
result.map(u=>{
map.set(u.id,u);
}); });
console.warn("result", result) commit("setUsers",map)
commit("addUser", result);
}, },
async loadDictionary({ async loadDictionary({ commit }) {
commit
}) {
let url = `${systemUrl}/Dictionary/GetAll` let url = `${systemUrl}/Dictionary/GetAll`
let { let { result } = await Api.get(url);
result
} = await Api.get(url);
var map = new Map(); var map = new Map();
...@@ -110,7 +100,7 @@ export const actions = { ...@@ -110,7 +100,7 @@ export const actions = {
} }
} }
export const plugins = [ export const plugins= [
createVuexAlong({ createVuexAlong({
// 设置保存的集合名字,避免同站点下的多项目数据冲突 // 设置保存的集合名字,避免同站点下的多项目数据冲突
name: "hyhmes", name: "hyhmes",
...@@ -124,6 +114,6 @@ export const plugins = [ ...@@ -124,6 +114,6 @@ export const plugins = [
list: ["hyhmes.session"], list: ["hyhmes.session"],
}, },
}), }),
] ]
//设置 strict 为不严格模式,即可在actions中修改state //设置 strict 为不严格模式,即可在actions中修改state
export const strict = false; export const strict=false;
\ No newline at end of file
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