Commit d5cdcd17 authored by renjintao's avatar renjintao

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

parents fb26967f 65efb352
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<span v-else v-text="placeholder"> </span> <span v-else v-text="placeholder"> </span>
</div> </div>
</DatePicker> </DatePicker>
<div class="time-view" v-else-if="!edit && startDate && endDate"> <div class="time-view" v-else-if="!edit &&( startDate || endDate)">
<span>{{ startDate }}</span> <span>{{ startDate }}</span>
<span class="jian-tou">{{ jg }} {{ unit }}</span> <span class="jian-tou">{{ jg }} {{ unit }}</span>
<span>{{ endDate }}</span> <span>{{ endDate }}</span>
......
...@@ -85,7 +85,13 @@ export default { ...@@ -85,7 +85,13 @@ export default {
}, },
listSlecet() { listSlecet() {
let data = { let data = {
conditions: [], conditions: [
{
fieldName: "userId",
fieldValue: this.$store.state.userInfo.id,
conditionalType: "Equal",
},
],
sortBy: "id", sortBy: "id",
isDesc: false, isDesc: false,
}; };
...@@ -93,15 +99,14 @@ export default { ...@@ -93,15 +99,14 @@ export default {
if (r.result) { if (r.result) {
this.projectList = r.result; this.projectList = r.result;
if (this.curId) { if (this.curId) {
this.projectList.map(u=>{ this.projectList.map((u) => {
if(u.id==this.curId){ if (u.id == this.curId) {
this.downName = u.title; this.downName = u.title;
} }
}) });
} else { } else {
this.downName = this.projectList[0].title; this.downName = this.projectList[0].title;
this.curdId = this.projectList[0].id; this.curdId = this.projectList[0].id;
} }
this.loadTree(this.curId); this.loadTree(this.curId);
} }
...@@ -115,6 +120,11 @@ export default { ...@@ -115,6 +120,11 @@ export default {
fieldValue: this.curdId, fieldValue: this.curdId,
conditionalType: "Equal", conditionalType: "Equal",
}, },
{
fieldName: "userId",
fieldValue: this.$store.state.userInfo.id,
conditionalType: "Equal",
},
], ],
}; };
this.$api.post(`${material}/projectplan/list`, params).then((r) => { this.$api.post(`${material}/projectplan/list`, params).then((r) => {
......
...@@ -122,7 +122,7 @@ export default { ...@@ -122,7 +122,7 @@ export default {
{ {
id: 4, id: 4,
label: "计划开始时间", label: "计划开始时间",
// value: 'startDate', value: 'startDate',
value: (task) => dayjs(task.startDate).format("YYYY-MM-DD"), value: (task) => dayjs(task.startDate).format("YYYY-MM-DD"),
width: 160, width: 160,
}, },
......
...@@ -22,11 +22,11 @@ ...@@ -22,11 +22,11 @@
<Filed :span="24" :name="l('userIds')"> <Filed :span="24" :name="l('userIds')">
<User v-for="(li,i) in entity.userIds" :value="li" :key="i" class="ml10" /> <User v-for="(li,i) in entity.userIds" :value="li" :key="i" class="ml10" />
</Filed> </Filed>
<Filed :span="12" :name="l('startDate')"> <Filed :span="12" name="计划日期">
<DateRange :value="entity"></DateRange> <DateRange :value="entity"></DateRange>
</Filed> </Filed>
<Filed :span="12" :name="l('plansToStartDate')"> <Filed :span="12" name="执行日期">
<DateRange :value="entity" start="plansToStartDate" end="plansToEndTime"></DateRange> <DateRange :value="entity" start="runStartDate" end="runEndTime"></DateRange>
</Filed> </Filed>
<Filed :span="24" :name="l('note')"> <Filed :span="24" :name="l('note')">
<div v-html="entity.note"></div> <div v-html="entity.note"></div>
...@@ -173,6 +173,13 @@ export default { ...@@ -173,6 +173,13 @@ export default {
id: this.eid, id: this.eid,
status: this.status, status: this.status,
}; };
if(this.status==1){
params.runStartDate="";
}else if(this.status==2){
params.runEndDate="";
}else if(this.status==3){
params.runEndDate="";
}
Api.updatepart(params).then((r) => { Api.updatepart(params).then((r) => {
if (r.success) { if (r.success) {
this.$Message.success("任务状态汇报成功"); this.$Message.success("任务状态汇报成功");
......
This diff is collapsed.
...@@ -3,7 +3,7 @@ import Api from '@/plugins/request' ...@@ -3,7 +3,7 @@ import Api from '@/plugins/request'
// import Mock from 'mockjs' // import Mock from 'mockjs'
export const state = () => ({ export const state = () => ({
counter: 0, counter: 0,
dictionary: new Map(), //所有字典项 dictionary: [], //所有字典项
userMap: new Map(), //所有用户缓存; userMap: new Map(), //所有用户缓存;
userNameMap: new Map(), //所有用户名称缓存; userNameMap: new Map(), //所有用户名称缓存;
departmentsMap: new Map(), //部门缓存; departmentsMap: new Map(), //部门缓存;
...@@ -25,10 +25,11 @@ export const getters = { ...@@ -25,10 +25,11 @@ export const getters = {
dictionaryByKey: (state) => (key) => { dictionaryByKey: (state) => (key) => {
let result = []; let result = [];
if (state && state.dictionary) { if (state && state.dictionary) {
let items = state.dictionary.get(key); let items = state.dictionary.filter(u=>{
if (items) { return u.code===key
// console.info("items",items) });
return items; if (items.length>0) {
return items[0].items;
} }
} }
...@@ -36,12 +37,11 @@ export const getters = { ...@@ -36,12 +37,11 @@ export const getters = {
}, },
dictionaryByCode: (state) => (key, code) => { dictionaryByCode: (state) => (key, code) => {
let result = null; let result = null;
let items = state.dictionary.get(key); let items = state.dictionary.filter(u=>{
if (items) { return u.code===key
// console.info("items",items) });
return items.filter(u => { if (items.length>0) {
return u.code == code return items[0];
})[0];
} }
return result; return result;
}, },
...@@ -167,18 +167,12 @@ export const actions = { ...@@ -167,18 +167,12 @@ export const actions = {
async loadDictionary({ async loadDictionary({
commit commit
}) { }) {
let url = `${systemUrl}/Dictionary/GetAll` let url = `${systemUrl}/Dictionary/getallanditems`
let { let {
result result
} = await Api.get(url); } = await Api.get(url);
var map = new Map();
commit("setDictionary", result);
for (const key in result) {
if (result.hasOwnProperty(key)) {
map.set(key, result[key])
}
}
commit("setDictionary", map);
let r = await Api.get(`${systemUrl}/user/getuserlist`); let r = await Api.get(`${systemUrl}/user/getuserlist`);
var umap = new Map(); var umap = new Map();
......
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