Commit ef929ef3 authored by 仇晓婷's avatar 仇晓婷

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

parents 1172beb3 076ee6b1
......@@ -226,7 +226,9 @@ div::-webkit-scrollbar-corner {
.mt50 {
margin-top: 50px;
}
.mt60 {
margin-top: 60px;
}
.mb0 {
margin-bottom: 0px;
}
......
<template>
<span class="btnStyle">
<span
class="mr20"
@click="lookBtn($event)"
:class="{
bor: borders,
small: bigBox == 'small',
large: bigBox == 'large',
default: !bigBox,
}"
:style="{ color: colf(type), 'border-block-color': colf(type) }"
>
<Icon :type="iconFont" class="iconStyle" />{{ valueName }}
</span>
</span>
</template>
<script>
export default {
data() {
return {};
},
props: {
type: String,
default: "default",
valueName: String,
default: "",
iconFont: String,
default: "ios-paper",
borders: Boolean,
default: false,
bigBox: String,
default: "",
},
methods: {
colf(v) {
if (v == "error") {
return "#ed4014";
} else if (v == "warning") {
return "#f90";
} else if (v == "success") {
return "#19be6b";
} else if (v == "primary") {
return "#2db7f5";
} else {
return "#515a6e";
}
},
lookBtn(event) {
// console.log("btnBi",event)
this.$emit('click',event);
event.stopPropagation();
},
},
};
</script>
<style lang="less" scoped>
.btnStyle {
// display: inline-block;
font-size: 14px;
.small {
padding: 1px 3px;
}
.large {
padding: 10px 12px;
}
.default {
padding: 1px 7px;
}
.iconStyle {
margin-right: 4px;
}
.bor {
border: 1px solid;
border-radius: 4px;
}
}
</style>
\ No newline at end of file
<template>
<div class="cardPage">
<div
class="cardBox"
:class="{ borderCss: isCard }"
@click="clickCard(columns)"
:columns="columns"
>
<p class="topCard lh40 flex pr" slot="header">
<span class="checkSingle" >
<slot name="checkBox" v-if="checkKey">
<Checkbox
v-model="single"
@on-change="singleChange(single, columns)"
></Checkbox>
</slot>
</span>
<span class="titleName f14 fwBold zh-ellip ml20">
<slot name="title">
{{ columns.topTitle }}
</slot>
</span>
<span class="f14 fwBold zh-ellip topCount">
<slot name="topCount">
{{ columns.topCount }}
</slot>
</span>
<span
class="triangle pa"
v-show="columns.borCol"
:style="{
'border-color':
'transparent ' + columns.borCol + columns.borCol + ' transparent',
}"
></span>
<span class="triangleName pa f12 fwBold" v-show="columns.borCol">{{
columns.markerName
}}</span>
</p>
<div class="countCard">
<div class="mainCount flex" slot="main">
<div class="imgBox" >
<slot name="img" v-if="showImgBox" >
<img :src="columns.srcImg" alt="图片"/>
</slot>
</div>
<div class="rightCount mr20 mt20 ml20" >
<!-- <Filed :span="24" :name="v.name" v-for="(v, i) in columns.filedList" :key="i">
{{ v.content}}
<Icon class="blueFont" type="md-sync" v-if="v.name == '工时:'"
/></Filed> -->
<slot name="fileLine" >
<Filed :span="24" :name="columns.countName4">
{{ columns.content4 }}
<!-- <Icon class="blueFont" type="md-sync" v-if="countIcon" /> -->
</Filed>
</slot>
</div>
</div>
<div class="bottomCard flex" slot="footer">
<span class="earlyWarn f14 fwBold mr20" v-if="columns.leftT1">
<Icon
:type="columns.oneIcon"
class="iconStyle"
v-show="iconShow"
/>{{ columns.leftT1 }}
</span>
<span class="overdue f14 fwBold mr20" v-if="columns.leftT2">
<Icon
:type="columns.twoIcon"
class="iconStyle"
v-show="iconShow"
/>{{ columns.leftT2 }}
</span>
<span class="rightMore">
<span
class="mr20"
@click="lookBtn(columns.id)"
v-if="columns.lookName"
>
<a
><Icon :type="columns.lookIcon" class="iconStyle" />{{
columns.lookName
}}</a
>
</span>
<span class="mr20 elliPsis fwBold" v-show="moreTrue" slot="extra">
<span class="elliPsisSpan">•••</span>
<span class="showMore hide">
<a v-if="columns.editName">
<span class="mr20" @click="editBtn(columns.id)">
<Icon :type="columns.editIcon" class="iconStyle" />
{{ columns.editName }}
</span>
</a>
<a v-if="columns.delName">
<span class="mr20" @click="delBtn(columns.id)">
<Icon :type="columns.delIcon" class="iconStyle" />{{
columns.delName
}}</span
>
</a>
</span>
</span>
</span>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: "cardPage",
data() {
return {
// countIcon:this.countIcon , //中间刷新页面
// iconShow: this.iconShow, //是否有icon
// moreTrue: this.moreTrue, //详情
// checkKey: this.checkKey, //是否展示选择框
// showImgBox: this.showImgBox, //图片展示
single: false, //是否选中
isCard: false,
// columns:this.columns
// columns: {
// id: "1",
// borCol: "#2680eb",
// topTitle: "文档标题标题",
// topCount: "DDBH_20200519_1",
// markerName: "暂停中",
// srcImg: require("../../assets/images/logo.png"),
// leftT1: "预警",
// oneIcon: "ios-information-circle-outline",
// leftT2: "超期",
// twoIcon: "ios-alarm-outline",
// lookName: "详情",
// lookIcon: "ios-paper",
// editName: "编辑",
// editIcon: "ios-create-outline",
// delName: "删除",
// delIcon: "ios-trash-outline",
// countName1: "创建人:",
// content1: "张三",
// countName2: "创建时间:",
// content2: "今天",
// countName3: "创建人:",
// content3: "张三",
// countName4: "计划时间:",
// content4: "2020-10-10---2020-11-10",
// countName5: "",
// content5:
// "文档详细说明文档详细说明文档详细说明文档详细说明文档详细说明文档详细说明文档详细说明文档详细说明。",
// countName6: "成员:",
// content6: "张三",
// countName7: "工时:",
// content7: "3天4小时",
// filedList: [
// { name: "创建人:", content: "张三" },
// { name: "创建时间:", content: "今天" },
// { name: "计划时间:", content: "2020-10-10---2020-11-10" },
// {
// name: "",
// content:
// "文档详细说明文档详细说明文档详细说明文档详细说明文档详细说明文档详细说明文档详细说明文档详细说明。",
// },
// { name: "成员:", content: "张三" },
// { name: "工时:", content: "3天4小时" },
// ],
// },
};
},
props: {
// columns: {
// type: Object,
// default: {},
// },
// moreTrue: {
// type: Boolean,
// default: false,
// },
multiple: {
type: Boolean,
default: false,
},
img: {
type: Boolean,
default: false,
},
life:{
type: Object,
}
// moreTrue: {
// type: Boolean,
// default: false,
// },
// iconShow: {
// type: Boolean,
// default: false,
// },
// countIcon: {
// type: Boolean,
// default: false,
// },
},
created() {
// this.columns=this.row
console.log("传过来的值:", this.columns);
},
methods: {
lookBtn(id) {
console.log("详情", id);
event.stopPropagation();
},
editBtn(id) {
console.log("编辑", id);
event.stopPropagation();
},
delBtn(id) {
console.log("删除", id);
event.stopPropagation();
},
clickCard(columns) {
//点击整个card
console.log(columns);
this.isCard = !this.isCard;
this.single = !this.single;
},
singleChange(v, columns) {
console.log(v, columns);
event.stopPropagation();
},
},
};
</script>
<style lang="less" scoped>
.cardBox {
box-sizing: border-box;
width: 498px;
background: #ffffff;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
border-radius: 8px;
.topCard {
height: 40px;
background: rgba(38, 128, 235, 0.2);
border-radius: 8px 8px 0px 0px;
border-bottom: 1px dashed #2680eb;
.checkSingle {
margin-left: 16px;
// margin-right: 24px;
}
.titleName {
width: 190px;
}
.topCount {
max-width: 205px;
}
/* css3绘制三角形 */
.triangle {
width: 0px;
height: 0px;
border-width: 20px;
border-style: solid; /*定义的是实现边框*/
border-radius: 4px;
transform: rotate(-90deg);
right: 0;
top: 0;
}
.triangleName {
right: -5px;
top: -1px;
transform: rotate(45deg);
color: #ffffff;
}
}
.countCard {
height: auto;
.imgBox {
height: 178px;
// width: 178px;
max-width: 178px;
margin: 20px 0px 23px 14px;
border: 1px dashed #232323;
}
.rightCount {
// width: calc(100% - 192px);
min-width: calc(100% - 212px);
.filed-col {
display: inline-flex;
margin-bottom: 6px;
}
.filed-col > .value {
text-indent: 2em !important;
}
.blueFont {
margin-left: 5px;
color: #2680eb;
}
}
.bottomCard {
padding-bottom: 20px;
padding-left: 14px;
.earlyWarn {
color: #ffa000;
}
.overdue {
color: #fe7777;
}
.rightMore {
margin-left: auto;
.elliPsis {
color: #2680eb;
}
.elliPsis:hover {
.showMore {
display: inline-block;
}
.elliPsisSpan {
display: none;
}
}
}
.iconStyle {
margin-right: 4px;
}
}
}
img {
height: 100%;
width: 100%;
}
}
.cardBox:hover {
box-shadow: 0px 0px 10px rgba(38, 128, 235, 0.4);
.topCard {
background: rgba(38, 128, 235, 0.4);
}
}
.borderCss {
border: 2px solid #2680eb;
}
</style>
\ No newline at end of file
<template>
<div class="cardPage">
<!-- :columns="rowCard" -->
<div
class="cardBox mb10"
:class="{ borderCss: isCard }"
@click="clickCard(row)"
@mouseenter="enterCard"
@mouseleave="leaveCard"
>
<p
class="topCard lh40 flex pr"
:style="{ background: topStyle }"
slot="header"
>
<span class="checkSingle" v-if="multiple">
<slot name="multiple">
<Checkbox
v-model="single"
@on-change="singleChange(single, row)"
></Checkbox>
</slot>
</span>
<span class="titleName f14 fwBold zh-ellip ml20">
<slot name="title" v-if="title">
{{ title }}
</slot>
</span>
<span class="f14 fwBold zh-ellip topCount">
<slot name="topCount" v-if="subtitle">
{{ subtitle }}
</slot>
</span>
<slot name="colorBol">
<span
class="triangle pa"
:style="{
'border-right-color': life,
'border-bottom-color': life,
}"
></span>
<span class="triangleName pa f12 fwBold" v-if="lifeCode">
<state
code="taskList.status"
ref="state"
:value="lifeCode"
type="text"
:color="false"
></state>
</span>
</slot>
</p>
<div class="countCard">
<div class="mainCount flex" slot="main">
<div class="imgBox" v-if="img">
<slot name="img">
<img :src="downUrl + srcImg" v-if="srcImg" alt="图片" />
<div v-else-if="!srcImg">无图片</div>
<img :src="srcImg1" v-else alt="图片" />
</slot>
</div>
<div class="rightCount mr20 mt20 ml20">
<slot name="fileLine">
<Filed :name="countTitle">
{{ count }}
<Icon class="blueFont" type="md-sync" />
</Filed>
</slot>
</div>
</div>
<div class="bottomCard flex" slot="footer">
<div>
<span class="earlyWarn f14 fwBold mr20">
<slot name="leftBottom" v-if="leftOneName">
<Icon :type="leftOneIcon" class="iconStyle" />
{{ leftOneName }}
<!-- v-show="leftBtmicon" -->
</slot>
</span>
<span class="overdue f14 fwBold mr20">
<slot name="leftBottom2" v-if="leftTwoName">
<Icon :type="leftTwoIcon" class="iconStyle" />
{{ leftTwoName }}
</slot>
</span>
</div>
<span class="rightMore">
<slot name="rightBottom"> </slot>
</span>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: "cardPage",
data() {
return {
rightList: [],
// rightBottom: true,
life: "",
topStyle: "rgba(38, 128, 235, 0.2)",
countTitle: "",
count: "",
downUrl: fileUrlDown,
single: false, //是否选中
isCard: false,
// rowCard: {},
srcImg1: require("../../assets/imgicon/chan_Pin.png"),
};
},
props: {
// columns: {
// type: Object,
// default: [],
// },
multiple: {
type: Boolean,
default: false,
},
img: {
type: Boolean,
default: false,
},
srcImg: {
type: String,
default: "",
},
moreTrue: {
type: Boolean,
default: false,
},
title: {
type: String,
default: "",
},
subtitle: {
type: String,
default: "",
},
// life: {
// type: String,
// default: "#666",
// },
lifeCode: {
type: [String, Number],
default: "",
},
leftOneName: {
type: String,
default: "",
},
leftOneIcon: {
type: String,
default: "",
},
leftTwoName: {
type: String,
default: "",
},
leftTwoIcon: {
type: String,
default: "",
},
row: {
type: Object,
default: [],
},
},
created() {
if (this.lifeCode) {
this.tdStyle(this.lifeCode);
}
// this.data = this.$store.getters.dictionaryByKey(this.code) || []; //rightM组件中用到
},
methods: {
enterCard() {
if (this.multiple) {
this.topStyle = "rgba(38, 128, 235, 0.4)";
}
},
leaveCard() {
this.topStyle = "rgba(38, 128, 235, 0.2)";
},
tdStyle(val) {
//动态根据状态值加载状态值对应的颜色
let temDic = this.$store.getters.dictionaryByKey("taskList.status");
this.life = "";
temDic.forEach((s) => {
if (Number(s.code) == val) {
this.life = s.color;
}
});
},
clickCard(value) {
console.log(value);
//点击整个card
this.isCard = !this.isCard;
this.single = !this.single;
},
singleChange(v, rows) {
console.log(v, rows);
//checkbox
event.stopPropagation();
},
},
};
</script>
<style lang="less" >
.cardBox {
min-height: 310px;
box-sizing: border-box;
background: #ffffff;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
border-radius: 8px;
// margin-bottom: 15px;
.topCard {
height: 40px;
// background: rgba(38, 128, 235, 0.2);
border-radius: 8px 8px 0px 0px;
border-bottom: 1px dashed #2680eb;
.checkSingle {
margin-left: 16px;
}
.titleName {
// width: 190px;
min-width: 190px;
}
.topCount {
// max-width: 205px;
min-width: 205px;
}
/* css3绘制三角形 */
.triangle {
width: 0px;
height: 0px;
border-width: 20px;
border-style: solid; /*定义的是实现边框*/
border-color: transparent;
border-radius: 4px;
transform: rotate(-90deg);
right: 0;
top: 0;
}
.triangleName {
right: -3px;
top: -3px;
transform: rotate(45deg);
color: #ffffff;
.ib > span {
font-size: 12px;
}
}
}
.countCard {
height: auto;
.imgBox {
height: 178px;
max-width: 178px;
margin: 20px 0px 23px 14px;
border: 1px dashed #232323;
div {
line-height: 178px;
text-align: center;
width: 178px;
}
}
.rightCount {
min-width: calc(100% - 212px);
.filed-col {
display: flex;
margin-bottom: 6px;
}
.filed-col > .value {
text-indent: 2em !important;
}
.blueFont {
margin-left: 5px;
color: #2680eb;
}
}
.bottomCard {
justify-content: space-between;
padding-bottom: 20px;
padding-left: 14px;
.leftBtm {
display: inline-block;
}
.earlyWarn {
color: #ffa000;
}
.overdue {
color: #fe7777;
}
.rightMore {
margin-left: auto;
}
}
}
img {
height: 100%;
width: 100%;
}
}
.cardBox:hover {
box-shadow: 0px 0px 10px rgba(38, 128, 235, 0.4);
// .topCard {
// background: rgba(38, 128, 235, 0.4);
// }
}
.borderCss {
border: 2px solid #2680eb;
}
</style>
\ No newline at end of file
......@@ -689,6 +689,8 @@ export default {
});
e[elem.key] = codeInfo.substr(0, codeInfo.length - 1);
}
} else {
e[elem.key] = ''
}
});
//导出数据增加对应的物料管理信息 code: 1【rootCategoryId 大类】 2【categoryId 大类】 3【codeRuleId 编码名称】
......
......@@ -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>
......
<template>
<Col :span="span" class="filed-col">
<div class="label">
<div class="label" v-if="name">
<label v-text="name"></label>
</div>
<div class="value">
<div class="value" >
<slot></slot>
</div>
</Col>
......
......@@ -68,7 +68,6 @@ export default {
delete: "删除",
remove: "删除"
};
if (oprates[this.oprate]) {
this.text = oprates[this.oprate];
this.css = this.oprate;
......@@ -89,7 +88,7 @@ export default {
methods: {
handler() {
if (this.disable == 0) {
if (this.oprate == "delete" || this.oprate == "remove") {
if (this.oprate == "delete" || this.oprate == "remove"||this.msg.length>0) {
this.$Modal.confirm({
title: this.title,
content: "<p>" + this.msg + "</p>",
......
......@@ -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) => {
......
<template>
<div
class="rightM flex"
:class="{ mr10: num == 1 }"
v-if="rightM && rightList"
@mouseleave="outPut"
>
<slot >
<op v-if="rightList && rightList.slice(0, num).length > 0"
v-for="(v, i) in rightList.slice(0, num)"
:key="i"
:title="v.name"
:type="v.type"
:msg="v.msg"
:disable="v.disable"
@click="v.click(row,$event)"
>
<Icon :type="v.icon==null || v.icon==undefined ? 'ios-paper':v.icon" v-if="v.type=='icon'|| v.type=='' || v.type==undefined || v.type==null "/>
<span v-if="v.name">
{{ v.name }}
</span>
</op>
<span
class="elliPsis fwBold"
slot="elliPsis"
v-if="rightList && rightList.length > num > 0"
>
<span :class="{ hide: inlines, mr10: !inlines }" @mouseenter="inFo"
>•••</span >
<span class="mr10" :class="{ inline: inlines, hide: !inlines }">
<op
v-for="(value, index) in rightList.slice(num)"
:key="index"
:title="value.name"
:type="value.type"
:msg="value.msg"
:disable="value.disable"
@click="value.click(row,$event)"
v-if="rightList && rightList.slice(num).length >= num"
>
<Icon :type="value.icon==''?'ios-paper':value.icon" v-if="value.type=='icon'|| value.type=='' || value.type==undefined || value.type==null"/>
<span v-if="value.name">
{{ value.name }}
</span>
</op>
</span>
</span>
</slot>
</div>
</template>
<script>
export default {
data() {
return {
inlines: false,
btnBoxList: [],
};
},
props: {
row: {
type:[Object,Array],
default: []
},
rightList: {
type:[Object,Array],
default: [],
},
num: {
type: Number,
default: 0,
},
rightM: {
type: Boolean,
default: true,
},
},
mounted() {
// console.log("$slots",this.$slots,this.$slots.default)
},
methods: {
inFo() {
this.inlines = true;
},
outPut() {
this.inlines = false;
},
},
};
</script>
<style lang="less" scoped>
.rightM {
cursor: pointer;
height: auto;
.elliPsis {
color: #2680eb;
}
}
</style>
\ No newline at end of file
<template>
<div class="ib" @click="showLife">
<div class="ib" @click="showLife">
<div class="ib" v-if="!isMore">
<span v-if="type == 'text'" :style="style">{{ name }}</span>
<Tag v-if="type == 'tag'" :color="tagcolor">{{ name }}</Tag>
<Badge v-if="type == 'dot'" :color="tagcolor" :text="name" />
<Icon
v-if="type == 'icon'"
:type="item.icon"
:color="tagcolor"
:title="name"
:size="size"
/>
<span v-if="type == 'text'" :style="style">{{ name }}</span>
<Tag v-if="type == 'tag'" :color="tagcolor">{{ name }}</Tag>
<Badge v-if="type == 'dot'" :color="tagcolor" :text="name" />
<Icon v-if="type == 'icon'" :type="item.icon" :color="tagcolor" :title="name" :size="size" />
</div>
<div class="ib" v-else v-for="(li, i) in items" :key="i">
<span v-if="type == 'text'" :style="li.style">{{ li.name }}</span>
<Tag v-if="type == 'tag'" :color="li.tagcolor">{{ li.name }}</Tag>
<Badge v-if="type == 'dot'" :color="li.tagcolor" :text="li.name" />&nbsp;
<span v-if="type == 'text'" :style="li.style">{{ li.name }}</span>
<Tag v-if="type == 'tag'" :color="li.tagcolor">{{ li.name }}</Tag>
<Badge v-if="type == 'dot'" :color="li.tagcolor" :text="li.name" />&nbsp;
</div>
<Modal
v-model="modal"
title="生命周期"
width="1200"
footer-hide
:mask-closable="false"
>
<component :is="detail" :code="code" :value="value" :mode="mode" />
<Modal v-model="modal" title="生命周期" width="1200" footer-hide :mask-closable="false">
<component :is="detail" :code="code" :value="value" :mode="mode" />
</Modal>
</div>
</div>
</template>
<script>
export default {
name: "state",
data() {
return {
mode: "0",
name: "",
isMore: false,
modal: false,
item: {},
items: [],
data: [],
detail: null,
};
},
props: {
default: {
type: String,
default: "",
name: "state",
data() {
return {
mode: "0",
name: "",
isMore: false,
modal: false,
item: {},
items: [],
data: [],
detail: null,
};
},
type: {
type: String,
default: "text",
validator: function (value) {
return ["text", "tag", "dot", "icon"].indexOf(value) != -1;
},
props: {
default: {
type: String,
default: "",
},
type: {
type: String,
default: "text",
validator: function (value) {
return ["text", "tag", "dot", "icon"].indexOf(value) != -1;
},
},
code: {
type: String,
required: true,
},
value: {
type: [String, Number],
required: false,
},
color: {
type: Boolean,
default: true,
},
size: {
type: Number,
default: 24,
},
icon: {
type: Boolean,
default: false,
},
img: {
type: Boolean,
default: false,
},
},
code: {
type: String,
required: true,
created() {
this.data = this.$store.getters.dictionaryByKey(this.code) || [];
},
value: {
type: [String, Number],
required: false,
methods: {
setName(v) {
if ((v + "").indexOf(",") == -1) {
var item;
this.data.map((u) => {
if (u.code == v) {
item = u;
}
});
if (item) {
this.name = item.name;
this.item = item;
} else {
if (v == "undefined" || v == '' || v == null || v == 'null') {
this.name = " ";
} else {
this.name = this.value;
}
}
} else {
this.isMore = true;
var items = [];
var ul = (v + "").split(",");
this.data.map((u) => {
if (ul.indexOf(u.code) > -1) {
u.tagcolor = u.color | "default";
u.style = {
color: u.color | "inherit"
};
items.push(u);
}
});
this.items = items;
}
},
showLife() {
this.modal = true;
this.detail = () => import("./life");
},
},
color: {
type: Boolean,
default: true,
computed: {
tagcolor() {
if (
this.color &&
this.item &&
this.item.color != "" &&
this.item.color != null
) {
return this.item.color;
}
return "default";
},
style() {
if (!this.color) {
return {};
}
return {
color: this.item && this.item.color != "" && this.item.color != null ?
this.item.color : "inherit",
};
},
},
size: {
type: Number,
default: 24,
watch: {
value(v) {
this.setName(v);
// this.$forceUpdate()
},
data(v) {
if (v.length > 0) {
this.setName(this.value);
this.$forceUpdate();
}
},
},
icon: {
type: Boolean,
default: false,
},
img: {
type: Boolean,
default: false,
},
},
created() {
this.data = this.$store.getters.dictionaryByKey(this.code) || [];
},
methods: {
setName(v) {
if ((v + "").indexOf(",") == -1) {
var item;
this.data.map((u) => {
if (u.code == v) {
item = u;
}
});
if (item) {
this.name = item.name;
this.item = item;
} else {
if (this.value == "undefined") {
this.name = " ";
} else {
this.name = this.value;
}
}
} else {
this.isMore = true;
var items = [];
var ul = (v + "").split(",");
this.data.map((u) => {
if (ul.indexOf(u.code) > -1) {
u.tagcolor = u.color | "default";
u.style = { color: u.color | "inherit" };
items.push(u);
}
});
this.items = items;
}
},
showLife() {
this.modal = true;
this.detail = () => import("./life");
},
},
computed: {
tagcolor() {
if (
this.color &&
this.item &&
this.item.color != "" &&
this.item.color != null
) {
return this.item.color;
}
return "default";
},
style() {
if (!this.color) {
return {};
}
return {
color:
this.item && this.item.color != "" && this.item.color != null
? this.item.color
: "inherit",
};
},
},
watch: {
value(v) {
this.setName(v);
// this.$forceUpdate()
},
data(v) {
if (v.length > 0) {
this.setName(this.value);
this.$forceUpdate();
}
},
},
};
</script>
\ No newline at end of file
</script>
......@@ -96,6 +96,9 @@ export default {
this.load();
}
},
value(v){
this.name=v;
}
},
};
</script>
......
......@@ -138,4 +138,13 @@ export default {
return Api.post(`${apsUrl}/aps/aischedule`, params)
},
//智能排产end----
//多级连排
createorderproductrelation() {
return Api.post(`${apsUrl}/apspoolappservices/createorderproductrelation`)
},
apsdatascheduledlevel(params) {
return Api.post(`${apsUrl}/apspoolappservices/aps_data_scheduled_level`, params)
},
}
......@@ -26,6 +26,7 @@
</a>
<Button type="primary" @click="goResults" style="background:#515A6E;border:solid 1px #515A6E">历史方案</Button>
<Button type="primary" @click="openApsModal">APS排产</Button>
<Button type="primary" @click="openApsMutiModal">多级连排</Button>
</template>
<template slot="batch">
<Button type="primary" class="mr10 ml10" @click="removeOk">移出排产</Button>
......@@ -40,9 +41,12 @@
<Modal v-model="addModal" title="工序参数设置" footer-hide width="1000">
<Add @on-close="cancel" @on-parameter-ok="addOk" :opTaskPk="setParams.opTaskPk" :partTaskPk="setParams.partTaskPk" :taskSeq="setParams.taskSeq" :count="setParams.count" />
</Modal>
<Modal v-model="apsModal" title="确定APS排产" @on-ok="apsOk" @on-cancel="cancel">
<Modal v-model="apsModal" title="确定APS排产" @on-ok="apsOk(1)" @on-cancel="cancel">
<p>确定进行APS排产?</p>
</Modal>
<Modal v-model="apsMutiModal" title="确定多级连排" @on-ok="apsMutiOk" @on-cancel="cancel">
<p>确定进行多级连排?</p>
</Modal>
<!-- <Modal v-model="resultModal" title="数据检查" width="1500" @on-ok="checkOk" @on-cancel="cancel">
<CheckResult :data="result"></CheckResult>
</Modal> -->
......@@ -109,6 +113,7 @@ export default {
detailModal: false,
deletelModal: false,
apsModal: false,
apsMutiModal: false,
addModalTemp: false,
modalDuration: false,
insertlModal1: false,
......@@ -367,7 +372,7 @@ export default {
circleModal: false, //进度条
listTemp: [], //自定义模板排序下拉框列表
tempValue: null,
tempStatu: 0 //新建模型时传过来的id值
tempStatu: 0, //新建模型时传过来的id值
};
},
mounted() {
......@@ -503,6 +508,7 @@ export default {
this.apsModal = false;
this.apsCheckModal = false;
this.resultModal = false;
this.apsMutiModal = false;
},
onDragDrop(a, b) {
//拖拽排序
......@@ -536,6 +542,17 @@ export default {
this.$Message.error("请设置基准日期");
}
},
openApsMutiModal() {
if (this.list.length == 1) {
this.$Message.error("单个订单不能进行多级连排")
return false
}
if (this.entity.setTime != "") {
this.apsMutiModal = true;
} else {
this.$Message.error("请设置基准日期");
}
},
//查看历史方案
goResults() {
this.$router.push({
......@@ -544,7 +561,7 @@ export default {
});
},
//确定aps排产
apsOk() {
apsOk(type) {
this.circleModal = true;
//APS排产前订单优先级功能
let parmsOrderpriority = {
......@@ -569,7 +586,11 @@ export default {
if (res1.success) {
// this.result=res1.result;
// this.resultModal=true;
this.checkOk();
if (type == 1) {
this.checkOk();
} else if (type == 2) {
this.checkMutiOk()
}
} else {
// this.circleModal = false;
// this.$Message.error("操作失败:数据校验");
......@@ -630,6 +651,47 @@ export default {
}.bind(this)
);
},
//多级连排
apsMutiOk() {
Api.createorderproductrelation().then(res => {
if (res.success && res.result) {
this.apsOk(2)
} else {
this.$Message.error("订单没有bom关系")
}
})
},
checkMutiOk() {
//排产计算
let paramsTime = {
DtTime: this.entity.setTime
};
Api.apsdatascheduledlevel(paramsTime)
.then(res2 => {
if (res2.success) {
if (res2.result.res) {
this.$Message.success("排产计算成功");
this.circleModal = false;
this.$router.push({
path: "/aps/results"
// params: { customerId: id }
});
} else {
this.circleModal = false;
this.$Message.error(res2.result.msg);
}
} else {
this.circleModal = false;
this.$Message.error("操作失败:排产计算");
}
})
.catch(
function (err) {
this.circleModal = false;
this.$Message.error("操作失败");
}.bind(this)
);
},
//打开设置参数
openAddModel(type, row) {
if (type == 2) {
......
......@@ -73,68 +73,54 @@
</Row>
<Row class="right-body">
<Col class="list" span="24">
<Card v-for="(li, i) in result" :key="i">
<p slot="title">
<Badge :count="i + 1"></Badge>
{{ li.routingCode }} / {{ li.routingName }}
</p>
<Timeline>
<TimelineItem v-for="(item, index) in li.list" :key="index">
<Badge
:count="item.seq"
slot="dot"
:type="item.aps == 1 ? 'error' : 'success'"
></Badge>
<div class="set-name">
<span
@click="sets(i, item, index)"
class="mr20"
:class="active == index ? 'gongTitle' : ''"
>工序名称:{{ item.name }}</span
>
<op
title="拆分工序"
@click="split(li, i, item, index)"
type="icon"
icon="ios-cut"
v-if="item.quantity > 1 && !item.chai"
>
</op>
<op
title="移除"
@click="remove(item, index)"
type="icon"
icon="ios-trash"
oprate="delete"
v-if="item.chai"
>
</op>
</div>
<div class="content">数量:{{ item.quantity }}</div>
<div v-show="item.userIds" class="content">
人员:
<span v-for="(u, j) in item.userIds" :key="j">
<User :value="u"></User>&nbsp;&nbsp;&nbsp;
</span>
</div>
<div v-show="item.shopName" class="content">
班组:
{{ item.shopName }}
</div>
<div v-show="item.beginTime" class="content">
时间:
{{ item.beginTime }} —— {{ item.endTime }}
</div>
<div v-show="item.remark" class="content">
备注:
{{ item.remark }}
</div>
<!-- <div>工序号:{{item.task_seq}}</div> -->
</TimelineItem>
</Timeline>
</Card>
<Timeline>
<TimelineItem v-for="(item, index) in result" :key="index">
<Badge :count="item.seq" slot="dot" :type="type(index)"></Badge>
<div class="set-name">
<span
@click="sets(item, index)"
class="mr20"
:class="active == index ? 'gongTitle' : ''"
>工序名称:{{ item.name }}</span
>
<op
title="拆分工序"
@click="split(item, index)"
type="icon"
icon="ios-cut"
v-if="item.quantity > 1 && !item.chai"
></op>
<op
title="移除"
@click="remove(item, index)"
type="icon"
icon="ios-trash"
oprate="delete"
v-if="item.chai"
></op>
</div>
<div class="content">数量:{{ item.quantity }}</div>
<div v-show="item.userIds" class="content">
人员:
<span v-for="(u, j) in item.userIds" :key="j">
<User :value="u"></User>&nbsp;&nbsp;&nbsp;
</span>
</div>
<div v-show="item.shopName" class="content">
班组:
{{ item.shopName }}
</div>
<div v-show="item.beginTime" class="content">
时间:
{{ item.beginTime }} —— {{ item.endTime }}
</div>
<div v-show="item.remark" class="content">
备注:
{{ item.remark }}
</div>
<!-- <div>工序号:{{item.task_seq}}</div> -->
</TimelineItem>
</Timeline>
<div>
<Drawer
title="排产设置盘"
......
This diff is collapsed.
......@@ -18,7 +18,8 @@
<!-- <Icon type="ios-time" /> -->
<div class="gs_bo01">
<span class="shi">总工时</span>
<span class="number">{{ allHours }}</span>
<span class="number" style="display: inline;">{{ allHours }}</span><span style="display: inline;"> 工时</span>
</div>
</div>
<Divider type="vertical" class="line_slit" />
......@@ -27,7 +28,7 @@
<img src="@/assets/imgicon/execute/time02.png" alt />
<div class="gs_bo01">
<span class="shi">待分配</span>
<span class="number">{{ waitHours }}</span>
<span class="number" style="display: inline;">{{ waitHours }}</span><span style="display: inline;"> 工时</span>
</div>
</div>
</div>
......
......@@ -9,7 +9,7 @@
:lazy="true"
:conditions="easySearch"
:action="action"
:gutter="40"
:gutter="10"
>
<template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline>
......@@ -42,7 +42,8 @@
@click="changeShwo"
></Button>
</template>
<template slot="card" slot-scope="{ row }">
<template slot="card" slot-scope="{ row }" >
<div
class="body"
@click="
......@@ -94,14 +95,7 @@
height="100%"
/>
</div>
<!-- <img
:src="getUrl(row.productUrl)"
width="120"
height="120"
:title="row.productUrl"
style="border:#cacbd0 dashed 1px"
onerror="this.src='/imgicon/noPic_product.png';"
/>-->
</Col>
<Col span="16" class="row">
<p>
......@@ -174,6 +168,39 @@
</Row>
</div>
</div>
<!-- <Vcard
v-if='row'
:row='row'
:img="img"
:srcImg='row.productUrl'
:title="row.productName"
:subtitle="row.mesCode"
:lifeCode="row.status"
:leftOneName='row.drawnNumber'
>
<template slot="fileLine">
<Filed :span="24" :name="l('beginTime')">
{{ row.beginTime }}
</Filed>
<Filed :span="24" :name="l('endTime')">
{{ row.endTime }}
</Filed>
<Filed :span="12" :name="l('quantity')">
{{ row.quantity }}
</Filed>
<Filed :span="12" name="工序号:">
{{ row.taskSeq }}
</Filed>
<Filed :span="24" name="工序名称:">
{{ row.taskName }}
</Filed>
</template> -->
<!-- <template slot="leftBottom"> 图号:{{ row.drawnNumber }} </template> -->
<!-- <template slot="rightBottom">
<RightM :num="num" :rightM="rightBottom" :rightList="buttons" :row="row">
</RightM>
</template> -->
<!-- </Vcard> -->
</template>
</DataGrid>
</div>
......@@ -189,7 +216,70 @@ export default {
},
data() {
return {
num: 2,
span: "9",
rightBottom: true,
multiple: false,
img: true,
action: Api.index,
buttons: [
{
name: "查看",
msg: "",
// type: "",
disable: false,
icon: "ios-paper",
click: (v,event) => {
console.log("add", v,event);
event.stopPropagation();
},
},
{
name: "编辑",
type: "icon",
msg: "",
disable: false,
icon: "ios-create-outline",
click: (v,event) => {
console.log("edit", v,event);
event.stopPropagation();
},
},
{
type: "icon",
name: "删除",
msg: "34534534",
disable: false,
icon: "ios-trash-outline",
click: (v,event) => {
console.log("del",v,event);
event.stopPropagation();
},
},
{
name: "导入",
type: "icon",
msg: "",
disable: false,
icon: "ios-create-outline",
click: (v,event) => {
console.log("1", v,event);
event.stopPropagation();
},
},
{
name: "导出",
type: "icon",
msg: "",
disable: false,
icon: "ios-create-outline",
click: (v,event) => {
console.log("2",v,event);
event.stopPropagation();
},
},
],
easySearch: {
keys: {
op: "mesCode,productName,drawnNumber",
......@@ -360,6 +450,8 @@ export default {
});
},
tdStyle(val) {
console.log(val);
// debugger
//动态根据状态值加载状态值对应的颜色
let temDic = this.$store.getters.dictionaryByKey("taskList.status");
let temColor = "#666";
......
......@@ -16,6 +16,9 @@ export default {
update(params) {
return Api.post(`${material}/projectplan/update`, params);
},
batchUpdate(params) {
return Api.post(`${material}/projectplan/updatepartbatch`, params);
},
sendtask(params) {
return Api.post(`${material}/projectplan/sendtask`, params);
},
......
<!--
/**
* @fileoverview Header component
* @license MIT
* @author Rafal Pospiech <neuronet.io@gmail.com>
* @package GanttElasticHeader
*/
-->
<template>
<div class="gantt-elastic__header" :style="{ ...style['header'] }">
<div class="gantt-elastic__header-title" :style="{ ...style['header-title'] }">
<div
class="gantt-elastic__header-title--text"
:style="{ ...style['header-title--text'] }"
v-if="!opts.title.html"
>{{ opts.title.label }}</div>
<div
class="gantt-elastic__header-title--html"
:style="{ ...style['header-title--html'] }"
v-if="opts.title.html"
v-html="opts.title.label"
></div>
</div>
<div class="gantt-elastic__header-options" :style="{ ...style['header-options'] }">
<!-- <button
class="gantt-elastic__header-btn-recenter"
:style="{ ...style['header-btn-recenter'] }"
@click.prevent="recenterPosition"
>
{{ opts.locale.Now }}
</button>-->
<label class="gantt-elastic__header-label" :style="{ ...style['header-label'] }">
{{ opts.locale["X-Scale"] }}
<div
class="gantt-elastic__header-slider-wrapper"
:style="{ ...style['header-slider-wrapper'] }"
>
<vue-slider
class="gantt-elastic__header-slider"
tooltip="none"
:style="{ ...style['header-slider'] }"
:process-style="{ ...style['header-slider--process'] }"
:slider-style="{ ...style['header-slider--slider'] }"
v-model="scale"
:max="24"
:min="2"
width="100px"
></vue-slider>
</div>
</label>
<label class="gantt-elastic__header-label" :style="{ ...style['header-label'] }">
{{ opts.locale["Y-Scale"] }}
<div
class="gantt-elastic__header-slider-wrapper"
:style="{ ...style['header-slider-wrapper'] }"
>
<vue-slider
class="gantt-elastic__header-slider"
tooltip="none"
:style="{ ...style['header-slider'] }"
:process-style="{ ...style['header-slider--process'] }"
:slider-style="{ ...style['header-slider--slider'] }"
v-model="height"
:max="100"
:min="7"
width="100px"
></vue-slider>
</div>
</label>
<label class="gantt-elastic__header-label" :style="{ ...style['header-label'] }">
{{ opts.locale["Before/After"] }}
<div
class="gantt-elastic__header-slider-wrapper"
:style="{ ...style['header-slider-wrapper'] }"
>
<vue-slider
class="gantt-elastic__header-slider"
tooltip="none"
:style="{ ...style['header-slider'] }"
:process-style="{ ...style['header-slider--process'] }"
:slider-style="{ ...style['header-slider--slider'] }"
v-model="scope"
:max="31"
:min="0"
width="100px"
></vue-slider>
</div>
</label>
<label class="gantt-elastic__header-label" :style="{ ...style['header-label'] }">
{{ opts.locale["Task list width"] }}
<div
class="gantt-elastic__header-slider-wrapper"
:style="{ ...style['header-slider-wrapper'] }"
>
<vue-slider
class="gantt-elastic__header-slider"
tooltip="none"
:style="{ ...style['header-slider'] }"
:process-style="{ ...style['header-slider--process'] }"
:slider-style="{ ...style['header-slider--slider'] }"
v-model="divider"
:max="100"
:min="0"
width="100px"
></vue-slider>
</div>
</label>
<label
class="gantt-elastic__header-task-list-switch--wrapper"
:style="{ ...style['header-task-list-switch--label'] }"
>
<switches
class="gantt-elastic__header-task-list-switch"
:style="{ ...style['header-task-list-switch'] }"
v-model="root.state.options.taskList.display"
></switches>
{{ opts.locale["Display task list"] }}
</label>
</div>
</div>
</template>
<script>
import vueSlider from "vue-slider-component";
import "vue-slider-component/theme/default.css";
import Switches from "vue-switches";
const defaultStyle = {
header: {
margin: "0px auto",
background: "#f3f5f747",
padding: "10px",
overflow: "hidden",
clear: "both",
display: "flex",
"justify-content": "space-between"
},
"header-title": { float: "left" },
"header-options": { float: "right" },
"header-title--text": {
"font-size": "20px",
"vertical-align": "middle",
"font-weight": "400",
"line-height": "35px",
"padding-left": "22px",
"letter-spacing": "1px"
},
"header-title--html": {
"font-size": "20px",
"vertical-align": "middle",
"font-weight": "400",
"line-height": "35px",
"padding-left": "22px",
"letter-spacing": "1px"
},
"header-btn-recenter": {
background: "#95A5A6",
border: "none",
outline: "none",
cursor: "pointer",
color: "white",
"border-radius": "3px",
"margin-right": "27px",
"font-size": "16px",
padding: "8px 12px"
},
"header-slider": {
"box-sizing": "content-box"
},
"header-slider-wrapper": {
display: "inline-block",
"vertical-align": "middle"
},
"header-slider--slider": { "box-sizing": "content-box" },
"header-slider--process": { "box-sizing": "content-box" },
"header-task-list-switch--label": { "box-sizing": "content-box" },
"header-task-list-switch": {
margin: "0px 15px",
"vertical-align": "middle"
},
"header-label": {}
};
const defaultOptions = {
title: {
// label: "任务甘特图",
html: false
},
locale: {
Now: "Now",
"X-Scale": "缩放-X",
"Y-Scale": "缩放-Y",
"Task list width": "任务列表",
"Before/After": "展开日期",
"Display task list": "是否展开任务列表"
}
};
export default {
name: "GanttHeader",
components: {
vueSlider,
Switches
},
props: ["options", "dynamicStyle"],
inject: ["root"],
data() {
return {
scaleTimeoutId: null,
firstScale: false,
localScale: 0,
localHeight: 0,
localBefore: 0,
localPercent: 0,
sliderOptions: {
xScale: {
value: 0
}
},
style: {},
opts: {}
};
},
created() {
this.localScale = this.root.state.options.times.timeZoom;
this.localHeight = this.root.state.options.row.height;
this.localBefore = this.root.state.options.scope.before;
this.localPercent = this.root.state.options.taskList.percent;
this.sliderOptions.xScale.value = this.root.state.options.times.timeZoom;
this.style = this.root.mergeDeep({}, defaultStyle, this.dynamicStyle);
this.opts = this.root.mergeDeep({}, defaultOptions, this.options);
},
methods: {
getImage() {
this.root.getImage("image/png").then(imgB64 => {
const link = document.createElement("a");
link.href = imgB64;
link.download = "gantt-elastic.png";
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
});
},
recenterPosition() {
this.root.$emit("recenterPosition");
},
setScale(value) {
if (this.scaleTimeoutId !== null) {
clearTimeout(this.scaleTimeoutId);
this.scaleTimeoutId = null;
}
// debouncing
if (this.firstScale) {
this.scaleTimeoutId = setTimeout(() => {
this.root.$emit("times-timeZoom-change", value);
this.scaleTimeoutId = null;
}, 50);
} else {
this.root.$emit("times-timeZoom-change", value);
this.firstScale = true;
}
}
},
computed: {
/**
* If there is a component slot specified for header
* @returns {bool}
*/
beforeOptionsIsComponent() {
const headerSlot = this.options.slots.header;
if (
typeof headerSlot.beforeOptions === "object" &&
!Array.isArray(headerSlot.beforeOptions)
) {
return true;
}
return false;
},
/**
* If there is a slot with beforeOptions html content
* @returns {bool}
*/
beforeOptionsIsHtml() {
if (typeof this.options.slots.header.beforeOptions === "string") {
return true;
}
return false;
},
scale: {
get() {
return this.localScale;
},
set(value) {
this.localScale = Number(value);
this.setScale(this.localScale);
}
},
height: {
get() {
return this.localHeight;
},
set(value) {
this.localHeight = Number(value);
this.root.$emit("row-height-change", Number(value));
}
},
scope: {
get() {
return this.localBefore;
},
set(value) {
this.localBefore = Number(value);
this.root.$emit("scope-change", Number(value));
}
},
divider: {
get() {
return this.localPercent;
},
set(value) {
this.localPercent = Number(value);
this.root.$emit("taskList-width-change", Number(value));
}
}
}
};
</script>
<template>
<div class="q-pa-sm">
<div class="pr mt50" v-if="tasks.length == 0">
<Spin size="large" fix></Spin>
</div>
<gantt-elastic
v-else
:options="options"
:tasks="tasks"
@tasks-changed="tasksUpdate"
@options-changed="optionsUpdate"
@dynamic-style-changed="styleUpdate"
>
<gantt-header slot="header"></gantt-header>
</gantt-elastic>
<div class="q-mt-md" />
</div>
</template>
<style>
</style>
<script>
import GanttElastic from "gantt-elastic";
import GanttHeader from "./components/gantt-header";
import dayjs from "dayjs";
import Api from "./api";
function GetTimeByTimeStr(dateString) {
if(dateString){
var timeArr = dateString.split(" ");
var d = timeArr[0].split("-");
var t = timeArr[1].split(":");
return new Date(d[0], d[1] - 1, d[2], t[0], t[1], t[2]).getTime();
}else{
return 0;
}
}
let that;
export default {
name: "Gantt",
components: {
GanttElastic,
GanttHeader,
},
props: {
eid: String,
},
data() {
return {
tasks: [],
options: {
taskMapping: {
progress: "percent",
},
maxRows: 100,
maxHeight: 500,
title: {
label: "Your project title as html (link or whatever...)",
html: false,
},
row: {
height: 24,
},
calendar: {
hour: {
display: true,
},
},
chart: {
progress: {
bar: false,
},
expander: {
display: true,
},
},
taskList: {
expander: {
straight: false,
},
columns: [
// {
// id: 1,
// label: "ID",
// value: "id",
// width: 40,
// },
{
id: 2,
label: "名称",
value: v=>{
return `<a>${v.name}</a>`
},
width: 200,
expander: true,
html: true,
events: {
click({ data, column }) {
alert(data.name);
console.log(this)
that.$Message.info(data.name)
},
},
},
{
id: 3,
label: "状态",
value: "status",
width: 100,
html: true,
events: {
click(e) {
console.log(e)
that.$Message.info(e.data.name)
},
},
},
{
id: 4,
label: "计划开始时间",
value: 'startDate',
value: (task) => dayjs(task.startDate).format("YYYY-MM-DD"),
width: 160,
},
{
id: 5,
label: "计划结束时间",
// value:'endDate',
value: (task) => dayjs(task.endDate).format("YYYY-MM-DD"),
width: 180,
},
{
id: 6,
label: "计划类型",
value: "type",
width: 80,
}
],
},
locale: {
weekdays: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
months: [
"一月",
"二月",
"三月",
"四月",
"五月",
"六月",
"七月",
"八月",
"九月",
"十月",
"十一月",
"十二月",
],
},
},
dynamicStyle: {},
lastId: 16,
};
},
created() {
that=this;
this.gantData();
},
methods: {
gantData() {
var params = {
conditions: [
{
fieldName: "projectId",
conditionalType: "Equal",
fieldValue: this.eid,
},
],
};
Api.list(params).then((r) => {
let tasks = r.result;
var types=["project","milestone","task"]
tasks=tasks.map(u=>{
var obj = {
id: u.id,
parentId:u.upId,
name: u.title,
startDate:u.startDate,
endDate:u.endDate,
start: GetTimeByTimeStr(u.startDate),
duration:GetTimeByTimeStr(u.endDate)- GetTimeByTimeStr(u.startDate) ,
percent: 85,
status: u.status,
type: types[u.type],
};
return obj;
})
this.tasks = tasks;
});
},
tasksUpdate(tasks) {
this.tasks = tasks;
},
optionsUpdate(options) {
this.options = options;
},
styleUpdate(style) {
this.dynamicStyle = style;
},
},
};
</script>
......@@ -52,7 +52,7 @@
<template slot="batch">
<span v-width="300" style="color:#333">
<DateRange v-model="dateEntity" edit v-width="260"></DateRange>
<Button type="primary">设置2计划日期</Button>
<Button type="primary" @click="setDate()">设置日期</Button>
</span>
<span>
<UserGroup
......@@ -61,7 +61,7 @@
:projectId="eid"
v-width="300"
></UserGroup>
<Button type="primary">设置执行人</Button>
<Button type="primary" @click="setExecutor()">设置执行人</Button>
</span>
<Button type="primary" @click="bacthRemove()">批量删除</Button>
</template>
......@@ -361,6 +361,33 @@ export default {
this.list = data;
});
},
setDate(){
var items=this.batchItems.map(u=>{
return {
id:u.id,
startDate:this.dateEntity.startDate,
endDate:this.dateEntity.endDate,
}
})
Api.batchUpdate(items).then(r=>{
if(r.success){
this.search();
}
});
},
setExecutor(){
var items=this.batchItems.map(u=>{
return {
id:u.id,
executor:this.executors
}
})
Api.batchUpdate(items).then(r=>{
if(r.success){
this.search();
}
});
},
add(row) {
if (row) {
this.curId = row.id;
......
......@@ -12,8 +12,14 @@
<DateRange v-model="entity" />
</Filed>
<Filed :span="24" :name="l('users') + ':'">
<User v-for="(u,i) in users" :value="u.userId" :key="u.userId" mode="text" class="mr10" />
<a @click="group"><Avatar icon="md-add" /></a>
<User
v-for="(u, i) in users"
:value="u.userId"
:key="u.userId"
mode="text"
class="mr10"
/>
<a @click="group"><Avatar icon="md-add" /></a>
</Filed>
</Row>
</div>
......@@ -35,10 +41,15 @@
<span>|</span>
</li>
<li>
<a @click="task"> <Icon type="ios-list-box" size="18" />任务监控 </a>
<a @click="gant"> <Icon type="ios-list-box" size="18" />任务监控 </a>
&nbsp;
<span>|</span>
</li>
<!-- <li>
<a @click="task"> <Icon type="ios-list-box" size="18" />任务监控 </a>
&nbsp;
<span>|</span>
</li> -->
<li>
<a @click="group"> <Icon type="ios-people" size="18" />成员 </a>
&nbsp;
......@@ -75,7 +86,7 @@ export default {
curId: this.eid,
avatorPath: "",
entity: {},
users:[],
users: [],
rules: {
name: [
{
......@@ -129,15 +140,12 @@ export default {
this.detail = () => import("../plan");
},
task() {
//this.curId = this.eid;
this.title = "任务";
this.detail = () => import("../task/index");
// this.$router.push({
// name: "project-task",
// params: {
// id: this.curId
// }
// });
},
gant() {
this.title = "任务监控";
this.detail = () => import("../plan/gant");
},
group() {
this.title = "项目成员";
......
......@@ -12,7 +12,7 @@
</Col>
<Col :span="12">
<FormItem :label="l('userId')" prop="userId">
<UserGroup v-model="entity.userId" :projectId="eid" />
<UserGroup v-model="entity.userId" :projectId="projectId" />
</FormItem>
</Col>
<Col :span="12">
......@@ -75,8 +75,9 @@ export default {
},
props: {
v: Object,
eid: String,
pid: String,
eid: String,//当前id
pid: String,//计划id
projectId:String,//项目id
},
mounted() {
// if (this.eid != '' && this.eid != null) {
......
......@@ -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.
<template>
<div class="rightM" v-if="rightM">
<div v-if="num == 1">
<slot >
<!-- <BtnBox
:borders="true"
:valueName="`查看`"
:type="`success`"
:iconFont="`ios-create-outline`"
></BtnBox> -->
</slot>
</div>
<div v-if="num > 1" slot="all">
<slot >
<!-- <BtnBox
:borders="true"
:valueName="`查看`"
:type="`success`"
:iconFont="`ios-create-outline`"
></BtnBox> -->
</slot>
<span class="mr20 elliPsis fwBold" slot="elliPsis">
<span class="elliPsisSpan">•••</span>
<span class="showMore hide mr20">
<slot >
<!--<BtnBox
:bigBox="`small`"
:borders="true"
:valueName="`编辑`"
:type="`primary`"
:iconFont="`ios-create-outline`"
></BtnBox>
<BtnBox
:valueName="`删除`"
:type="`error`"
:iconFont="`ios-trash-outline`"
></BtnBox> -->
</slot>
</span>
</span>
</div>
</div>
</template>
<script>
export default {
// name: '',
data() {
return {
num:1,
rightM: true,
};
},
props: {
// num: Number,
// default: 1,
// valueName: String,
// default: "查看",
// iconFont:String,
// default: "ios-paper",
},
mounted() {},
methods: {
lookBtn(id) {
console.log("详情", id);
event.stopPropagation();
},
editBtn(id) {
console.log("编辑", id);
event.stopPropagation();
},
delBtn(id) {
console.log("删除", id);
event.stopPropagation();
},
},
};
</script>
<style lang="less" scoped>
.rightM {
height: auto;
.elliPsis {
color: #2680eb;
}
.elliPsis:hover {
.showMore {
display: inline-block;
}
.elliPsisSpan {
display: none;
}
}
}
</style>
\ No newline at end of file
......@@ -82,10 +82,10 @@ import DateRange from '@/components/page/dateRange.vue'
import FilesViewer from '@/components/page/filesViewer.vue'
import Bmenu from '@/components/page/bmenu'
import Submenus from '@/components/page/bmenu/components/Submenu'
import Contextmenu from "vue-contextmenujs"
import Vcard from '@/components/page/Vcard.vue'
import BtnBox from '@/components/page/BtnBox.vue'
import RightM from '@/components/page/rightM.vue'
// import FormMaking from 'form-making'
// import 'form-making/dist/FormMaking.css'
// import Element from 'element-ui';
......@@ -151,7 +151,7 @@ Vue.component("DepartmentSelect", DepartmentSelect)
Vue.component("ProductNumberSelect", ProductNumberSelect)
Vue.component("ProductSelect", ProductSelect)
Vue.component("ProductSelect1", ProductSelect1)
Vue.component("ProjectTaskTree",ProjectTaskTree)
Vue.component("ProjectTaskTree", ProjectTaskTree)
Vue.component("DTSpan", DTSpan)
Vue.component("DTSearch", DTSearch)
Vue.component("InputTime", InputTime)
......@@ -167,11 +167,17 @@ Vue.component("WordTree", WordTree)
Vue.component("Actions", Actions)
Vue.component("DateRange", DateRange)
Vue.component("Life", Life)
Vue.component("FilesViewer",FilesViewer)
Vue.component("FilesViewer", FilesViewer)
Vue.use(Contextmenu);
//注入mock
// require("../mock")
// Vue.component("Vcard", Vcard)
// Vue.component("BtnBox", BtnBox)
// Vue.component("RightM", RightM)
//注入mock
// require("../mock")
Vue.prototype.$api = request;
Vue.prototype.$http = Api;
Vue.prototype.$u = Henq;
......
......@@ -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