Commit 073a6da5 authored by 周远喜's avatar 周远喜

ok

parent 05765173
...@@ -11,7 +11,7 @@ export default { ...@@ -11,7 +11,7 @@ export default {
name: 'dtSpan', name: 'dtSpan',
data() { data() {
return { return {
date:"" date:"33333"
} }
}, },
props: { props: {
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<table> <table>
<thead> <thead>
<tr> <tr>
<th v-for="(column, index) in cloneColumns" :key="index"> <th v-for="(column, index) in columns" :key="index" :style="tdStyle(column)">
<label v-if="column.type === 'selection'"> <label v-if="column.type === 'selection'">
<Checkbox v-model="all"></Checkbox> <Checkbox v-model="all"></Checkbox>
</label> </label>
...@@ -81,6 +81,13 @@ ...@@ -81,6 +81,13 @@
<div v-if="column.type === 'icons'"> <div v-if="column.type === 'icons'">
<Icon :type="item[column.key]" size="20" /> <Icon :type="item[column.key]" size="20" />
</div> </div>
<DTSpan v-if="column.type=='date'" :value="item[column.key]"/>
<div v-if="column.type=='user'">
<User :value="item[column.key]"/>
</div>
<div v-if="column.type=='users'&&item[column.key]">
<User v-for="li in JSON.parse(item[column.key])" :value="li" :key="li" class="ml10"/>
</div>
<state <state
v-if="column.code" v-if="column.code"
:code="column.code" :code="column.code"
...@@ -108,7 +115,7 @@ ...@@ -108,7 +115,7 @@
{{ renderBody(item, column) }} {{ renderBody(item, column) }}
</label> </label>
<table-expand <table-expand
v-if="column.render && !column.type && !column.solt" v-if="column.render && !column.type&&!column.solt"
:row="item" :row="item"
:column="column" :column="column"
:index="snum" :index="snum"
...@@ -656,6 +663,7 @@ export default { ...@@ -656,6 +663,7 @@ export default {
beforeDestroy() { beforeDestroy() {
window.onresize = null; window.onresize = null;
}, },
}; };
</script> </script>
<style lang="less"> <style lang="less">
......
...@@ -1812,7 +1812,7 @@ export default { ...@@ -1812,7 +1812,7 @@ export default {
upId: '父级', upId: '父级',
title: '标题', title: '标题',
status: '状态', status: '状态',
note: '备注', note: '描述',
startDate: '开始日期', startDate: '开始日期',
endDate: '结束日期', endDate: '结束日期',
type: '类型', type: '类型',
......
...@@ -43,26 +43,26 @@ ...@@ -43,26 +43,26 @@
><FormItem :label="l('deleterUserId')" prop="deleterUserId"> ><FormItem :label="l('deleterUserId')" prop="deleterUserId">
<InputNumber v-model="entity.deleterUserId"></InputNumber> </FormItem <InputNumber v-model="entity.deleterUserId"></InputNumber> </FormItem
></Col> --> ></Col> -->
<Col :span="12" <!-- <Col :span="12"
><FormItem :label="l('projectId')" prop="projectId"> ><FormItem :label="l('projectId')" prop="projectId">
<Input v-model="entity.projectId"></Input> </FormItem <Input v-model="entity.projectId"></Input> </FormItem
></Col> ></Col>
<Col :span="12" <Col :span="12"
><FormItem :label="l('upId')" prop="upId"> ><FormItem :label="l('upId')" prop="upId">
<Input v-model="entity.upId"></Input> </FormItem <Input v-model="entity.upId"></Input> </FormItem
></Col> ></Col> -->
<Col :span="12" <Col :span="24"
><FormItem :label="l('title')" prop="title"> ><FormItem :label="l('title')" prop="title">
<Input v-model="entity.title"> </Input> </FormItem <Input v-model="entity.title"> </Input> </FormItem
></Col> ></Col>
<Col :span="12" <!-- <Col :span="12"
><FormItem :label="l('status')" prop="status"> ><FormItem :label="l('status')" prop="status">
<Dictionary <Dictionary
code="mes.project_plan.Status" code="mes.project_plan.Status"
v-model="entity.status" v-model="entity.status"
type="radio" type="radio"
></Dictionary> </FormItem ></Dictionary> </FormItem
></Col> ></Col> -->
<Col :span="24" <Col :span="24"
><FormItem :label="l('note')" prop="note"> ><FormItem :label="l('note')" prop="note">
<Input <Input
...@@ -93,20 +93,24 @@ ...@@ -93,20 +93,24 @@
type="radio" type="radio"
></Dictionary> </FormItem ></Dictionary> </FormItem
></Col> ></Col>
<Col :span="12"
><FormItem :label="l('attachment')" prop="attachment">
<!-- <files ref="refFile" parms="parms" v-model="entity.attachment" files />-->
</FormItem
></Col>
<Col :span="12" <Col :span="12"
><FormItem :label="l('executor')" prop="executor"> ><FormItem :label="l('executor')" prop="executor">
<Input v-model="entity.executor"> </Input> </FormItem <UserSelect v-model="entity.executor" multiple></UserSelect>
</FormItem>
</Col
>
<Col :span="24"
><FormItem :label="l('attachment')" prop="attachment">
<files
ref="refFile"
parms="parms"
v-model="entity.attachment"
files
/> </FormItem
></Col> ></Col>
</Row> </Row>
<FormItem> <FormItem>
<Button type="primary" @click="handleSubmit" noClick <Button type="primary" @click="handleSubmit" noClick>保存</Button>
>保存</Button
>
<Button @click="handleClose" class="ml20">取消</Button> <Button @click="handleClose" class="ml20">取消</Button>
</FormItem> </FormItem>
</Form> </Form>
...@@ -124,7 +128,7 @@ export default { ...@@ -124,7 +128,7 @@ export default {
// isDeleted: null, // isDeleted: null,
// deletionTime: null, // deletionTime: null,
// deleterUserId: null, // deleterUserId: null,
projectId: "33930562-a9f7-bd95-88ab-d01eb1c4c369", projectId: this.v.projectId,
upId: this.v.id, upId: this.v.id,
title: "", title: "",
status: 0, status: 0,
...@@ -137,7 +141,7 @@ export default { ...@@ -137,7 +141,7 @@ export default {
}, },
parmsName: "app=material&eid=1&name=ProjectPlan", parmsName: "app=material&eid=1&name=ProjectPlan",
rules: { rules: {
name: [{ required: true, message: "必填", trigger: "blur" }], title: [{ required: true, message: "必填", trigger: "blur" }],
}, },
}; };
}, },
......
<template> <template>
<Form ref="form" :model="entity" :rules="rules" :label-width="90"> <Form ref="form" :model="entity" :rules="rules" :label-width="90">
<Row> <Row>
<Col :span="12" <!-- <Col :span="12"
><FormItem :label="l('creationTime')" prop="creationTime"> ><FormItem :label="l('creationTime')" prop="creationTime">
<DatePicker <DatePicker
type="date" type="date"
...@@ -42,26 +42,27 @@ ...@@ -42,26 +42,27 @@
<Col :span="12" <Col :span="12"
><FormItem :label="l('deleterUserId')" prop="deleterUserId"> ><FormItem :label="l('deleterUserId')" prop="deleterUserId">
<InputNumber v-model="entity.deleterUserId"></InputNumber> </FormItem <InputNumber v-model="entity.deleterUserId"></InputNumber> </FormItem
></Col> ></Col> -->
<Col :span="12" <!-- <Col :span="12"
><FormItem :label="l('projectId')" prop="projectId"> ><FormItem :label="l('projectId')" prop="projectId">
<InputNumber v-model="entity.projectId"></InputNumber> </FormItem <Input v-model="entity.projectId"></Input> </FormItem
></Col> ></Col>
<Col :span="12" <Col :span="12"
><FormItem :label="l('upId')" prop="upId"> ><FormItem :label="l('upId')" prop="upId">
<InputNumber v-model="entity.upId"></InputNumber> </FormItem <Input v-model="entity.upId"></Input> </FormItem
></Col> ></Col> -->
<Col :span="12" <Col :span="24"
><FormItem :label="l('title')" prop="title"> ><FormItem :label="l('title')" prop="title">
<Input v-model="entity.title"> </Input> </FormItem <Input v-model="entity.title"> </Input> </FormItem
></Col> ></Col>
<Col :span="12" <!-- <Col :span="12"
><FormItem :label="l('status')" prop="status"> ><FormItem :label="l('status')" prop="status">
<Dictionary <Dictionary
code="mes.project_plan.Status" code="mes.project_plan.Status"
v-model="entity.status" v-model="entity.status"
type="radio"
></Dictionary> </FormItem ></Dictionary> </FormItem
></Col> ></Col> -->
<Col :span="24" <Col :span="24"
><FormItem :label="l('note')" prop="note"> ><FormItem :label="l('note')" prop="note">
<Input <Input
...@@ -89,19 +90,27 @@ ...@@ -89,19 +90,27 @@
<Dictionary <Dictionary
code="mes.project_plan.Type" code="mes.project_plan.Type"
v-model="entity.type" v-model="entity.type"
type="radio"
></Dictionary> </FormItem ></Dictionary> </FormItem
></Col> ></Col>
<Col :span="12"
><FormItem :label="l('attachment')" prop="attachment">
<Input v-model="entity.attachment"> </Input> </FormItem
></Col>
<Col :span="12" <Col :span="12"
><FormItem :label="l('executor')" prop="executor"> ><FormItem :label="l('executor')" prop="executor">
<Input v-model="entity.executor"> </Input> </FormItem <UserSelect v-model="entity.executor" multiple></UserSelect>
</FormItem>
</Col
>
<Col :span="24"
><FormItem :label="l('attachment')" prop="attachment">
<files
ref="refFile"
parms="parms"
v-model="entity.attachment"
files
/> </FormItem
></Col> ></Col>
</Row> </Row>
<FormItem> <FormItem>
<Button type="primary" @click="handleSubmit" v-noClick>保存</Button> <Button type="primary" @click="handleSubmit" noClick>保存</Button>
<Button @click="handleClose" class="ml20">取消</Button> <Button @click="handleClose" class="ml20">取消</Button>
</FormItem> </FormItem>
</Form> </Form>
...@@ -114,15 +123,15 @@ export default { ...@@ -114,15 +123,15 @@ export default {
return { return {
entity: {}, entity: {},
rules: { rules: {
name: [{ required: true, message: "必填", trigger: "blur" }], title: [{ required: true, message: "必填", trigger: "blur" }],
}, },
}; };
}, },
props: { props: {
eid: Number, eid: [Number,String],
}, },
mounted() { mounted() {
if (this.eid > 0) { if (this.eid) {
this.load(this.eid); this.load(this.eid);
} }
}, },
...@@ -130,6 +139,7 @@ export default { ...@@ -130,6 +139,7 @@ export default {
load(v) { load(v) {
Api.get({ id: v }).then((r) => { Api.get({ id: v }).then((r) => {
this.entity = r.result; this.entity = r.result;
this.entity.executor=JSON.parse(this.entity.executor);
}); });
}, },
handleSubmit() { handleSubmit() {
...@@ -161,7 +171,7 @@ export default { ...@@ -161,7 +171,7 @@ export default {
}, },
watch: { watch: {
eid(v) { eid(v) {
if (v != 0) { if (v) {
this.load(v); this.load(v);
} }
}, },
......
<template> <template>
<div> <div>
<Card class="mb20">
<p slot="extra">
<Icon type="ios-arrow-down" />
</p>
项目信息
<op/>
<Actions />
</Card>
<Card> <Card>
<TreeGrid :columns="columns" ref="grid" :items="list" <EditGrid :columns="columns" ref="grid" :items="list"
> >
<template slot="easySearch"><Form ref="formInline" :model="easySearch" inline><FormItem prop="keys"><Input placeholder="请输入关键字标题" v-model="easySearch.keys.value" /> </FormItem> <template slot="easySearch"><Form ref="formInline" :model="easySearch" inline><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>
</Form></template> </Form></template>
<!-- <template slot="searchForm"> <!-- <template slot="searchForm">
<Search /> <Search />
...@@ -20,7 +13,7 @@ ...@@ -20,7 +13,7 @@
<template slot="buttons"> <template slot="buttons">
<Button type="primary" @click="add(null)">新增</Button> <Button type="primary" @click="add(null)">新增</Button>
</template> </template>
</TreeGrid> </EditGrid>
</Card> </Card>
<Modal v-model="modal" :title="title" width="1200" footer-hide> <Modal v-model="modal" :title="title" width="1200" footer-hide>
<component :is="detail" :eid="curId" :v="row" @on-close="cancel" @on-ok="ok" /> <component :is="detail" :eid="curId" :v="row" @on-close="cancel" @on-ok="ok" />
...@@ -41,7 +34,10 @@ export default { ...@@ -41,7 +34,10 @@ export default {
description: "project_plan 10/19/2020 10:23:07 AM", description: "project_plan 10/19/2020 10:23:07 AM",
}, },
props:{ props:{
v:{ eid:{
type:String
},
data:{
type:Object, type:Object,
default:()=>{ default:()=>{
return { return {
...@@ -100,11 +96,11 @@ export default { ...@@ -100,11 +96,11 @@ export default {
h( h(
"op", "op",
{ {
attrs: { icon: "ios-trash", attrs: { icon: "md-arrow-dropright-circle",
type: "icon", type: "icon",
title: "复制", title: "派发",
oprate: "add", oprate: "edit",
msg: "确认要移出排产吗?" }, },
on: { click: () => this.copy(params.row.id) }, on: { click: () => this.copy(params.row.id) },
}, },
), ),
...@@ -114,7 +110,7 @@ export default { ...@@ -114,7 +110,7 @@ export default {
attrs: { icon: "md-add", attrs: { icon: "md-add",
type: "icon", type: "icon",
title: "新增子任务", title: "新增子任务",
oprate: "add",}, oprate: "edit",},
on: { click: () => this.add(params.row) }, on: { click: () => this.add(params.row) },
} }
), ),
...@@ -169,9 +165,10 @@ export default { ...@@ -169,9 +165,10 @@ export default {
key: "startDate", key: "startDate",
title: this.l("startDate"), title: this.l("startDate"),
align: "left", align: "left",
high: true, high: true
,type:"date"
}, },
{ key: "endDate", title: this.l("endDate"), align: "left", high: true }, { key: "endDate", title: this.l("endDate"), align: "left", high: true,type:"date" },
// { // {
// key: "attachment", // key: "attachment",
// title: this.l("attachment"), // title: this.l("attachment"),
...@@ -183,6 +180,7 @@ export default { ...@@ -183,6 +180,7 @@ export default {
title: this.l("executor"), title: this.l("executor"),
align: "left", align: "left",
high: true, high: true,
type:"users",
}, },
], ],
}; };
...@@ -198,7 +196,7 @@ export default { ...@@ -198,7 +196,7 @@ export default {
ok() { ok() {
this.search(); this.search();
this.modal = false; this.modal = false;
this.curId = 0; this.curId = null;
}, },
search() { search() {
// this.$refs.grid.reload(this.easySearch); // this.$refs.grid.reload(this.easySearch);
...@@ -206,7 +204,7 @@ export default { ...@@ -206,7 +204,7 @@ export default {
conditions: [{ conditions: [{
fieldName:"projectId", fieldName:"projectId",
conditionalType: 'Equal', conditionalType: 'Equal',
fieldValue:this.v.id fieldValue:this.eid
}], }],
// conditions: [] // conditions: []
}; };
...@@ -214,7 +212,7 @@ export default { ...@@ -214,7 +212,7 @@ export default {
let res = r.result; let res = r.result;
var data = this.$u.toTree( var data = this.$u.toTree(
res, res,
"33930562-a9f7-bd95-88ab-d01eb1c4c369", null,
(u) => { (u) => {
// console.log(u); // console.log(u);
u.expanded = true; u.expanded = true;
...@@ -236,8 +234,16 @@ export default { ...@@ -236,8 +234,16 @@ export default {
// } // }
// }, // },
add(row) { add(row) {
this.curId=row.id; if(row){
this.row=row this.curId=row.id;
this.row=row
}else{
this.curId=null;
this.row={
projectId:this.data.id
}
}
this.title = "新增"; this.title = "新增";
this.detail = () => import("./add"); this.detail = () => import("./add");
this.modal = true; this.modal = true;
...@@ -269,31 +275,10 @@ export default { ...@@ -269,31 +275,10 @@ export default {
}); });
}, },
cancel() { cancel() {
this.curId = 0; this.curId = null;
this.modal = false; this.modal = false;
}, },
l(key) { l(key) {
/*
project_plan:{
creationTime:'创建时间',
creatorUserId:'创建人',
lastModificationTime:'更新时间',
lastModifierUserId:'更新人',
isDeleted:'删除人',
deletionTime:'删除时间',
deleterUserId:'删除人',
projectId:'项目id',
upId:'父级',
title:'标题',
status:'状态',
note:'备注',
startDate:'开始日期',
endDate:'结束日期',
type:'类型',
attachment:'附件',
executor:'执行人',
}
*/
let vkey = "project_plan" + "." + key; let vkey = "project_plan" + "." + key;
return this.$t(vkey) || key; return this.$t(vkey) || key;
}, },
......
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
v-model="entity.endDate" v-model="entity.endDate"
></DatePicker> </FormItem ></DatePicker> </FormItem
></Col> ></Col>
<!-- <TimeDifference :timeValue="timeValue"></TimeDifference> --> <TimeDifference :timeValue="timeValue"></TimeDifference>
<Col :span="12" <Col :span="12"
><FormItem :label="l('type')" prop="type"> ><FormItem :label="l('type')" prop="type">
<Dictionary <Dictionary
......
...@@ -18,17 +18,27 @@ ...@@ -18,17 +18,27 @@
</div> </div>
<ul> <ul>
<li> <li>
<a @click="details"> <Icon type="ios-log-in" />&nbsp;详情 </a> <a @click="details"> <Icon type="ios-log-in" />详情 </a>
&nbsp; &nbsp;
<span>|</span> <span>|</span>
</li> </li>
<li> <li>
<a @click="template"> <Icon type="ios-photos" />&nbsp;模板 </a> <a @click="template"> <Icon type="ios-photos" />模版</a>
&nbsp; &nbsp;
<span>|</span> <span>|</span>
</li> </li>
<li> <li>
<a @click="task"> <Icon type="md-create" />&nbsp;任务 </a> <a @click="task"> <Icon type="md-create" />任务 </a>
&nbsp;
<span>|</span>
</li>
<li>
<a @click="task"> <Icon type="md-create" />成员 </a>
&nbsp;
<span>|</span>
</li>
<li>
<a @click="task"> <Icon type="md-create" />动态 </a>
&nbsp; &nbsp;
<span>|</span> <span>|</span>
</li> </li>
...@@ -37,7 +47,7 @@ ...@@ -37,7 +47,7 @@
<div class="body-document"> <div class="body-document">
<h4 v-text="title"></h4> <h4 v-text="title"></h4>
<keep-alive> <keep-alive>
<component v-bind:is="detail" :eid="eid"></component> <component v-bind:is="detail" :eid="eid" :data="entity"></component>
</keep-alive> </keep-alive>
</div> </div>
</div> </div>
...@@ -88,12 +98,12 @@ export default { ...@@ -88,12 +98,12 @@ export default {
}, },
template() { template() {
// this.curId = this.eid; // this.curId = this.eid;
this.title = "模板"; this.title = "项目模板";
// this.detail = () => import("./add"); this.detail = () => import("../plan");
}, },
task() { task() {
// this.curId = this.eid; // this.curId = this.eid;
this.title = "任务"; this.title = "项目任务";
// this.detail = () => import("./add"); // this.detail = () => import("./add");
}, },
l(key) { l(key) {
......
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