Commit d2eb068e authored by 周远喜's avatar 周远喜

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

parents ff5044ec c9950444
...@@ -1085,6 +1085,7 @@ html [type=button] { ...@@ -1085,6 +1085,7 @@ html [type=button] {
} }
i { i {
font-size: 16px;
padding: 4px; padding: 4px;
border-radius: 3px; border-radius: 3px;
} }
...@@ -1126,13 +1127,13 @@ html [type=button] { ...@@ -1126,13 +1127,13 @@ html [type=button] {
width: 22px; width: 22px;
height: 22px; height: 22px;
line-height: 22px; line-height: 22px;
margin: 0px 0 0 0; margin: 0px 5px 0 0;
border-radius: 50%; border-radius: 50%;
color: #515A6E; color: #515A6E;
background: #F5F6FA; background: #F5F6FA;
.ivu-icon { .ivu-icon {
font-weight: bold; font-weight: bold;
font-size: 20px; font-size: 18px;
} }
} }
a.disable { a.disable {
......
<template>
<div class="files-viewer">
<Card class="card1" :style="card1New">
<div class="icon-click">
<!-- <a><Icon type="ios-add-circle-outline" @click="magnify" /></a>
<a><Icon type="ios-remove-circle-outline" @click="shrink" /> </a>
<a><Icon type="ios-power" /> </a> -->
<a> <Icon type="md-undo" @click="rotate" /></a>&nbsp;
<!-- <a> <Icon type="ios-print-outline" /></a> -->
<a><Icon type="md-arrow-down" @click="download" /> </a>
</div>
<div class="body-img">
<Icon
type="ios-arrow-back"
class="bg-b"
@click="leftIcon"
:class="isactive == 0 ? 'bg-b' : 'bg-b1'"
/>
<div class="list-shoucang">
<img :src="avatorPath" v-if="downloadPath" :style="styleObj" />
<div class="files-list" v-else>
<p>文件名称</p>
<p>{{ imgObj.filsesName }}</p>
<p><a @click="download">下载查看文件</a></p>
</div>
</div>
<Icon
type="ios-arrow-forward"
@click="rightIcon"
:class="isactive == listTask.length ? 'bg-l' : 'bg-l1'"
/>
</div>
</Card>
<div class="show-list-img">
<div @click="showList">
<Icon type="md-arrow-dropdown" v-show="showIcon" />
<Icon type="md-arrow-dropup" v-show="!showIcon" />
</div>
</div>
<Card class="card-list" v-show="showIcon">
<Icon
type="ios-arrow-back"
:class="num < 0 ? 'bg-b1' : 'bg-b'"
@click="leftmove"
/>
<div class="ying-cang">
<div
class="list-c"
:style="{ width: '100%', 'margin-left': num * 227 + 'px' }"
>
<div v-for="(item, index) in listTask" :key="index" :name="item.id">
<div
class="img-list"
@click="clickItem(item, index)"
:class="isactive == index ? 'addclass' : ''"
>
<img
v-if="
item.fileType == 'jpg' ||
item.fileType == 'gif' ||
item.fileType == 'png'
"
:src="downUrl + item.downloadPath"
width="100%"
height="100%"
/>
<div class="files-list" v-else>
<p>文件类型</p>
<p>{{ item.fileType }}</p>
<p>文件名称</p>
<p>{{ item.newName }}</p>
</div>
</div>
</div>
</div>
</div>
<Icon
type="ios-arrow-forward"
:class="listTask.length > 16 && showArrow ? 'bg-l1' : 'bg-l'"
@click="rightmove"
/>
</Card>
</div>
</template>
<script>
export default {
name: "",
data() {
return {
downUrl: fileUrlDown, //附件路径
downloadPath: "", //附件地址
card1New: {
height: "",
},
listTask: [],
imgObj: {
filesPath: "",
filsesName: "",
},
isactive: 0,
avatorPath: "",
num: 0,
num1: 0,
showIcon: true,
showArrow: true,
multiples: 1, // 放大或者缩小
deg: 0, // 旋转的角度
styleObj: null, // 拖拽时修改图片的样式
isDrag: false, // 是否开始拖拽
startX: 0, // 鼠标的点击X轴
startY: 0, // 鼠标的点击Y轴
moveX: 0, // 鼠标移动的X轴
moveY: 0, // 鼠标移动的Y轴
endX: 0,
endY: 0,
};
},
props: {
parms: {
type: [String, Object],
default: "",
},
},
mounted() {
if (this.parms.eid) {
this.filesList();
}
},
methods: {
// // 放大
// magnify() {
// if (this.multiples >= 10) {
// return;
// }
// this.multiples += 0.25;
// this.styleObj = `transform: scale(${this.multiples}); rotateZ(${this.deg}deg);left:${this.endX}px;top:${this.endY}px`;
// },
// // 缩小
// shrink() {
// if (this.multiples <= 0) {
// return;
// }
// this.multiples -= 0.25;
// this.styleObj = `transform: scale(${this.multiples}) rotateZ(${this.deg}deg);left:${this.endX}px;top:${this.endY}px`;
// },
// 旋转
rotate() {
this.deg += 90;
if (this.deg >= 360) {
this.deg = 0;
}
this.styleObj = `transform: scale(${this.multiples}) rotateZ(${this.deg}deg);left:${this.endX}px;top:${this.endY}px`;
},
showList() {
this.showIcon = !this.showIcon;
if (this.showIcon == true) {
this.card1New.height = "72vh";
} else {
this.card1New.height = "90vh";
}
},
leftIcon() {
if (this.isactive == 0) {
return false;
// this.$Message.error("已是第一个一个");
}
this.isactive = this.isactive - 1;
},
rightIcon() {
if (this.isactive == this.listTask.length) {
return false;
// this.$Message.error("已是最后一个");
}
this.isactive = this.isactive + 1;
},
clickItem(item, index) {
this.isactive = index;
if (
item.fileType == "jpg" ||
item.fileType == "gif" ||
item.fileType == "png"
) {
this.downloadPath = item.downloadPath;
} else {
this.downloadPath = "";
}
this.imgObj.id = item.id;
this.imgObj.filesPath = item.downloadPath;
this.imgObj.filsesName = item.newName;
},
download() {
window.open(this.downUrl + this.imgObj.filesPath, "_blank");
},
leftmove() {
if (this.num < 0) {
this.num += 1;
if (this.num == 0) {
this.showArrow = true;
}
}
},
rightmove() {
if (this.num + this.listTask.length > 16) {
this.num -= 1;
if (this.num + this.listTask.length == 16) {
this.showArrow = false;
}
} else {
this.showArrow = false;
}
},
filesList() {
//查询上传到文件服务器上的文件
this.$http.sysUser.getFile(this.parms).then((res) => {
if (res.data != [] && res.data.length > 0) {
var items = [];
res.data.forEach((data) => {
let objImag = {};
objImag.newName = data.newName;
objImag.downloadPath = data.downloadPath;
objImag.id = data.id;
objImag.fileType = data.fileType;
items.push(objImag);
});
this.listTask = items;
if (
this.listTask[0].fileType == "jpg" ||
this.listTask[0].fileType == "gif" ||
this.listTask[0].fileType == "png"
) {
// this.avatorPath = this.downUrl + this.listTask[0].downloadPath;
this.downloadPath = this.listTask[0].downloadPath;
}
}
});
},
},
watch: {
"parms.eid"(v) {
if (v) {
this.filesList();
}
},
downloadPath(v) {
if (v) {
this.avatorPath = this.downUrl + v;
}
},
isactive(v) {
if (v) {
this.listTask.map((item, index) => {
if (v == index) {
if (
item.fileType == "jpg" ||
item.fileType == "gif" ||
item.fileType == "png"
) {
this.downloadPath = item.downloadPath;
} else {
this.downloadPath = "";
}
this.imgObj.id = item.id;
this.imgObj.filesPath = item.downloadPath;
this.imgObj.filsesName = item.newName;
}
});
}
},
},
};
</script>
<style lang="less">
// @import "../../assets/css/custom.less";
.files-viewer {
.card1 {
height: 72vh;
.icon-click {
text-align: center;
font-size: 17px;
a {
border: 1px dashed #999;
}
}
.body-img {
height: 100%;
display: flex;
display: -webkit-flex;
// flex-direction:column;
justify-content: center; /*定义body的里的元素水平居中*/
.bg-b {
width: 40px;
height: 40px;
padding: 5px 0 0 -4px;
font-size: 40px;
color: #515a6e;
opacity: 0.2;
margin-top: 15%;
cursor: pointer;
background-color: rgba(131, 134, 139, 0.5);
border-radius: 50%;
}
.bg-b1 {
width: 40px;
height: 40px;
padding: 5px 0 0 -4px;
font-size: 40px;
color: #515a6e;
opacity: 0.6;
margin-top: 15%;
cursor: pointer;
background-color: rgba(131, 134, 139, 0.5);
border-radius: 50%;
}
.bg-l {
width: 40px;
height: 40px;
padding: 1px 0 0 4px;
margin-top: 15%;
font-size: 40px;
opacity: 0.2;
color: #515a6e;
cursor: pointer;
background-color: rgba(131, 134, 139, 0.5);
border-radius: 50%;
}
.bg-l1 {
width: 40px;
height: 40px;
padding: 1px 0 0 4px;
margin-top: 15%;
font-size: 40px;
color: #515a6e;
opacity: 0.6;
cursor: pointer;
background-color: rgba(131, 134, 139, 0.5);
border-radius: 50%;
}
.list-shoucang {
width: 96%;
text-align: center;
img {
padding-top: 10%;
}
.files-list {
width: 500px;
height: 300px;
margin: 10% auto;
border: 1px dashed #999;
padding-top: 90px;
p {
height: 50px;
}
}
}
}
}
.show-list-img {
width: 100%;
height: 25px;
font-size: 30px;
margin-top: -18px;
text-align: center;
div {
cursor: pointer;
}
}
.card-list {
width: 100%;
height: 160px;
margin-top: 15px;
position: relative;
padding-top: 5px;
.bg-b {
font-size: 30px;
color: #515a6e;
opacity: 0.2;
position: absolute;
top: 55px;
left: 0;
cursor: pointer;
}
.bg-b1 {
font-size: 30px;
color: #515a6e;
opacity: 0.6;
position: absolute;
top: 55px;
left: 0;
cursor: pointer;
}
.bg-l {
font-size: 30px;
color: #515a6e;
opacity: 0.2;
position: absolute;
top: 55px;
right: 0;
cursor: pointer;
}
.bg-l1 {
font-size: 30px;
color: #515a6e;
opacity: 0.6;
position: absolute;
top: 55px;
right: 0;
cursor: pointer;
}
.ivu-card-body {
width: 100%;
display: flex;
display: -webkit-flex;
text-align: center;
padding: 15px 37px;
overflow: hidden;
}
.ying-cang {
width: 100%;
overflow: hidden;
.list-c {
width: 100%;
text-align: center;
margin: 0 auto;
display: -webkit-inline-box;
display: inline-box;
.img-list {
width: 101px;
height: 101px;
margin: 10px 6px;
border: 1px dashed #999;
padding: 1px;
cursor: pointer;
}
.img-list:hover {
box-shadow: darkgrey 3px 3px 12px 3px; //边框阴影
}
.files-list {
overflow: hidden;
text-align: center;
p {
height: 25px;
}
}
}
}
}
.addclass {
border: 2px solid #2680eb !important;
}
}
// .files-view .ivu-card > .ivu-card-body {
// padding: 14px 0 0 5px;
// }
</style>
...@@ -81,7 +81,7 @@ export default { ...@@ -81,7 +81,7 @@ export default {
}, },
methods: { methods: {
handler() { handler() {
if (!this.disable) {
if (this.oprate == "delete" || this.oprate == "remove") { if (this.oprate == "delete" || this.oprate == "remove") {
this.$Modal.confirm({ this.$Modal.confirm({
title: this.title, title: this.title,
...@@ -94,7 +94,6 @@ export default { ...@@ -94,7 +94,6 @@ export default {
this.$emit("click", event); this.$emit("click", event);
} }
} }
}
}, },
watch: { watch: {
v() {}, v() {},
......
...@@ -1863,6 +1863,7 @@ export default { ...@@ -1863,6 +1863,7 @@ export default {
plansToEndTime: '计划结束时间', plansToEndTime: '计划结束时间',
completePercentage: '完成百分比', completePercentage: '完成百分比',
upTaskId: '上级任务Id', upTaskId: '上级任务Id',
workHour:'工时'
}, },
//工资记录 //工资记录
project_plan_record: { project_plan_record: {
......
...@@ -123,15 +123,15 @@ export default { ...@@ -123,15 +123,15 @@ export default {
this.detail = () => import("../plan"); this.detail = () => import("../plan");
}, },
task() { task() {
this.curId = this.eid; //this.curId = this.eid;
this.title = "任务"; this.title = "任务";
//this.detail = () => import("../task/index"); this.detail = () => import("../task/index");
this.$router.push({ // this.$router.push({
name: "project-task", // name: "project-task",
params: { // params: {
id: this.curId // id: this.curId
} // }
}); // });
}, },
group() { group() {
this.title = "项目成员"; this.title = "项目成员";
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<state code="project.main.type" :value="entity.type" /> <state code="project.main.type" :value="entity.type" />
</Filed> </Filed>
<Filed :span="24" :name="l('note') + ':'">{{ entity.note }}</Filed> <Filed :span="24" :name="l('note') + ':'">{{ entity.note }}</Filed>
<Filed :span="24" :name="l('attachment') + ':'"> <Filed :span="24" :name="l('attachment')">
<FilesView ref="refFile" :parms="parms" /> <FilesView ref="refFile" :parms="parms" />
<!-- <files <!-- <files
ref="refFile" ref="refFile"
...@@ -48,7 +48,7 @@ export default { ...@@ -48,7 +48,7 @@ export default {
data() { data() {
return { return {
avatorPath: "", avatorPath: "",
entity: this.row, entity: {},
parms: { parms: {
app: "material", app: "material",
eid: null, eid: null,
......
...@@ -123,14 +123,16 @@ ...@@ -123,14 +123,16 @@
> >
<component :is="detail" :eid="curId" @on-close="cancel" @on-ok="ok" /> <component :is="detail" :eid="curId" @on-close="cancel" @on-ok="ok" />
</Modal> </Modal>
<!-- width="800" -->
<Modal <Modal
v-model="modal1" v-model="modal1"
title="查看附件" title="查看附件"
width="800" fullscreen
footer-hide footer-hide
:mask-closable="false" :mask-closable="false"
> >
<FilesView ref="refFile" :parms="parms" /> <FilesViewer :parms="parms"/>
<!-- <FilesView ref="refFile" :parms="parms" /> -->
</Modal> </Modal>
</div> </div>
</template> </template>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<Col :span="12"> <Col :span="12">
<FormItem :label="l('workHour')" prop="workHour"> <FormItem :label="l('workHour')" prop="workHour">
<InputNumber v-model="entity.workHour"></InputNumber> <InputNumber v-model="entity.workHour" :min="0"></InputNumber>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
...@@ -51,7 +51,7 @@ export default { ...@@ -51,7 +51,7 @@ export default {
deleterUserId: null, deleterUserId: null,
projectId: "", projectId: "",
planId: "", planId: "",
workHour: null, workHour: 0,
status: null, status: null,
title: "", title: "",
note: "", note: "",
......
<template> <template>
<div> <div>
<DataGrid :columns="columns" ref="grid" :action="action"><template slot="easySearch"> <DataGrid :columns="columns" ref="grid" :data="recordList" :easy="false" :set="false" :height="400"><template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline> <Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys"><Input placeholder="请输入关键字标题" v-model="easySearch.keys.value" /> </FormItem> <FormItem prop="keys"><Input placeholder="请输入关键字标题" v-model="easySearch.keys.value" /> </FormItem>
<FormItem><Button type="primary" @click="search">查询</Button></FormItem> <FormItem><Button type="primary" @click="search">查询</Button></FormItem>
...@@ -32,6 +32,9 @@ export default { ...@@ -32,6 +32,9 @@ export default {
author: "henq", author: "henq",
description: "project_plan_record 10/20/2020 2:55:13 PM", description: "project_plan_record 10/20/2020 2:55:13 PM",
}, },
props: {
eid: String
},
data() { data() {
return { return {
action: Api.index, action: Api.index,
...@@ -46,78 +49,11 @@ export default { ...@@ -46,78 +49,11 @@ export default {
detail: null, detail: null,
curId: 0, curId: 0,
columns: [{ columns: [{
key: "id",
title: this.$t("id"),
hide: true,
align: "left",
high: true
},
{
key: "creationTime",
title: this.l("creationTime"),
align: "left",
high: true
},
{
key: "creatorUserId",
title: this.l("creatorUserId"),
align: "left",
high: true
},
{
key: "lastModificationTime",
title: this.l("lastModificationTime"),
align: "left",
high: true
},
{
key: "lastModifierUserId",
title: this.l("lastModifierUserId"),
align: "left",
high: true
},
{
key: "isDeleted",
title: this.l("isDeleted"),
align: "left",
high: true
},
{
key: "deletionTime",
title: this.l("deletionTime"),
align: "left",
high: true
},
{
key: "deleterUserId",
title: this.l("deleterUserId"),
align: "left",
high: true
},
{
key: "projectId",
title: this.l("projectId"),
align: "left",
high: true
},
{
key: "planId",
title: this.l("planId"),
align: "left",
high: true
},
{
key: "workHour", key: "workHour",
title: this.l("workHour"), title: this.l("workHour"),
align: "left", align: "right",
high: true
},
{
key: "status",
title: this.l("status"),
align: "left",
high: true, high: true,
code: 'mes.project_plan_record.Status' width: 120,
}, },
{ {
key: "title", key: "title",
...@@ -126,23 +62,21 @@ export default { ...@@ -126,23 +62,21 @@ export default {
easy: true, easy: true,
high: true high: true
}, },
{
key: "note",
title: this.l("note"),
align: "left",
high: true
},
{ {
key: "attachment", key: "attachment",
title: this.l("attachment"), title: this.l("attachment"),
align: "left", align: "center",
high: true high: true,
render: (h, params) => {
return h(
"a", {
on: {
click: () => this.viewFiles(params.row)
},
},
"查看附件"
);
}, },
{
key: "taskId",
title: this.l("taskId"),
align: "left",
high: true
}, },
{ {
title: '操作', title: '操作',
...@@ -181,11 +115,14 @@ export default { ...@@ -181,11 +115,14 @@ export default {
]) ])
} }
}, },
] ],
recordList: []
} }
}, },
mounted() { mounted() {
console.log(this); if (this.eid != '' && this.eid != null) {
this.load(this.eid);
}
}, },
async fetch({ async fetch({
store, store,
...@@ -194,6 +131,23 @@ export default { ...@@ -194,6 +131,23 @@ export default {
await store.dispatch('loadDictionary') // 加载数据字典 await store.dispatch('loadDictionary') // 加载数据字典
}, },
methods: { methods: {
load(v) {
let params = {
conditions: [{
fieldName: "taskId",
fieldValue: v,
conditionalType: "Equal",
}],
sortBy: "creationTime",
isDesc: false,
}
Api.list(params).then(r => {
if (r.success) {
this.recordList = r.result
}
})
},
ok() { ok() {
this.$refs.grid.load() this.$refs.grid.load()
this.modal = false this.modal = false
...@@ -234,6 +188,14 @@ export default { ...@@ -234,6 +188,14 @@ export default {
} }
}) })
}, },
viewFiles(row) {
if (row.attachment) {
this.parms.eid = row.attachment;
this.modal1 = true;
} else {
this.$Message.error("暂没上传附件");
}
},
cancel() { cancel() {
this.curId = 0; this.curId = 0;
this.modal = false this.modal = false
...@@ -242,6 +204,13 @@ export default { ...@@ -242,6 +204,13 @@ export default {
let vkey = "project_plan_record" + "." + key; let vkey = "project_plan_record" + "." + key;
return this.$t(vkey) || key return this.$t(vkey) || key
} }
},
watch: {
eid(v) {
if (v != '' && v != null) {
this.load(v);
}
}
} }
} }
</script> </script>
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
</a> </a>
</div> </div>
<Content class="content" :class="!showMenu?'con_bord':''"> <Content class="content" :class="!showMenu?'con_bord':''">
<DataGrid :columns="columns" ref="grid" :action="action" :conditions="easySearch" :lazy="true"> <DataGrid :columns="columns" ref="grid" :action="action" :conditions="easySearch" :lazy="true" :set="false">
<template slot="easySearch"> <template slot="easySearch">
<Form ref="formInline" inline> <Form ref="formInline" inline>
<FormItem> <FormItem>
...@@ -56,11 +56,13 @@ ...@@ -56,11 +56,13 @@
</FormItem> </FormItem>
<FormItem prop="keys"><Input placeholder="请输入项目标题/计划名称/任务标题" v-model="easySearch.keys.value" v-width="240" /> </FormItem> <FormItem prop="keys"><Input placeholder="请输入项目标题/计划名称/任务标题" v-model="easySearch.keys.value" v-width="240" /> </FormItem>
<FormItem><Button type="primary" @click="search">查询</Button></FormItem> <FormItem><Button type="primary" @click="search">查询</Button></FormItem>
<!--
<FormItem> <FormItem>
<Button @click="highSearch" type="text"> <Button @click="highSearch" type="text">
<Icon type="md-search" />高级 <Icon type="md-search" />高级
</Button> </Button>
</FormItem> </FormItem>
-->
</Form> </Form>
</template> </template>
<template slot="buttons"> <template slot="buttons">
...@@ -198,6 +200,22 @@ export default { ...@@ -198,6 +200,22 @@ export default {
align: "center", align: "center",
high: true, high: true,
}, },
{
key: "workHour",
title: this.l("workHour"),
align: "center",
high: true,
render: (h, params) => {
return h('a', {
attrs: {
oprate: 'detail'
},
on: {
click: () => this.viewWork(params.row.id)
}
}, params.row.workHour)
}
},
{ {
key: "note", key: "note",
title: this.l("note"), title: this.l("note"),
...@@ -227,14 +245,14 @@ export default { ...@@ -227,14 +245,14 @@ export default {
align: 'center', align: 'center',
render: (h, params) => { render: (h, params) => {
return h('div', { return h('div', {
class: "action actionCur" class: "action"
}, [ }, [
h('op', { h('op', {
attrs: { attrs: {
icon: "ios-play", icon: "md-arrow-dropright-circle",
type: "icon", type: "icon",
oprate: "edit",
title: params.row.status == 0 ? "开始" : params.row.status == 2 ? "继续" : '', title: params.row.status == 0 ? "开始" : params.row.status == 2 ? "继续" : '',
// color: "#19be6b",
//disable: (params.row.status == 0 || params.row.status == 2) ? false : true //disable: (params.row.status == 0 || params.row.status == 2) ? false : true
}, },
on: { on: {
...@@ -246,7 +264,6 @@ export default { ...@@ -246,7 +264,6 @@ export default {
// icon: "ios-pause", // icon: "ios-pause",
// type: "icon", // type: "icon",
// title: "暂停", // title: "暂停",
// //color: "#19be6b",
// //disable: params.row.status == 1 ? false : true // //disable: params.row.status == 1 ? false : true
// }, // },
// on: { // on: {
...@@ -255,10 +272,10 @@ export default { ...@@ -255,10 +272,10 @@ export default {
// }), // }),
h('op', { h('op', {
attrs: { attrs: {
icon: "md-checkbox-outline", icon: "ios-alarm",
type: "icon", type: "icon",
oprate: "edit",
title: "完成", title: "完成",
//color: "#19be6b",
//disable: (params.row.status != 0 && params.row.status != 3) ? false : true //disable: (params.row.status != 0 && params.row.status != 3) ? false : true
}, },
on: { on: {
...@@ -269,8 +286,8 @@ export default { ...@@ -269,8 +286,8 @@ export default {
attrs: { attrs: {
icon: "md-add", icon: "md-add",
type: "icon", type: "icon",
oprate: "add",
title: "新增记录", title: "新增记录",
//color: "#19be6b",
// disable: (params.row.status != 3 && params.row.status != 4) ? false : true // disable: (params.row.status != 3 && params.row.status != 4) ? false : true
}, },
on: { on: {
...@@ -279,10 +296,10 @@ export default { ...@@ -279,10 +296,10 @@ export default {
}), }),
h('op', { h('op', {
attrs: { attrs: {
icon: "ios-create-outline", icon: "md-create",
type: "icon", type: "icon",
oprate: "edit",
title: "修改", title: "修改",
// color: "#2b85e4",
//disable: (params.row.status == 0 || params.row.status == 2) ? false : true //disable: (params.row.status == 0 || params.row.status == 2) ? false : true
}, },
on: { on: {
...@@ -291,11 +308,10 @@ export default { ...@@ -291,11 +308,10 @@ export default {
}), }),
h('op', { h('op', {
attrs: { attrs: {
icon: "ios-trash-outline", icon: "md-trash",
type: "icon", type: "icon",
title: "删除", title: "删除",
oprate: 'delete', oprate: 'delete',
//color: "#ed4014",
// disable: (params.row.status == 0 || params.row.status == 3) ? false : true // disable: (params.row.status == 0 || params.row.status == 3) ? false : true
}, },
on: { on: {
...@@ -315,6 +331,9 @@ export default { ...@@ -315,6 +331,9 @@ export default {
planIdsCur: [] planIdsCur: []
} }
}, },
props: {
eid: String
},
async fetch({ async fetch({
store, store,
params params
...@@ -322,15 +341,18 @@ export default { ...@@ -322,15 +341,18 @@ export default {
await store.dispatch('loadDictionary') // 加载数据字典 await store.dispatch('loadDictionary') // 加载数据字典
}, },
created() { created() {
if (this.$route.params.id != '') { if (this.eid != '') {
this.projectId = this.$route.params.id this.projectId = this.eid
this.easySearch.projectId.value = this.$route.params.id this.easySearch.projectId.value = this.eid
} }
this.treeHeight = window.innerHeight - 150; this.treeHeight = window.innerHeight - 150;
}, },
mounted() { mounted() {
if (this.eid != "") {
this.easySearch.projectId.value = this.eid
this.$refs.grid.reload(this.easySearch); this.$refs.grid.reload(this.easySearch);
console.log(this.easySearch); }
}, },
methods: { methods: {
ok() { ok() {
...@@ -407,18 +429,17 @@ export default { ...@@ -407,18 +429,17 @@ export default {
}, },
projectId: { projectId: {
op: "Equal", op: "Equal",
value: this.$route.params.id value: this.eid
}, },
}; };
this.$refs.grid.reload(where); this.$refs.grid.reload(where);
}, },
updatestatus(valId, valStatus) { updatepart(valId, valStatus) {
let params = { let params = {
id: valId, id: valId,
status: valStatus, status: valStatus
detail: ''
} }
Api.updatestatus(params).then(r => { Api.updatepart(params).then(r => {
if (r.success) { if (r.success) {
this.$refs.grid.load(); this.$refs.grid.load();
this.$Message.success('操作成功') this.$Message.success('操作成功')
...@@ -441,10 +462,17 @@ export default { ...@@ -441,10 +462,17 @@ export default {
this.detail = () => import('./detail') this.detail = () => import('./detail')
this.modal = true; this.modal = true;
}, },
viewWork(id) {
this.curId = id;
this.title = "查看工时";
this.fullScreen = false;
this.detail = () => import('../record')
this.modal = true;
},
addRecord(id) { addRecord(id) {
this.curId = id; this.curId = id;
this.title = "新增记录"; this.title = "新增记录";
this.fullScreen = true; this.fullScreen = false;
this.detail = () => import('../record/add') this.detail = () => import('../record/add')
this.modal = true; this.modal = true;
}, },
...@@ -452,6 +480,13 @@ export default { ...@@ -452,6 +480,13 @@ export default {
let vkey = "project_task" + "." + key; let vkey = "project_task" + "." + key;
return this.$t(vkey) || key return this.$t(vkey) || key
} }
},
watch: {
eid(v) {
if (v != "") {
this.eid = v
}
}
} }
} }
</script> </script>
......
...@@ -77,6 +77,7 @@ import Pictrue from '@/components/page/pictrue.vue' ...@@ -77,6 +77,7 @@ import Pictrue from '@/components/page/pictrue.vue'
import WordTree from '@/components/page/wordTree.vue' import WordTree from '@/components/page/wordTree.vue'
import Actions from '@/components/page/actions.vue' import Actions from '@/components/page/actions.vue'
import TimeDifference from '@/components/page/timeDifference.vue' import TimeDifference from '@/components/page/timeDifference.vue'
import FilesViewer from '@/components/page/filesViewer.vue'
...@@ -159,7 +160,7 @@ Vue.component("WordTree", WordTree) ...@@ -159,7 +160,7 @@ Vue.component("WordTree", WordTree)
Vue.component("Actions", Actions) Vue.component("Actions", Actions)
Vue.component("TimeDifference", TimeDifference) Vue.component("TimeDifference", TimeDifference)
Vue.component("Life", Life) Vue.component("Life", Life)
Vue.component("FilesViewer",FilesViewer)
//注入mock //注入mock
......
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