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