Commit 43cb5531 authored by 仇晓婷's avatar 仇晓婷

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

parents 23ed2387 ea1b0bdb
...@@ -81,17 +81,18 @@ export default { ...@@ -81,17 +81,18 @@ export default {
}, },
methods: { methods: {
handler() { handler() {
if (this.disable == 0) {
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,
content: "<p>" + this.msg + "</p>", content: "<p>" + this.msg + "</p>",
onOk: () => { onOk: () => {
this.$emit("click", event); this.$emit("click", event);
} }
}); });
} else { } else {
this.$emit("click", event); this.$emit("click", event);
}
} }
} }
}, },
......
...@@ -88,6 +88,19 @@ export default { ...@@ -88,6 +88,19 @@ export default {
); );
}, },
}, },
{
key: "creatorUserId",
title: this.l("creatorUserId"),
align: "left",
high: true,
type: 'user'
},
{
key: "creationTime",
title: this.l("creationTime"),
align: "left",
high: true,
},
{ {
title: '操作', title: '操作',
key: 'action', key: 'action',
......
...@@ -15,6 +15,11 @@ ...@@ -15,6 +15,11 @@
<UserSelect ref="userSelected" v-model="entity.userId" /> <UserSelect ref="userSelected" v-model="entity.userId" />
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12">
<FormItem label="计划开始结束时间" prop="date">
<DatePicker type="datetimerange" format="yyyy-MM-dd" v-model="date" placeholder="请选择时间范围" @on-change="changeFormat" style="width: 300px"></DatePicker>
</FormItem>
</Col>
<Col :span="24"> <Col :span="24">
<FormItem :label="l('note')" prop="note"> <FormItem :label="l('note')" prop="note">
<i-quill v-model="entity.note" :height="300" v-paste="handleImg" /> <i-quill v-model="entity.note" :height="300" v-paste="handleImg" />
...@@ -40,29 +45,16 @@ export default { ...@@ -40,29 +45,16 @@ export default {
return { return {
disabled: false, disabled: false,
entity: { entity: {
creationTime: null,
creatorUserId: null,
lastModificationTime: null,
lastModifierUserId: null,
isDeleted: null,
deletionTime: null,
deleterUserId: null,
title: "", title: "",
planId: null, planId: '',
projectId: null, projectId: '',
level: null, level: null,
status: null, status: null,
projectTitle: "",
planTitle: "",
userIds: "", userIds: "",
userId: "", userId: "",
endDate: null,
note: "", note: "",
startDate: null, planstartdate: null,
plansToStartDate: null, planenddate: null,
plansToEndTime: null,
completePercentage: null,
upTaskId: null
}, },
rules: { rules: {
name: [{ name: [{
...@@ -124,6 +116,10 @@ export default { ...@@ -124,6 +116,10 @@ export default {
this.entity.id = 0; this.entity.id = 0;
}); });
}, },
changeFormat(val) {
this.entity.planstartdate = val[0];
this.entity.planenddate = val[1];
},
handleImg(e) { handleImg(e) {
console.warn(e) console.warn(e)
let file = null let file = null
......
<template> <template>
<div class="detail" style="width:100%"> <div class="detail" style="width:100%">
<Row style="height:284px"> <Row style="height:284px">
<Filed :span="6" :name="l('creationTime')">{{entity.creationTime}}</Filed>
<Filed :span="6" :name="l('creatorUserId')">
<User :value="entity.creatorUserId"></User>
</Filed>
<Filed :span="6" :name="l('title')">{{entity.title}}</Filed> <Filed :span="6" :name="l('title')">{{entity.title}}</Filed>
<Filed :span="6" :name="l('level')"> <Filed :span="6" :name="l('level')">
<state code="project.task.level" :value="entity.level" type="text"></state> <state code="project.task.level" :value="entity.level" type="text"></state>
...@@ -12,14 +8,25 @@ ...@@ -12,14 +8,25 @@
<Filed :span="6" :name="l('status')"> <Filed :span="6" :name="l('status')">
<state code="project.task.status" :value="entity.status" type="text"></state> <state code="project.task.status" :value="entity.status" type="text"></state>
</Filed> </Filed>
<Filed :span="6" :name="l('userId')">{{entity.userId}}</Filed> <Filed :span="6" :name="l('userId')">
<Filed :span="6" :name="l('endDate')">{{entity.endDate}}</Filed> <User :value="parseInt(entity.userId)"></User>
<Filed :span="6" :name="l('startDate')">{{entity.startDate}}</Filed> </Filed>
<Filed :span="12" name="计划起止日期">
<TimeDifference :timeValue="timeValuePlan" :work="1"></TimeDifference>
</Filed>
<Filed :span="12" name="实际起止日期">
<TimeDifference :timeValue="timeValue" :work="1"></TimeDifference>
</Filed>
<Filed :span="24" :name="l('note')"> <Filed :span="24" :name="l('note')">
<div style="height:200px" v-html="entity.note" class="tex_in10"></div> <div style="height:200px" v-html="entity.note" class="tex_in10"></div>
</Filed> </Filed>
<Filed :span="6" :name="l('creationTime')">{{entity.creationTime}}</Filed>
<Filed :span="6" :name="l('creatorUserId')">
<User :value="entity.creatorUserId"></User>
</Filed>
</Row> </Row>
<component :is="detail" :eid="curId" /> <component :is="detail" :eid="curId" v-if="false" />
</div> </div>
</template> </template>
...@@ -30,6 +37,14 @@ export default { ...@@ -30,6 +37,14 @@ export default {
data() { data() {
return { return {
entity: {}, entity: {},
timeValue: {
startDate: "",
endDate: "",
},
timeValuePlan: {
planStartDate: "",
planEndDate: "",
},
rules: { rules: {
name: [{ name: [{
required: true, required: true,
...@@ -60,9 +75,17 @@ export default { ...@@ -60,9 +75,17 @@ export default {
id: v id: v
}).then(r => { }).then(r => {
this.entity = r.result; this.entity = r.result;
this.$emit('on-load') this.timeValue = {
this.curId = v startDate: r.result.startDate,
this.detail = () => import('../record/index1') endDate: r.result.endDate,
},
this.timeValuePlan = {
planStartDate: r.result.planStartDate,
planEndDate: r.result.planEndDate,
},
this.$emit('on-load')
// this.curId = v
//this.detail = () => import('../record/index1')
}) })
}, },
......
<template> <template>
<Layout class="full"> <Layout class="full">
<Sider hide-trigger v-if="showMenu" class="menu_side" width="300"> <Sider hide-trigger v-if="showMenu" class="menu_side" width="300">
<ProjectTaskTree <ProjectTaskTree :curId="projectId" @on-hide="onHide" @on-select="productSearch" />
:curId="projectId"
@on-hide="onHide"
@on-select="productSearch"
/>
</Sider> </Sider>
<div v-if="!showMenu" class="show_menu"> <div v-if="!showMenu" class="show_menu">
<a class="menu_play fr" @click="showMenuFn" title="展开"> <a class="menu_play fr" @click="showMenuFn" title="展开">
<Icon type="ios-arrow-forward" size="24" /> <Icon type="ios-arrow-forward" size="24" />
</a> </a>
</div> </div>
<Content class="content" :class="!showMenu ? 'con_bord' : ''"> <Content class="content" :class="!showMenu?'con_bord':''">
<DataGrid <DataGrid :columns="columns" ref="grid" :action="action" :conditions="easySearch" :lazy="true">
:columns="columns" <template slot="easySearch">
ref="grid" <Form ref="formInline" inline>
:action="action" <FormItem>
:conditions="easySearch" <div class="taskMenu">
:lazy="true" <Menu mode="horizontal" active-name="2" @on-select="onSelect">
:set="false" <MenuItem name="1">
> 所有
<template slot="easySearch"> </MenuItem>
<Form ref="formInline" inline> <MenuItem name="2">
<FormItem> 未关闭
<div class="taskMenu"> </MenuItem>
<Menu mode="horizontal" active-name="2" @on-select="onSelect"> <MenuItem name="3">
<MenuItem name="1"> 所有 </MenuItem> 指派给我
<MenuItem name="2"> 未关闭 </MenuItem> </MenuItem>
<MenuItem name="3"> 指派给我 </MenuItem> <MenuItem name="4">
<MenuItem name="4"> 由我参与 </MenuItem> 由我参与
<MenuItem name="5"> 已延期 </MenuItem> </MenuItem>
<!-- <MenuItem name="5">
已延期
</MenuItem>
<!--
<Submenu name="6"> <Submenu name="6">
<template slot="title"> <template slot="title">
更多 更多
...@@ -43,557 +42,536 @@ ...@@ -43,557 +42,536 @@
</MenuGroup> </MenuGroup>
</Submenu> </Submenu>
--> -->
</Menu> </Menu>
</div> </div>
<div class="taskTab" v-if="false"> <div class="taskTab" v-if="false">
<Tabs value="statu2"> <Tabs value="statu2">
<TabPane label="所有" name="statu1" /> <TabPane label="所有" name="statu1" />
<TabPane label="未关闭" name="statu2" /> <TabPane label="未关闭" name="statu2" />
<TabPane label="指派给我" name="statu3" /> <TabPane label="指派给我" name="statu3" />
<TabPane label="由我参与" name="statu4" /> <TabPane label="由我参与" name="statu4" />
<TabPane label="已延期" name="statu5" /> <TabPane label="已延期" name="statu5" />
</Tabs> </Tabs>
</div> </div>
</FormItem> </FormItem>
<FormItem prop="keys" <FormItem prop="keys"><Input placeholder="请输入项目标题/计划名称/任务标题" v-model="easySearch.keys.value" v-width="240" /> </FormItem>
><Input <FormItem><Button type="primary" @click="search">查询</Button></FormItem>
placeholder="请输入项目标题/计划名称/任务标题" <!--
v-model="easySearch.keys.value"
v-width="240"
/>
</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">
<Button type="primary" @click="add">新增</Button> <Button type="primary" @click="add">新增</Button>
</template> </template>
<template slot="batch"> <template slot="batch">
<Button type="primary" class="mr10 ml10">开始</Button> <Button type="primary" class="mr10 ml10">开始</Button>
<Button type="primary" class="mr10 ml10">暂停</Button> <Button type="primary" class="mr10 ml10">暂停</Button>
<Button type="primary" class="mr10 ml10">继续</Button> <Button type="primary" class="mr10 ml10">继续</Button>
</template> </template>
</DataGrid> </DataGrid>
<Modal <Modal v-model="modal" :title="title" width="1200" :fullscreen="fullScreen" footer-hide>
v-model="modal" <component :is="detail" :eid="curId" :pid="planId" @on-close="cancel" @on-ok="ok" />
:title="title" </Modal>
width="1200"
:fullscreen="fullScreen"
footer-hide
>
<component
:is="detail"
:eid="curId"
:pid="planId"
@on-close="cancel"
@on-ok="ok"
/>
</Modal>
</Content> </Content>
</Layout> </Layout>
</template> </template>
<script> <script>
import Api from "./api"; import Api from './api'
import Search from "./search"; import Search from './search'
export default { export default {
name: "list", name: 'list',
components: { components: {
Search, Search,
}, },
head: { head: {
title: "", title: "",
author: "henq", author: "henq",
description: "project_task 10/20/2020 9:27:58 AM", description: "project_task 10/20/2020 9:27:58 AM",
}, },
data() { data() {
return { return {
action: Api.index, action: Api.index,
showMenu: true, showMenu: true,
easySearch: { easySearch: {
keys: { keys: {
op: "title", op: "title",
value: null, value: null
}, },
projectId: { projectId: {
op: "Equal", op: "Equal",
value: "", value: ''
},
planId: {
op: "In",
value: []
}
},
theme1: 'light',
modal: false,
title: "新增",
detail: null,
curId: '',
fullScreen: false,
projectId: '',
columns: [
// {
// key: "selection",
// type: "selection",
// width: 50,
// align: "center"
// },
{
key: "id",
title: this.$t("id"),
align: "left",
high: true,
hide: true,
},
{
key: "title",
title: this.l("title"),
align: "left",
easy: true,
high: true,
render: (h, params) => {
return h('a', {
attrs: {
oprate: 'detail'
},
on: {
click: () => this.viewRecord(params.row.id)
}
}, params.row.title)
}
},
{
key: "level",
title: this.l("level"),
align: "center",
high: true,
code: 'project.task.level'
},
{
key: "projectTitle",
title: this.l("projectTitle"),
align: "left",
easy: true,
high: true,
hide: true,
},
{
key: "planTitle",
title: this.l("planTitle"),
align: "left",
easy: true,
high: true,
hide: true,
},
{
key: "status",
title: this.l("status"),
align: "center",
high: true,
code: 'project.task.status'
},
{
key: "userId",
title: this.l("userId"),
align: "left",
high: true,
type: 'user'
},
{
key: "startDate",
title: '计划起止日期',
align: "center",
high: true,
width: 400,
render: (h, params) => {
return h('TimeDifference', {
props: {
timeValue: {
startDate: params.row.planstartdate,
endDate: params.row.planenddate,
},
work: 1
}
})
}
},
{
key: "startDate",
title: '实际起止日期',
align: "center",
high: true,
width: 400,
render: (h, params) => {
return h('TimeDifference', {
props: {
timeValue: {
startDate: params.row.startDate,
endDate: params.row.endDate,
},
work: 1
}
})
}
},
{
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",
title: this.l("note"),
align: "left",
high: true,
hide: true
},
{
key: "creatorUserId",
title: this.l("creatorUserId"),
align: "left",
high: true,
type: 'user'
},
{
key: "creationTime",
title: this.l("creationTime"),
align: "left",
high: true,
},
{
title: '操作',
key: 'action',
width: 200,
align: 'center',
render: (h, params) => {
return h('div', {
class: "action"
}, [
h('op', {
attrs: {
icon: "md-arrow-dropright-circle",
type: "icon",
oprate: "edit",
title: params.row.status == 0 ? "开始" : params.row.status == 2 ? "继续" : '',
disable: params.row.status
//disable: (params.row.status == 0 || params.row.status == 2) ? false : true
},
on: {
click: () => this.updatepart(params.row.id, 1)
}
}),
// h('op', {
// attrs: {
// icon: "ios-pause",
// type: "icon",
// title: "暂停",
// //disable: params.row.status == 1 ? false : true
// },
// on: {
// click: () => this.updatepart(params.row.id, 2)
// }
// }),
h('op', {
attrs: {
icon: "ios-alarm",
type: "icon",
oprate: "edit",
title: "完成",
//disable: (params.row.status != 0 && params.row.status != 3) ? false : true
},
on: {
click: () => this.updatepart(params.row.id, 2)
}
}),
h('op', {
attrs: {
icon: "md-add",
type: "icon",
oprate: "add",
title: "新增记录",
disable: params.row.status == 1 ? 0 : 1
// disable: (params.row.status != 3 && params.row.status != 4) ? false : true
},
on: {
click: () => this.addRecord(params.row.id)
}
}),
h('op', {
attrs: {
icon: "md-create",
type: "icon",
oprate: "edit",
title: "修改",
disable: params.row.status
//disable: (params.row.status == 0 || params.row.status == 2) ? false : true
},
on: {
click: () => this.edit(params.row.id)
}
}),
h('op', {
attrs: {
icon: "md-trash",
type: "icon",
title: "删除",
oprate: 'delete',
disable: params.row.status
// disable: (params.row.status == 0 || params.row.status == 3) ? false : true
},
on: {
click: () => this.remove(params.row.id)
}
})
])
}
},
],
data1: [{
id: 1,
title: '测试title'
}],
data: [],
planId: '', //当前计划Id
planIdsCur: []
}
},
props: {
eid: String
},
async fetch({
store,
params
}) {
await store.dispatch('loadDictionary') // 加载数据字典
},
created() {
if (this.eid != '') {
this.projectId = this.eid
this.easySearch.projectId.value = this.eid
}
this.treeHeight = window.innerHeight - 150;
},
mounted() {
if (this.eid != "") {
this.easySearch.projectId.value = this.eid
this.$refs.grid.reload(this.easySearch);
}
},
methods: {
ok() {
this.$refs.grid.load()
this.modal = false
this.curId = 0;
}, },
planId: { search() {
op: "In", this.easySearch.planId.value = this.planIdsCur
value: [], this.$refs.grid.reload(this.easySearch)
}, },
}, add() {
theme1: "light", this.curId = this.projectId;
modal: false, this.title = "新增";
title: "新增", this.fullScreen = false;
detail: null, this.detail = () => import('./add')
curId: "", this.modal = true;
fullScreen: false,
projectId: "",
columns: [
// {
// key: "selection",
// type: "selection",
// width: 50,
// align: "center"
// },
{
key: "id",
title: this.$t("id"),
align: "left",
high: true,
hide: true,
}, },
{ highSearch() {
key: "title", this.curId = 0;
title: this.l("title"), this.title = "高级搜索";
align: "left", this.fullScreen = false;
easy: true, this.detail = () => import('./search')
high: true, this.modal = true;
render: (h, params) => {
return h(
"a",
{
attrs: {
oprate: "detail",
},
on: {
click: () => this.viewRecord(params.row.id),
},
},
params.row.title
);
},
}, },
{ copy(id) {
key: "level", this.curId = id;
title: this.l("level"), this.title = "克隆";
align: "center", this.fullScreen = false;
high: true, this.detail = () => import('./add')
code: "project.task.level", this.modal = true;
}, },
{ view(id) {
key: "projectTitle", this.curId = id;
title: this.l("projectTitle"), this.title = "详情";
align: "left", this.fullScreen = false;
easy: true, this.detail = () => import('./detail')
high: true, this.modal = true;
hide: true,
}, },
{ edit(id) {
key: "planTitle", this.curId = id;
title: this.l("planTitle"), this.title = "编辑";
align: "left", this.fullScreen = false;
easy: true, this.detail = () => import('./edit')
high: true, this.modal = true;
hide: true,
}, },
{ remove(id) {
key: "status", Api.delete(id).then((r) => {
title: this.l("status"), if (r.success) {
align: "center", this.$refs.grid.load();
high: true, this.$Message.success('删除成功')
code: "project.task.status", }
})
}, },
cancel() {
{ this.curId = 0;
key: "userId", this.modal = false
title: this.l("userId"),
align: "left",
high: true,
type: "user",
}, },
{ onHide() {
key: "startDate", // this.$Message.info("收起左侧树")
title: this.l("startDate"), this.showMenu = false;
align: "center",
high: true,
}, },
{ showMenuFn() {
key: "endDate", //this.$Message.info("展开左侧树")
title: this.l("endDate"), this.showMenu = true;
align: "center",
high: true,
}, },
{ productSearch(id, item, planIds) {
key: "workHour", this.planId = item.selected ? id : '';
title: this.l("workHour"), this.planIdsCur = item.selected ? planIds : []
align: "center", let where = {
high: true, planId: {
render: (h, params) => { op: "In",
return h( value: item.selected ? planIds : []
"a",
{
attrs: {
oprate: "detail",
}, },
on: { projectId: {
click: () => this.viewWork(params.row.id), op: "Equal",
value: this.eid
}, },
}, };
params.row.workHour this.$refs.grid.reload(where);
);
},
}, },
{ updatepart(valId, valStatus) {
key: "note", let params = {
title: this.l("note"), id: valId,
align: "left", status: valStatus
high: true, }
hide: true, if (valStatus == 1) {
params.startDate = ''
}
if (valStatus == 2) {
params.endDate = ''
}
Api.updatepart(params).then(r => {
if (r.success) {
this.$refs.grid.load();
this.$Message.success('操作成功')
} else {
this.$Message.error('操作失败')
}
}).catch(err => {
this.disabled = false;
this.$Message.error('操作失败')
console.warn(err)
})
}, },
{ onSelect(val) {
key: "creationTime", this.$refs.grid.reload(this.easySearch)
title: this.l("creationTime"),
align: "left",
high: true,
hide: true,
}, },
{ viewRecord(id) {
key: "creatorUserId", this.curId = id;
title: this.l("creatorUserId"), this.title = "查看记录";
align: "left", this.fullScreen = true;
high: true, this.detail = () => import('./detail')
hide: true, this.modal = true;
type: "user",
}, },
{ viewWork(id) {
title: "操作", this.curId = id;
key: "action", this.title = "查看工时";
width: 200, this.fullScreen = false;
align: "center", this.detail = () => import('../record')
render: (h, params) => { this.modal = true;
return h(
"div",
{
class: "action",
},
[
h("op", {
attrs: {
icon: "md-arrow-dropright-circle",
type: "icon",
oprate: "edit",
title:
params.row.status == 0
? "开始"
: params.row.status == 2
? "继续"
: "",
//disable: (params.row.status == 0 || params.row.status == 2) ? false : true
},
on: {
click: () => this.updatepart(params.row.id, 1),
},
}),
// h('op', {
// attrs: {
// icon: "ios-pause",
// type: "icon",
// title: "暂停",
// //disable: params.row.status == 1 ? false : true
// },
// on: {
// click: () => this.updatepart(params.row.id, 2)
// }
// }),
h("op", {
attrs: {
icon: "ios-alarm",
type: "icon",
oprate: "edit",
title: "完成",
//disable: (params.row.status != 0 && params.row.status != 3) ? false : true
},
on: {
click: () => this.updatepart(params.row.id, 3),
},
}),
h("op", {
attrs: {
icon: "md-add",
type: "icon",
oprate: "add",
title: "新增记录",
// disable: (params.row.status != 3 && params.row.status != 4) ? false : true
},
on: {
click: () => this.addRecord(params.row.id),
},
}),
h("op", {
attrs: {
icon: "md-create",
type: "icon",
oprate: "edit",
title: "修改",
//disable: (params.row.status == 0 || params.row.status == 2) ? false : true
},
on: {
click: () => this.edit(params.row.id),
},
}),
h("op", {
attrs: {
icon: "md-trash",
type: "icon",
title: "删除",
oprate: "delete",
// disable: (params.row.status == 0 || params.row.status == 3) ? false : true
},
on: {
click: () => this.remove(params.row.id),
},
}),
]
);
},
}, },
], addRecord(id) {
data1: [ this.curId = id;
{ this.title = "新增记录";
id: 1, this.fullScreen = false;
title: "测试title", this.detail = () => import('../record/add')
this.modal = true;
}, },
], l(key) {
data: [], let vkey = "project_task" + "." + key;
planId: "", //当前计划Id return this.$t(vkey) || key
planIdsCur: [],
};
},
props: {
eid: String,
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
created() {
if (this.eid != "") {
this.projectId = this.eid;
this.easySearch.projectId.value = this.eid;
}
this.treeHeight = window.innerHeight - 150;
},
mounted() {
if (this.eid != "") {
this.easySearch.projectId.value = this.eid;
this.$refs.grid.reload(this.easySearch);
}
},
methods: {
ok() {
this.$refs.grid.load();
this.modal = false;
this.curId = 0;
},
search() {
this.easySearch.planId.value = this.planIdsCur;
this.$refs.grid.reload(this.easySearch);
},
add() {
this.curId = this.projectId;
this.title = "新增";
this.fullScreen = false;
this.detail = () => import("./add");
this.modal = true;
},
highSearch() {
this.curId = 0;
this.title = "高级搜索";
this.fullScreen = false;
this.detail = () => import("./search");
this.modal = true;
},
copy(id) {
this.curId = id;
this.title = "克隆";
this.fullScreen = false;
this.detail = () => import("./add");
this.modal = true;
},
view(id) {
this.curId = id;
this.title = "详情";
this.fullScreen = false;
this.detail = () => import("./detail");
this.modal = true;
},
edit(id) {
this.curId = id;
this.title = "编辑";
this.fullScreen = false;
this.detail = () => import("./edit");
this.modal = true;
},
remove(id) {
Api.delete(id).then((r) => {
if (r.success) {
this.$refs.grid.load();
this.$Message.success("删除成功");
} }
});
},
cancel() {
this.curId = 0;
this.modal = false;
},
onHide() {
// this.$Message.info("收起左侧树")
this.showMenu = false;
},
showMenuFn() {
//this.$Message.info("展开左侧树")
this.showMenu = true;
},
productSearch(id, item, planIds) {
this.planId = item.selected ? id : "";
this.planIdsCur = item.selected ? planIds : [];
let where = {
planId: {
op: "In",
value: item.selected ? planIds : [],
},
projectId: {
op: "Equal",
value: this.eid,
},
};
this.$refs.grid.reload(where);
},
updatepart(valId, valStatus) {
let params = {
id: valId,
status: valStatus,
};
Api.updatepart(params)
.then((r) => {
if (r.success) {
this.$refs.grid.load();
this.$Message.success("操作成功");
} else {
this.$Message.error("操作失败");
}
})
.catch((err) => {
this.disabled = false;
this.$Message.error("操作失败");
console.warn(err);
});
},
onSelect(val) {
this.$refs.grid.reload(this.easySearch);
}, },
viewRecord(id) { watch: {
this.curId = id; eid(v) {
this.title = "查看记录"; if (v != "") {
this.fullScreen = true; this.eid = v
this.detail = () => import("./detail"); }
this.modal = true; }
}, }
viewWork(id) { }
this.curId = id;
this.title = "查看工时";
this.fullScreen = false;
this.detail = () => import("../record");
this.modal = true;
},
addRecord(id) {
this.curId = id;
this.title = "新增记录";
this.fullScreen = false;
this.detail = () => import("../record/add");
this.modal = true;
},
l(key) {
let vkey = "project_task" + "." + key;
return this.$t(vkey) || key;
},
},
watch: {
eid(v) {
if (v != "") {
this.eid = v;
}
},
},
};
</script> </script>
<style lang="less"> <style lang="less">
@import "../../../assets/css/custom.less";
.full { .full {
margin-top: 0; margin-top: 0;
.content { .content {
margin-top: 10px; margin-top: 10px;
.ivu-icon-ios-add:before { .ivu-icon-ios-add:before {
content: "\f341"; content: "\f341";
} }
.ivu-icon-ios-remove:before { .ivu-icon-ios-remove:before {
content: "\f33d"; content: "\f33d";
}
} }
}
.ivu-layout-sider {
background: @layout-content-bg-color;
margin-right: 10px;
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.15);
// height: 89vh;
overflow: auto;
}
.ivu-layout-content {
margin-left: 5px;
background: @right-bg;
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.15);
overflow: auto;
padding: 10px;
// height: 89vh;
}
} }
.taskTab .ivu-tabs-bar { .taskTab .ivu-tabs-bar {
border-bottom: 1px solid #fff; border-bottom: 1px solid #fff;
margin-bottom: 2px; margin-bottom: 2px;
} }
.taskMenu { .taskMenu {
font-size: 12px; font-size: 12px;
.ivu-menu-horizontal { .ivu-menu-horizontal {
height: 30px; height: 30px;
line-height: 30px; line-height: 30px;
} }
.ivu-menu-light { .ivu-menu-light {
&:after { &:after {
height: 0px !important; height: 0px !important;
}
} }
}
} }
.actionCur { .actionCur {
a { a {
span { span {
padding: 4px; padding: 4px;
} }
i { i {
padding: 4px; padding: 4px;
border-radius: 3px; border-radius: 3px;
font-weight: bold; font-weight: bold;
font-size: 18px; font-size: 18px;
}
} }
}
} }
</style> </style>
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