Commit 3fee7396 authored by 仇晓婷's avatar 仇晓婷

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

parents beb501fe 76c4a34c
...@@ -42,11 +42,13 @@ ...@@ -42,11 +42,13 @@
:key="item.id" :key="item.id"
v-show="show(item)" v-show="show(item)"
class="treetr" class="treetr"
:class="{ 'child-tr': item.parent }" :id="'tr' + index"
:draggable="drag" :draggable="drag"
@dragstart="dragstart($event, index, item)" @dragstart="dragstart($event, index, item)"
@dragover="dragover($event, index, item)"
@drop="dragdrop($event, index, item)" @drop="dragdrop($event, index, item)"
@dragenter="dragenter($event, index, item)"
@dragover="dragover($event, index, item)"
@dragleave="dragleave($event, index, item)"
> >
<td <td
v-for="(column, snum) in columns" v-for="(column, snum) in columns"
...@@ -54,8 +56,11 @@ ...@@ -54,8 +56,11 @@
:style="tdStyle(column)" :style="tdStyle(column)"
> >
<!-- 多选 --> <!-- 多选 -->
<label v-if="column.type === 'selection'" @click="handleCheckClick(item, $event, index)"> <label
<Checkbox v-model="item.checked" ></Checkbox> v-if="column.type === 'selection'"
@click="handleCheckClick(item, $event, index)"
>
<Checkbox v-model="item.checked"></Checkbox>
</label> </label>
<!-- 图标 --> <!-- 图标 -->
<div v-if="column.type === 'icon'"> <div v-if="column.type === 'icon'">
...@@ -168,7 +173,7 @@ ...@@ -168,7 +173,7 @@
</div> </div>
<!-- 树图标 --> <!-- 树图标 -->
<span @click="toggle(index, item)" v-if="snum == iconRow()"> <span @click="toggle(index, item)" v-if="snum == iconRow()">
<i v-html="item.spaceHtml"></i> <span v-html="item.spaceHtml"></span>
<a v-if="item.children && item.children.length > 0"> <a v-if="item.children && item.children.length > 0">
<i <i
class="ivu-icon" class="ivu-icon"
...@@ -220,15 +225,29 @@ export default { ...@@ -220,15 +225,29 @@ export default {
return []; return [];
}, },
}, },
data:{
type: Array,
default() {
return [];
},
},
root:{
type:[String,Number],
default:0,
},
parent:{
type:String,
default:"upId"
},
iconName: false, iconName: false,
drag:{ drag: {
type:Boolean, type: Boolean,
default:false default: false,
},
spaceWidth: {
type: Number,
default: 20,
}, },
spaceWidth:{
type:Number,
default:20
}
}, },
provide() { provide() {
return { return {
...@@ -238,7 +257,8 @@ export default { ...@@ -238,7 +257,8 @@ export default {
data() { data() {
return { return {
color: "#19be6b", color: "#19be6b",
all:true, all: true,
logs:[],
initItems: [], // 处理后数据数组 initItems: [], // 处理后数据数组
cloneColumns: [], // 处理后的表头数据 cloneColumns: [], // 处理后的表头数据
checkGroup: [], // 复选框数组 checkGroup: [], // 复选框数组
...@@ -247,7 +267,7 @@ export default { ...@@ -247,7 +267,7 @@ export default {
tdsWidth: 0, // td总宽 tdsWidth: 0, // td总宽
timer: false, // 控制监听时长 timer: false, // 控制监听时长
dataLength: 0, // 树形数据长度 dataLength: 0, // 树形数据长度
dragIndex:-1,//拖拽开始的序号 dragIndex: -1, //拖拽开始的序号
}; };
}, },
computed: { computed: {
...@@ -317,18 +337,52 @@ export default { ...@@ -317,18 +337,52 @@ export default {
slots() { slots() {
return this.$scopedSlots; return this.$scopedSlots;
}, },
//拖拽 //拖拽开始
dragstart(e,index, row ) { dragstart(e, index, row) {
this.dragIndex=index; this.dragIndex = index;
console.log(index) console.log(index);
}, },
dragover(e,index, row ) { //进入
e.preventDefault(); dragenter(e, index, row) {
}, var tr = document.getElementById("tr" + index);
dragdrop(e,index, row ) { tr.className += " move";
// console.warn("进入",e, e.clientY,tr.clientTop, tr.className);
},
// 悬浮
dragover(e, index, row) {
// console.warn("悬浮",e)
e.preventDefault();
// 鼠标Y
var my=e.clientY;
var ty=e.toElement.offsetTop;
var h=e.toElement.clientHeight;
var tr = document.getElementById("tr" + index);
if(tr.className.indexOf(" sort")==-1&&2.5*h<(my-ty)){
tr.className=tr.className.replace(" move"," sort")
}
// console.warn("在上边",my,ty,my-ty,h, tr.className);
this.logs.push({index,ty,my,h})
},
// 离开
dragleave(e, index, row) {
var tr = document.getElementById("tr" + index);
tr.className = tr.className.replace(" move", "").replace(" sort","");
console.warn("离开",e.clientY,e.toElement.offsetTop,e.toElement.clientHeight, tr.className);
},
//放下
dragdrop(e, index, row) {
event.preventDefault(); event.preventDefault();
this.$emit("on-drag-drop",this.dragIndex,index,this.initItems) var tr = document.getElementById("tr" + index);
tr.className = tr.className.replace(" move", "").replace(" sort","");
if (index != this.dragIndex) {
this.$emit("on-drag-drop", this.dragIndex, index, this.initItems);
}
console.log(JSON.stringify(this.logs))
}, },
/**
* @dragover="dragover($event, index, item)"
@dragleave="dragleave($event,index,item)"
*/
// 有无多选框折叠位置优化 // 有无多选框折叠位置优化
iconRow() { iconRow() {
var num = 0; var num = 0;
...@@ -339,6 +393,7 @@ export default { ...@@ -339,6 +393,7 @@ export default {
} }
return num; return num;
}, },
// 设置td宽度,td的align // 设置td宽度,td的align
tdStyle(column) { tdStyle(column) {
const style = {}; const style = {};
...@@ -454,7 +509,10 @@ export default { ...@@ -454,7 +509,10 @@ export default {
// 数据处理 增加自定义属性监听 // 数据处理 增加自定义属性监听
initData(items, level, parent) { initData(items, level, parent) {
// this.initItems = [] // this.initItems = []
let spaceHtml = "<i class='ms-tree-space' style='width:"+this.spaceWidth*level+"px'></i>"; let spaceHtml = "";
for (let i = 1; i < level; i++) {
spaceHtml += "<i class='ms-tree-space'></i>";
}
items.forEach((item, index) => { items.forEach((item, index) => {
item = Object.assign({}, item, { item = Object.assign({}, item, {
parent, parent,
...@@ -747,6 +805,16 @@ export default { ...@@ -747,6 +805,16 @@ export default {
tr.treetr:hover td { tr.treetr:hover td {
background: #f7f7f7; background: #f7f7f7;
} }
tr.move {
td {
background-color: blue;
}
}
tr.sort {
td {
border-top: 2px solid blue;
}
}
.ms-tree-space { .ms-tree-space {
position: relative; position: relative;
top: 1px; top: 1px;
......
...@@ -1893,6 +1893,7 @@ export default { ...@@ -1893,6 +1893,7 @@ export default {
projectId: '项目id', projectId: '项目id',
planId: '计划id', planId: '计划id',
title: '名称', title: '名称',
content:'备注信息'
}, },
project_group_user: { project_group_user: {
creationTime: '创建时间', creationTime: '创建时间',
...@@ -1902,13 +1903,13 @@ export default { ...@@ -1902,13 +1903,13 @@ export default {
isDeleted: '删除人', isDeleted: '删除人',
deletionTime: '删除时间', deletionTime: '删除时间',
deleterUserId: '删除人', deleterUserId: '删除人',
userId: '用户id', userId: '用户',
role: '角色', role: '角色',
projectId: '项目id', projectId: '项目id',
planId: '计划id', planId: '计划id',
note: '备注', note: '备注',
status: '状态', status: '状态',
groupName: '', groupName: '项目组名称',
groupId: '', groupId: '项目组Id',
} }
} }
...@@ -2,52 +2,11 @@ ...@@ -2,52 +2,11 @@
<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('title')" prop="title"> <Input v-model="entity.title"> </Input>
<DatePicker type="date" v-model="entity.creationTime"></DatePicker>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('creatorUserId')" prop="creatorUserId">
<InputNumber v-model="entity.creatorUserId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('lastModificationTime')" prop="lastModificationTime">
<DatePicker type="date" v-model="entity.lastModificationTime"></DatePicker>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('lastModifierUserId')" prop="lastModifierUserId">
<InputNumber v-model="entity.lastModifierUserId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('isDeleted')" prop="isDeleted">
<InputNumber v-model="entity.isDeleted"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('deletionTime')" prop="deletionTime">
<DatePicker type="date" v-model="entity.deletionTime"></DatePicker>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('deleterUserId')" prop="deleterUserId">
<InputNumber v-model="entity.deleterUserId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('projectId')" prop="projectId">
<InputNumber v-model="entity.projectId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('planId')" prop="planId">
<InputNumber v-model="entity.planId"></InputNumber>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="24">
<FormItem :label="l('title')" prop="title"> <Input v-model="entity.title"> </Input> <FormItem :label="l('content')" prop="content"> <Input v-model="entity.content"> </Input>
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
...@@ -58,7 +17,6 @@ ...@@ -58,7 +17,6 @@
</Form> </Form>
</template> </template>
<script> <script>
import Api from './api' import Api from './api'
export default { export default {
...@@ -74,12 +32,13 @@ export default { ...@@ -74,12 +32,13 @@ export default {
isDeleted: null, isDeleted: null,
deletionTime: null, deletionTime: null,
deleterUserId: null, deleterUserId: null,
projectId: null, projectId: '',
planId: null, planId: '',
title: "" title: "",
content: ''
}, },
rules: { rules: {
name: [{ title: [{
required: true, required: true,
message: '必填', message: '必填',
trigger: 'blur' trigger: 'blur'
...@@ -89,10 +48,10 @@ export default { ...@@ -89,10 +48,10 @@ export default {
}, },
props: { props: {
v: Object, v: Object,
eid: Number eid: String
}, },
mounted() { mounted() {
if (this.eid > 0) { if (this.eid != '' && this.eid != null) {
this.load(this.eid); this.load(this.eid);
} }
}, },
...@@ -138,7 +97,7 @@ export default { ...@@ -138,7 +97,7 @@ export default {
this.entity = this.$u.clone(this.v) this.entity = this.$u.clone(this.v)
}, },
eid(v) { eid(v) {
if (v > 0) { if (v != '') {
this.load(v); this.load(v);
} }
} }
......
<template> <template>
<div class="detail"> <div class="detail" style="width:100%;">
<Row> <Row>
<Filed :span="12" :name="l('creationTime')">{{entity.creationTime}}</Filed>
<Filed :span="12" :name="l('creatorUserId')">{{entity.creatorUserId}}</Filed>
<Filed :span="12" :name="l('lastModificationTime')">{{entity.lastModificationTime}}</Filed>
<Filed :span="12" :name="l('lastModifierUserId')">{{entity.lastModifierUserId}}</Filed>
<Filed :span="12" :name="l('isDeleted')">{{entity.isDeleted}}</Filed>
<Filed :span="12" :name="l('deletionTime')">{{entity.deletionTime}}</Filed>
<Filed :span="12" :name="l('deleterUserId')">{{entity.deleterUserId}}</Filed>
<Filed :span="12" :name="l('projectId')">{{entity.projectId}}</Filed>
<Filed :span="12" :name="l('planId')">{{entity.planId}}</Filed>
<Filed :span="12" :name="l('title')">{{entity.title}}</Filed> <Filed :span="12" :name="l('title')">{{entity.title}}</Filed>
<Filed :span="12" :name="l('content')">{{entity.content}}</Filed>
<Filed :span="12" :name="l('creationTime')">{{entity.creationTime}}</Filed>
<Filed :span="12" :name="l('creatorUserId')">
<User :value="entity.creatorUserId"></User>
</Filed>
</Row> </Row>
</div> </div>
...@@ -24,25 +19,13 @@ export default { ...@@ -24,25 +19,13 @@ export default {
data() { data() {
return { return {
entity: {}, entity: {},
rules: {
name: [{
required: true,
message: '必填',
trigger: 'blur'
}],
code: [{
required: true,
message: '必填',
trigger: 'blur'
}]
}
} }
}, },
props: { props: {
eid: Number eid: String
}, },
mounted() { mounted() {
if (this.eid > 0) { if (this.eid != '' && this.eid != null) {
this.load(this.eid); this.load(this.eid);
} }
}, },
...@@ -65,7 +48,7 @@ export default { ...@@ -65,7 +48,7 @@ export default {
}, },
watch: { watch: {
eid(v) { eid(v) {
if (v > 0) { if (v != '' && v != null) {
this.load(v); this.load(v);
} }
} }
......
<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('title')" prop="title"> <Input v-model="entity.title"> </Input>
<DatePicker type="date" v-model="entity.creationTime"></DatePicker>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('creatorUserId')" prop="creatorUserId">
<InputNumber v-model="entity.creatorUserId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('lastModificationTime')" prop="lastModificationTime">
<DatePicker type="date" v-model="entity.lastModificationTime"></DatePicker>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('lastModifierUserId')" prop="lastModifierUserId">
<InputNumber v-model="entity.lastModifierUserId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('isDeleted')" prop="isDeleted">
<InputNumber v-model="entity.isDeleted"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('deletionTime')" prop="deletionTime">
<DatePicker type="date" v-model="entity.deletionTime"></DatePicker>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('deleterUserId')" prop="deleterUserId">
<InputNumber v-model="entity.deleterUserId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('projectId')" prop="projectId">
<InputNumber v-model="entity.projectId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('planId')" prop="planId">
<InputNumber v-model="entity.planId"></InputNumber>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="24">
<FormItem :label="l('title')" prop="title"> <Input v-model="entity.title"> </Input> <FormItem :label="l('content')" prop="content"> <Input v-model="entity.content"> </Input>
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
...@@ -67,7 +27,7 @@ export default { ...@@ -67,7 +27,7 @@ export default {
disabled: false, disabled: false,
entity: {}, entity: {},
rules: { rules: {
name: [{ title: [{
required: true, required: true,
message: '必填', message: '必填',
trigger: 'blur' trigger: 'blur'
...@@ -76,10 +36,10 @@ export default { ...@@ -76,10 +36,10 @@ export default {
} }
}, },
props: { props: {
eid: Number eid: String
}, },
mounted() { mounted() {
if (this.eid > 0) { if (this.eid != '' && this.eid != null) {
this.load(this.eid); this.load(this.eid);
} }
}, },
...@@ -121,7 +81,7 @@ export default { ...@@ -121,7 +81,7 @@ export default {
}, },
watch: { watch: {
eid(v) { eid(v) {
if (v != 0) { if (v != '' && v != null) {
this.load(v); this.load(v);
} }
} }
......
<template> <template>
<div> <div class="full">
<DataGrid :columns="columns" ref="grid" :action="action"><template slot="easySearch"> <DataGrid :columns="columns" ref="grid" :action="action"><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>
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<Button type="primary" @click="add">新增</Button> <Button type="primary" @click="add">新增</Button>
</template> </template>
</DataGrid> </DataGrid>
<Modal v-model="modal" :title="title" width="1200" footer-hide> <Modal v-model="modal" :title="title" width="1200" footer-hide :fullscreen="fullscreen">
<component :is="detail" :eid="curId" @on-close="cancel" @on-ok="ok" /> <component :is="detail" :eid="curId" @on-close="cancel" @on-ok="ok" />
</Modal> </Modal>
</div> </div>
...@@ -42,81 +42,44 @@ export default { ...@@ -42,81 +42,44 @@ export default {
} }
}, },
modal: false, modal: false,
fullscreen: false,
title: "新增", title: "新增",
detail: null, detail: null,
curId: 0, curId: '',
columns: [{ columns: [{
key: "id", key: "title",
title: this.$t("id"), title: this.l("title"),
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", align: "left",
easy: true,
high: true high: true
}, },
{ {
key: "projectId", key: "content",
title: this.l("projectId"), title: this.l("content"),
align: "left", align: "left",
easy: true,
high: true high: true
}, },
{ {
key: "planId", key: "creationTime",
title: this.l("planId"), title: this.l("creationTime"),
align: "left", align: "center",
high: true high: true,
type: 'date',
width: 180
}, },
{ {
key: "title", key: "creatorUserId",
title: this.l("title"), title: this.l("creatorUserId"),
align: "left", align: "left",
easy: true, high: true,
high: true type: 'user',
width: 180
}, },
{ {
title: '操作', title: '操作',
key: 'action', key: 'action',
width: 140, width: 220,
align: 'center', align: 'center',
render: (h, params) => { render: (h, params) => {
return h('div', { return h('div', {
...@@ -146,7 +109,15 @@ export default { ...@@ -146,7 +109,15 @@ export default {
on: { on: {
click: () => this.remove(params.row.id) click: () => this.remove(params.row.id)
} }
}, '删除') }, '删除'),
h('op', {
attrs: {
oprate: 'edit'
},
on: {
click: () => this.openGroupUser(params.row)
}
}, '项目团队'),
]) ])
} }
}, },
...@@ -166,32 +137,36 @@ export default { ...@@ -166,32 +137,36 @@ export default {
ok() { ok() {
this.$refs.grid.load() this.$refs.grid.load()
this.modal = false this.modal = false
this.curId = 0; this.curId = '';
}, },
search() { search() {
this.$refs.grid.reload(this.easySearch) this.$refs.grid.reload(this.easySearch)
}, },
add() { add() {
this.curId = 0; this.curId = '';
this.title = "新增"; this.title = "新增";
this.fullscreen = false;
this.detail = () => import('./add') this.detail = () => import('./add')
this.modal = true; this.modal = true;
}, },
copy(id) { copy(id) {
this.curId = id; this.curId = id;
this.title = "克隆"; this.title = "克隆";
this.fullscreen = false;
this.detail = () => import('./add') this.detail = () => import('./add')
this.modal = true; this.modal = true;
}, },
view(id) { view(id) {
this.curId = id; this.curId = id;
this.title = "详情"; this.title = "详情";
this.fullscreen = false;
this.detail = () => import('./detail') this.detail = () => import('./detail')
this.modal = true; this.modal = true;
}, },
edit(id) { edit(id) {
this.curId = id; this.curId = id;
this.title = "编辑"; this.title = "编辑";
this.fullscreen = false;
this.detail = () => import('./edit') this.detail = () => import('./edit')
this.modal = true; this.modal = true;
}, },
...@@ -203,8 +178,15 @@ export default { ...@@ -203,8 +178,15 @@ export default {
} }
}) })
}, },
openGroupUser(row) {
this.curId = row.id;
this.title = "项目团队---" + row.title;
this.fullscreen = true;
this.detail = () => import('../groupUser/index1')
this.modal = true;
},
cancel() { cancel() {
this.curId = 0; this.curId = '';
this.modal = false this.modal = false
}, },
l(key) { l(key) {
...@@ -216,4 +198,5 @@ export default { ...@@ -216,4 +198,5 @@ export default {
</script> </script>
<style lang="less"> <style lang="less">
</style> </style>
<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">
<FormItem :label="l('creationTime')" prop="creationTime">
<DatePicker type="date" v-model="entity.creationTime"></DatePicker>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('creatorUserId')" prop="creatorUserId">
<InputNumber v-model="entity.creatorUserId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('lastModificationTime')" prop="lastModificationTime">
<DatePicker type="date" v-model="entity.lastModificationTime"></DatePicker>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('lastModifierUserId')" prop="lastModifierUserId">
<InputNumber v-model="entity.lastModifierUserId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('isDeleted')" prop="isDeleted">
<InputNumber v-model="entity.isDeleted"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('deletionTime')" prop="deletionTime">
<DatePicker type="date" v-model="entity.deletionTime"></DatePicker>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('deleterUserId')" prop="deleterUserId">
<InputNumber v-model="entity.deleterUserId"></InputNumber>
</FormItem>
</Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('userId')" prop="userId"> <FormItem :label="l('userId')" prop="userId">
<InputNumber v-model="entity.userId"></InputNumber> <InputNumber v-model="entity.userId"></InputNumber>
...@@ -81,7 +46,6 @@ ...@@ -81,7 +46,6 @@
</Form> </Form>
</template> </template>
<script> <script>
import Api from './api' import Api from './api'
export default { export default {
...@@ -117,10 +81,10 @@ export default { ...@@ -117,10 +81,10 @@ export default {
}, },
props: { props: {
v: Object, v: Object,
eid: Number eid: String
}, },
mounted() { mounted() {
if (this.eid > 0) { if (this.eid != '' && this.eid != null) {
this.load(this.eid); this.load(this.eid);
} }
}, },
......
...@@ -5,6 +5,9 @@ export default { ...@@ -5,6 +5,9 @@ export default {
paged(params){ paged(params){
return Api.post(`${material}/projectgroupuser/paged`,params); return Api.post(`${material}/projectgroupuser/paged`,params);
}, },
list(params){
return Api.post(`${material}/projectgroupuser/list`,params);
},
get(params){ get(params){
return Api.get(`${material}/projectgroupuser/get`,params); return Api.get(`${material}/projectgroupuser/get`,params);
}, },
......
...@@ -2,21 +2,16 @@ ...@@ -2,21 +2,16 @@
<div class="detail"> <div class="detail">
<Row> <Row>
<Filed :span="12" :name="l('creationTime')">{{entity.creationTime}}</Filed> <Filed :span="12" :name="l('userId')">
<Filed :span="12" :name="l('creatorUserId')">{{entity.creatorUserId}}</Filed> <User :value="entity.userId"></User>
<Filed :span="12" :name="l('lastModificationTime')">{{entity.lastModificationTime}}</Filed> </Filed>
<Filed :span="12" :name="l('lastModifierUserId')">{{entity.lastModifierUserId}}</Filed>
<Filed :span="12" :name="l('isDeleted')">{{entity.isDeleted}}</Filed>
<Filed :span="12" :name="l('deletionTime')">{{entity.deletionTime}}</Filed>
<Filed :span="12" :name="l('deleterUserId')">{{entity.deleterUserId}}</Filed>
<Filed :span="12" :name="l('userId')">{{entity.userId}}</Filed>
<Filed :span="12" :name="l('role')">{{entity.role}}</Filed> <Filed :span="12" :name="l('role')">{{entity.role}}</Filed>
<Filed :span="12" :name="l('projectId')">{{entity.projectId}}</Filed>
<Filed :span="12" :name="l('planId')">{{entity.planId}}</Filed>
<Filed :span="12" :name="l('note')">{{entity.note}}</Filed> <Filed :span="12" :name="l('note')">{{entity.note}}</Filed>
<Filed :span="12" :name="l('status')">{{entity.status}}</Filed> <Filed :span="12" :name="l('status')">{{entity.status}}</Filed>
<Filed :span="12" :name="l('groupName')">{{entity.groupName}}</Filed> <Filed :span="12" :name="l('creationTime')">{{entity.creationTime}}</Filed>
<Filed :span="12" :name="l('groupId')">{{entity.groupId}}</Filed> <Filed :span="12" :name="l('creatorUserId')">
<User :value="entity.creatorUserId"></User>
</Filed>
</Row> </Row>
</div> </div>
...@@ -44,10 +39,10 @@ export default { ...@@ -44,10 +39,10 @@ export default {
} }
}, },
props: { props: {
eid: Number eid: String
}, },
mounted() { mounted() {
if (this.eid > 0) { if (this.eid != '' && this.eid != null) {
this.load(this.eid); this.load(this.eid);
} }
}, },
...@@ -70,7 +65,7 @@ export default { ...@@ -70,7 +65,7 @@ export default {
}, },
watch: { watch: {
eid(v) { eid(v) {
if (v > 0) { if (v != '' && v != null) {
this.load(v); this.load(v);
} }
} }
......
<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">
<FormItem :label="l('creationTime')" prop="creationTime">
<DatePicker type="date" v-model="entity.creationTime"></DatePicker>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('creatorUserId')" prop="creatorUserId">
<InputNumber v-model="entity.creatorUserId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('lastModificationTime')" prop="lastModificationTime">
<DatePicker type="date" v-model="entity.lastModificationTime"></DatePicker>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('lastModifierUserId')" prop="lastModifierUserId">
<InputNumber v-model="entity.lastModifierUserId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('isDeleted')" prop="isDeleted">
<InputNumber v-model="entity.isDeleted"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('deletionTime')" prop="deletionTime">
<DatePicker type="date" v-model="entity.deletionTime"></DatePicker>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('deleterUserId')" prop="deleterUserId">
<InputNumber v-model="entity.deleterUserId"></InputNumber>
</FormItem>
</Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('userId')" prop="userId"> <FormItem :label="l('userId')" prop="userId">
<InputNumber v-model="entity.userId"></InputNumber> <InputNumber v-model="entity.userId"></InputNumber>
...@@ -43,17 +8,7 @@ ...@@ -43,17 +8,7 @@
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('role')" prop="role"> <FormItem :label="l('role')" prop="role">
<Dictionary code="mes.project_group_user.Role" v-model="entity.role"></Dictionary> <Dictionary code="project.group.role" v-model="entity.role"></Dictionary>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('projectId')" prop="projectId">
<InputNumber v-model="entity.projectId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('planId')" prop="planId">
<InputNumber v-model="entity.planId"></InputNumber>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
...@@ -62,15 +17,7 @@ ...@@ -62,15 +17,7 @@
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('status')" prop="status"> <FormItem :label="l('status')" prop="status">
<Dictionary code="mes.project_group_user.Status" v-model="entity.status"></Dictionary> <Dictionary code="project.group.status" v-model="entity.status"></Dictionary>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('groupName')" prop="groupName"> <Input v-model="entity.groupName"> </Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('groupId')" prop="groupId"> <Input v-model="entity.groupId"> </Input>
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
...@@ -99,10 +46,10 @@ export default { ...@@ -99,10 +46,10 @@ export default {
} }
}, },
props: { props: {
eid: Number eid: String
}, },
mounted() { mounted() {
if (this.eid > 0) { if (this.eid != '' && this.eid != null) {
this.load(this.eid); this.load(this.eid);
} }
}, },
...@@ -144,7 +91,7 @@ export default { ...@@ -144,7 +91,7 @@ export default {
}, },
watch: { watch: {
eid(v) { eid(v) {
if (v != 0) { if (v != '' && v != null) {
this.load(v); this.load(v);
} }
} }
......
<template>
<div>
<Table border :columns="columns" :data="list" ref="table" class="tableCommon" stripe>
<template slot-scope="{ row, index }" slot="userId">
<span v-if="edit != index" v-text="row.userId"></span>
<Input v-else type="text" v-model.trim="cur.userId" />
</template>
</Table>
<div class="footerWidth"><Button type="primary" long @click="addList">新增人员</Button></div>
<Modal v-model="modal" :title="title" width="1200" footer-hide>
<component :is="detail" :eid="curId" @on-close="cancel" @on-ok="ok" />
</Modal>
</div>
</template>
<script>
import Api from './api'
export default {
name: 'list',
head: {
title: "项目成员人",
author: "henq",
description: "project_group_user 10/21/2020 11:46:56 AM",
},
data() {
return {
modal: false,
title: "新增",
detail: null,
curId: '',
edit: -1,
columns: [{
key: "userId",
title: this.l("userId"),
align: "left",
high: true,
type: 'user',
slot: 'userId'
},
{
key: "role",
title: this.l("role"),
align: "left",
high: true,
code: 'project.group.role'
},
{
key: "status",
title: this.l("status"),
align: "left",
high: true,
code: 'project.group.status'
},
{
key: "note",
title: this.l("note"),
align: "left",
high: true
},
{
title: '操作',
key: 'action',
width: 140,
align: 'center',
render: (h, params) => {
return h('div', {
class: "action"
}, [
h('op', {
attrs: {
oprate: 'detail'
},
on: {
click: () => this.view(params.row.id)
}
}, '查看'),
//h('op', { attrs: { oprate: 'copy' }, on: { click: () => this.copy(params.row.id) } }, '克隆'),
h('op', {
attrs: {
oprate: 'edit'
},
on: {
click: () => this.edit(params.row.id)
}
}, '编辑'),
h('op', {
attrs: {
oprate: 'delete'
},
on: {
click: () => this.remove(params.row.id)
}
}, '删除')
])
}
},
],
list: []
}
},
props: {
eid: String
},
mounted() {
if (this.eid != '' && this.eid != null) {
this.load(this.eid)
}
},
async fetch({
store,
params
}) {
await store.dispatch('loadDictionary') // 加载数据字典
},
methods: {
load(v) {
let params = {
conditions: [{
fieldName: "groupId",
fieldValue: v,
conditionalType: "Equal",
}],
}
Api.list(params).then(r => {
if (r.success) {
this.list = r.result
}
})
},
ok() {
this.load(this.eid)
this.modal = false
this.curId = '';
},
add() {
this.curId = 0;
this.title = "新增";
this.detail = () => import('./add')
this.modal = true;
},
addList() {
this.edit = this.list.length;
this.cur = {
userId: null,
};
this.list.push(this.cur);
},
copy(id) {
this.curId = id;
this.title = "克隆";
this.detail = () => import('./add')
this.modal = true;
},
view(id) {
this.curId = id;
this.title = "详情";
this.detail = () => import('./detail')
this.modal = true;
},
edit(id) {
this.curId = id;
this.title = "编辑";
this.detail = () => import('./edit')
this.modal = true;
},
remove(id) {
Api.delete(id).then((r) => {
if (r.success) {
this.load(this.eid)
this.$Message.success('删除成功')
}
})
},
cancel() {
this.curId = this.eid;
this.modal = false
},
l(key) {
let vkey = "project_group_user" + "." + key;
return this.$t(vkey) || key
}
},
watch: {
eid(v) {
if (v != '' && v != null) {
this.load(v);
}
}
}
}
</script>
<style lang="less">
.footerWidth {
width: calc(100%);
margin-top: 5px;
}
</style>
<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,15 +42,15 @@ ...@@ -42,15 +42,15 @@
<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="12"
><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
...@@ -60,6 +60,7 @@ ...@@ -60,6 +60,7 @@
<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"
...@@ -89,11 +90,13 @@ ...@@ -89,11 +90,13 @@
<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" <Col :span="12"
><FormItem :label="l('attachment')" prop="attachment"> ><FormItem :label="l('attachment')" prop="attachment">
<Input v-model="entity.attachment"> </Input> </FormItem <!-- <files ref="refFile" parms="parms" v-model="entity.attachment" files />-->
</FormItem
></Col> ></Col>
<Col :span="12" <Col :span="12"
><FormItem :label="l('executor')" prop="executor"> ><FormItem :label="l('executor')" prop="executor">
...@@ -101,12 +104,13 @@ ...@@ -101,12 +104,13 @@
></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>
</template> </template><script>
<script>
import Api from "./api"; import Api from "./api";
export default { export default {
name: "Add", name: "Add",
...@@ -121,7 +125,7 @@ export default { ...@@ -121,7 +125,7 @@ export default {
// deletionTime: null, // deletionTime: null,
// deleterUserId: null, // deleterUserId: null,
projectId: "33930562-a9f7-bd95-88ab-d01eb1c4c369", projectId: "33930562-a9f7-bd95-88ab-d01eb1c4c369",
upId: "33930562-a9f7-bd95-88ab-d01eb1c4c369", upId: this.v.id,
title: "", title: "",
status: 0, status: 0,
note: "", note: "",
...@@ -131,6 +135,7 @@ export default { ...@@ -131,6 +135,7 @@ export default {
attachment: "", attachment: "",
executor: "", executor: "",
}, },
parmsName: "app=material&eid=1&name=ProjectPlan",
rules: { rules: {
name: [{ required: true, message: "必填", trigger: "blur" }], name: [{ required: true, message: "必填", trigger: "blur" }],
}, },
...@@ -138,12 +143,12 @@ export default { ...@@ -138,12 +143,12 @@ export default {
}, },
props: { props: {
v: Object, v: Object,
eid: Number, eid: String,
}, },
mounted() { mounted() {
if (this.eid > 0) { // if (this.eid) {
this.load(this.eid); // this.load(this.eid);
} // }
}, },
methods: { methods: {
handleSubmit() { handleSubmit() {
...@@ -184,9 +189,9 @@ export default { ...@@ -184,9 +189,9 @@ export default {
this.entity = this.$u.clone(this.v); this.entity = this.$u.clone(this.v);
}, },
eid(v) { eid(v) {
if (v) { // if (v) {
this.load(v); // this.load(v);
} // }
}, },
}, },
}; };
......
import Api from '@/plugins/request' import Api from '@/plugins/request'
export default { export default {
index: `${material}proje/ctplan/paged`, index: `${material}/projectplan/paged`,
paged(params) { paged(params) {
return Api.post(`${material}/projectplan/paged`, params); return Api.post(`${material}/projectplan/paged`, params);
}, },
......
...@@ -36,11 +36,9 @@ ...@@ -36,11 +36,9 @@
} }
} }
}, },
props: { props:["eid"],
eid: Number
},
mounted() { mounted() {
if (this.eid > 0) { if (this.eid) {
this.load(this.eid); this.load(this.eid);
} }
}, },
......
...@@ -5,34 +5,25 @@ ...@@ -5,34 +5,25 @@
<Icon type="ios-arrow-down" /> <Icon type="ios-arrow-down" />
</p> </p>
项目信息 项目信息
<Actions/> <op/>
<Actions />
</Card> </Card>
<Card> <Card>
<TreeGrid :columns="columns" ref="grid" :items="list" <TreeGrid :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>
<FormItem
><Button type="primary" @click="search">查询</Button></FormItem
>
</Form></template
> >
<template slot="searchForm"> <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>
</Form></template>
<!-- <template slot="searchForm">
<Search /> <Search />
</template> </template> -->
<template slot="buttons"> <template slot="buttons">
<Button type="primary" @click="add">新增</Button> <Button type="primary" @click="add(null)">新增</Button>
</template> </template>
</TreeGrid> </TreeGrid>
</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" @on-close="cancel" @on-ok="ok" /> <component :is="detail" :eid="curId" :v="row" @on-close="cancel" @on-ok="ok" />
</Modal> </Modal>
</div> </div>
</template> </template>
...@@ -49,8 +40,21 @@ export default { ...@@ -49,8 +40,21 @@ export default {
author: "henq", author: "henq",
description: "project_plan 10/19/2020 10:23:07 AM", description: "project_plan 10/19/2020 10:23:07 AM",
}, },
props:{
v:{
type:Object,
default:()=>{
return {
id:"33930562-a9f7-bd95-88ab-d01eb1c4c369",
title:"示例项目"
}
}
}
},
data() { data() {
return { return {
entity:{},
row:{},
action: Api.index, action: Api.index,
easySearch: { easySearch: {
keys: { op: "title", value: null }, keys: { op: "title", value: null },
...@@ -58,10 +62,8 @@ export default { ...@@ -58,10 +62,8 @@ export default {
modal: false, modal: false,
title: "新增", title: "新增",
detail: null, detail: null,
curId: 0, curId:null,
list: [ list: [],
],
columns: [ columns: [
// { key:"id",title:this.$t("id") ,hide:true ,align:"left" ,high:true }, // { key:"id",title:this.$t("id") ,hide:true ,align:"left" ,high:true },
// { key:"creationTime",title:this.l("creationTime") ,align:"left" ,high:true }, // { key:"creationTime",title:this.l("creationTime") ,align:"left" ,high:true },
...@@ -73,58 +75,76 @@ export default { ...@@ -73,58 +75,76 @@ export default {
// { key:"deleterUserId",title:this.l("deleterUserId") ,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:"projectId",title:this.l("projectId") ,align:"left" ,high:true },
// { key:"upId",title:this.l("upId") ,align:"left" ,high:true }, // { key:"upId",title:this.l("upId") ,align:"left" ,high:true },
{ type: "selection", width: 80, align: "center" }, // { type: "selection", width: 80, align: "center" },
{ {
title: "操作", title: "操作",
key: "action", key: "action",
width: 150, width: 150,
align: "center", align: "center",
render:(h,params)=>{ // render:(h,params)=>{
return h("Actions" // return h("Actions"
,{ // ,{
attrs:{ // attrs:{
row:params, // row:params,
// },
// on:{
// 'on-click':this.rowclick
// }
// }
// )
// }
render: (h, params) => {
return h("div", { class: "action" }, [
h(
"op",
{
attrs: { icon: "ios-trash",
type: "icon",
title: "复制",
oprate: "add",
msg: "确认要移出排产吗?" },
on: { click: () => this.copy(params.row.id) },
}, },
on:{ ),
'on-click':this.rowclick h(
"op",
{
attrs: { icon: "md-add",
type: "icon",
title: "新增子任务",
oprate: "add",},
on: { click: () => this.add(params.row) },
} }
} ),
) h(
} "op",
// render: (h, params) => { {
// return h("div", { class: "action" }, [ attrs: { icon: "md-eye",
// h( type: "icon",
// "op", title: "编辑",
// { oprate: "edit", },
// attrs: { oprate: "detail" }, on: { click: () => this.edit(params.row.id) },
// on: { click: () => this.view(params.row.id) }, }
// }, ),
// "查看" h(
// ), "op",
// //h('op', { attrs: { oprate: 'copy' }, on: { click: () => this.copy(params.row.id) } }, '克隆'), {
// h( attrs: { icon: "ios-trash",
// "op", type: "icon",
// { title: "删除",
// attrs: { oprate: "edit" }, oprate: "delete",
// on: { click: () => this.edit(params.row.id) }, msg: "确认要删除吗?" },
// }, on: { click: () => this.remove(params.row.id) },
// "编辑" }
// ), ),
// h( ]);
// "op", },
// {
// attrs: { oprate: "delete" },
// on: { click: () => this.remove(params.row.id) },
// },
// "删除"
// ),
// ]);
// },
}, },
{ {
key: "type", key: "type",
width:90, width: 90,
title: this.l("type"), title: this.l("type"),
align: "left", align: "left",
high: true, high: true,
...@@ -181,19 +201,43 @@ export default { ...@@ -181,19 +201,43 @@ export default {
this.curId = 0; this.curId = 0;
}, },
search() { search() {
// this.$refs.grid.reload(this.easySearch); // this.$refs.grid.reload(this.easySearch);
var params={ var params = {
conditions:[] conditions: [{
} fieldName:"projectId",
Api.list(params).then(r=>{ conditionalType: 'Equal',
this.list=r.result; fieldValue:this.v.id
}) }],
}, // conditions: []
rowclick(row,li){ };
console.warn("rowclick",row,li); Api.list(params).then((r) => {
let res = r.result;
var data = this.$u.toTree(
res,
"33930562-a9f7-bd95-88ab-d01eb1c4c369",
(u) => {
// console.log(u);
u.expanded = true;
u.selected = false;
u.checked = false;
},
"upId"
);
this.list =data;
});
}, },
add() { // rowclick(row,li){
this.curId = 0; // return {
// test(){
// alert(1);
// }
// }
// },
add(row) {
this.curId=row.id;
this.row=row
this.title = "新增"; this.title = "新增";
this.detail = () => import("./add"); this.detail = () => import("./add");
this.modal = true; this.modal = true;
......
<template>
<div>
<DataGrid :columns="columns" ref="grid" :action="action"><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>
</Form></template>
<template slot="searchForm">
<Search />
</template>
<template slot="buttons">
<Button type="primary" @click="add">新增</Button>
</template>
</DataGrid>
<Modal v-model="modal" :title="title" width="1200" footer-hide :fullscreen="modalFullscreen">
<component :is="detail" :eid="curId" @on-close="cancel" @on-ok="ok" />
</Modal>
</div>
</template>
<script>
import Api from './api'
import Search from './search'
export default {
name: 'list',
components:{
Search
},
head: {
title: "项目计划",
author: "henq",
description: "project_plan 10/21/2020 11:06:17 AM",
},
data() {
return {
action: Api.index,
easySearch: {
keys:{op:"title",value:null}
},
modal: false,
modalFullscreen:true,
title:"新增",
detail:null,
curId: 0,
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:"upId",title:this.l("upId") ,align:"left" ,high:true },
{ key:"title",title:this.l("title") ,align:"left" ,easy:true ,high:true },
{ key:"status",title:this.l("status") ,align:"left" ,high:true ,code:'mes.project_plan.Status' },
{ key:"startDate",title:this.l("startDate") ,align:"left" ,high:true },
{ key:"endDate",title:this.l("endDate") ,align:"left" ,high:true },
{ key:"type",title:this.l("type") ,align:"left" ,high:true ,code:'mes.project_plan.Type' },
{ key:"attachment",title:this.l("attachment") ,align:"left" ,high:true },
{ key:"executor",title:this.l("executor") ,align:"left" ,high:true },
{
title: '操作',
key: 'action',
width: 140,
align: 'center',
render: (h, params) => {
return h('div', { class: "action" }, [
h('op', { attrs: { oprate: 'detail' }, on: { click: () => this.view(params.row.id) } }, '查看'),
h('op', { attrs: { oprate: 'detail' }, on: { click: () => this.main(params.row) } }, '克隆'),
h('op', { attrs: { oprate: 'edit'}, on: { click: () => this.edit(params.row.id) } }, '编辑'),
h('op', { attrs: { oprate: 'delete' }, on: { click: () => this.remove(params.row.id) } }, '删除')
])
}
},
]
}
},
mounted(){
console.log(this);
},
async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典
},
methods:{
ok() {
this.$refs.grid.load()
this.modal = false
this.curId = 0;
},
search() {
this.$refs.grid.reload(this.easySearch)
},
add() {
this.curId = 0;
this.title = "新增";
this.detail =()=> import('./add')
this.modal = true;
},
copy(id) {
this.curId = id;
this.title = "克隆";
this.detail = () =>import('./add')
this.modal = true;
},
main() {
this.title = "模版";
this.detail = () =>import('./main')
this.modal = true;
},
view(id) {
this.curId = id;
this.title = "详情";
this.detail = () =>import('./detail')
this.modal = true;
},
edit(id) {
this.curId = id;
this.title = "编辑";
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
},
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;
return this.$t(vkey)||key
}
}
}
</script>
<style lang="less">
</style>
\ No newline at end of file
...@@ -163,42 +163,42 @@ export default { ...@@ -163,42 +163,42 @@ export default {
high: true, high: true,
}, },
{ // {
key: "lastModificationTime", // key: "lastModificationTime",
title: this.l("lastModificationTime"), // title: this.l("lastModificationTime"),
align: "left", // align: "left",
high: true, // high: true,
hide: true, // hide: true,
}, // },
{ // {
key: "lastModifierUserId", // key: "lastModifierUserId",
title: this.l("lastModifierUserId"), // title: this.l("lastModifierUserId"),
align: "left", // align: "left",
high: true, // high: true,
hide: true, // hide: true,
}, // },
{ // {
key: "isDeleted", // key: "isDeleted",
title: this.l("isDeleted"), // title: this.l("isDeleted"),
align: "left", // align: "left",
high: true, // high: true,
hide: true, // hide: true,
}, // },
{ // {
key: "deletionTime", // key: "deletionTime",
title: this.l("deletionTime"), // title: this.l("deletionTime"),
align: "left", // align: "left",
high: true, // high: true,
hide: true, // hide: true,
}, // },
{ // {
key: "deleterUserId", // key: "deleterUserId",
title: this.l("deleterUserId"), // title: this.l("deleterUserId"),
align: "left", // align: "left",
high: true, // high: true,
hide: true, // hide: true,
}, // },
{ {
key: "title", key: "title",
title: this.l("title"), title: this.l("title"),
......
...@@ -3,7 +3,9 @@ ...@@ -3,7 +3,9 @@
<Row> <Row>
<Filed :span="12" :name="l('creationTime')">{{entity.creationTime}}</Filed> <Filed :span="12" :name="l('creationTime')">{{entity.creationTime}}</Filed>
<Filed :span="12" :name="l('creatorUserId')">{{entity.creatorUserId}}</Filed> <Filed :span="12" :name="l('creatorUserId')">
<User :value="entity.creatorUserId"></User>
</Filed>
<Filed :span="12" :name="l('lastModificationTime')">{{entity.lastModificationTime}}</Filed> <Filed :span="12" :name="l('lastModificationTime')">{{entity.lastModificationTime}}</Filed>
<Filed :span="12" :name="l('lastModifierUserId')">{{entity.lastModifierUserId}}</Filed> <Filed :span="12" :name="l('lastModifierUserId')">{{entity.lastModifierUserId}}</Filed>
<Filed :span="12" :name="l('isDeleted')">{{entity.isDeleted}}</Filed> <Filed :span="12" :name="l('isDeleted')">{{entity.isDeleted}}</Filed>
......
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
<div class="detail"> <div class="detail">
<Row style="height:180px"> <Row style="height:180px">
<Filed :span="6" :name="l('creationTime')">{{entity.creationTime}}</Filed> <Filed :span="6" :name="l('creationTime')">{{entity.creationTime}}</Filed>
<Filed :span="6" :name="l('creatorUserId')">{{entity.creatorUserId}}</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')">{{entity.level}}</Filed> <Filed :span="6" :name="l('level')">{{entity.level}}</Filed>
<Filed :span="6" :name="l('status')">{{entity.status}}</Filed> <Filed :span="6" :name="l('status')">{{entity.status}}</Filed>
......
<template>
<!-- <Table :columns="columns" :data="list" /> -->
<div class="hi">
<div class="x">
{{x}}
</div>
<div class="x">
{{y}}
</div>
</div>
</template>
<script>
export default {
name: '',
data() {
return {
x:[],
y:[],
columns:[{
key:"index",
key:"index",
},{
key:"my"
,title:"my"
},
{
key:"ty"
,title:"ty"
},
{
key:"my-ty"
,title:"my-ty"
,render(h,p) {
return h("span",p.row.my-p.row.ty)
},
}
,{
key:"h",
title:"h"
}
],
list:[{"index":9,"ty":410,"my":483,"h":40},{"index":9,"ty":410,"my":480,"h":40},{"index":9,"ty":410,"my":476,"h":40},{"index":9,"ty":410,"my":476,"h":40},{"index":9,"ty":410,"my":474,"h":40},{"index":8,"ty":369,"my":471,"h":40},{"index":8,"ty":369,"my":468,"h":40},{"index":8,"ty":369,"my":466,"h":40},{"index":8,"ty":369,"my":466,"h":40},{"index":8,"ty":369,"my":463,"h":40},{"index":8,"ty":369,"my":460,"h":40},{"index":8,"ty":369,"my":460,"h":40},{"index":8,"ty":369,"my":459,"h":40},{"index":8,"ty":369,"my":456,"h":40},{"index":8,"ty":369,"my":456,"h":40},{"index":8,"ty":369,"my":452,"h":40},{"index":8,"ty":369,"my":452,"h":40},{"index":8,"ty":369,"my":451,"h":40},{"index":8,"ty":369,"my":450,"h":40},{"index":8,"ty":369,"my":450,"h":40},{"index":8,"ty":369,"my":447,"h":40},{"index":8,"ty":369,"my":444,"h":40},{"index":8,"ty":369,"my":444,"h":40},{"index":8,"ty":369,"my":440,"h":40},{"index":8,"ty":369,"my":438,"h":40},{"index":8,"ty":369,"my":438,"h":40},{"index":8,"ty":369,"my":436,"h":40},{"index":8,"ty":369,"my":433,"h":40},{"index":8,"ty":369,"my":433,"h":40},{"index":7,"ty":328,"my":428,"h":40},{"index":7,"ty":328,"my":426,"h":40},{"index":7,"ty":328,"my":426,"h":40},{"index":7,"ty":328,"my":425,"h":40},{"index":7,"ty":328,"my":423,"h":40},{"index":7,"ty":328,"my":423,"h":40},{"index":7,"ty":328,"my":421,"h":40},{"index":7,"ty":328,"my":419,"h":40},{"index":7,"ty":328,"my":419,"h":40},{"index":7,"ty":328,"my":417,"h":40},{"index":7,"ty":328,"my":416,"h":40},{"index":7,"ty":328,"my":416,"h":40},{"index":7,"ty":328,"my":415,"h":40},{"index":7,"ty":328,"my":414,"h":40},{"index":7,"ty":328,"my":414,"h":40},{"index":7,"ty":328,"my":414,"h":40},{"index":7,"ty":328,"my":414,"h":40},{"index":7,"ty":328,"my":413,"h":40},{"index":7,"ty":328,"my":412,"h":40},{"index":7,"ty":328,"my":411,"h":40},{"index":7,"ty":328,"my":411,"h":40},{"index":7,"ty":328,"my":409,"h":40},{"index":7,"ty":328,"my":409,"h":40},{"index":7,"ty":328,"my":408,"h":40},{"index":7,"ty":328,"my":408,"h":40},{"index":7,"ty":328,"my":407,"h":40},{"index":7,"ty":328,"my":406,"h":40},{"index":7,"ty":328,"my":406,"h":40},{"index":7,"ty":328,"my":405,"h":40},{"index":7,"ty":328,"my":404,"h":40},{"index":7,"ty":328,"my":404,"h":40},{"index":7,"ty":328,"my":403,"h":40},{"index":7,"ty":328,"my":402,"h":40},{"index":7,"ty":328,"my":402,"h":40},{"index":7,"ty":328,"my":401,"h":40},{"index":7,"ty":328,"my":399,"h":40},{"index":7,"ty":328,"my":399,"h":40},{"index":7,"ty":328,"my":398,"h":40},{"index":7,"ty":328,"my":395,"h":40},{"index":7,"ty":328,"my":395,"h":40},{"index":7,"ty":328,"my":395,"h":40},{"index":7,"ty":328,"my":394,"h":40},{"index":7,"ty":328,"my":394,"h":40},{"index":7,"ty":328,"my":394,"h":40},{"index":7,"ty":328,"my":394,"h":40},{"index":7,"ty":328,"my":394,"h":40},{"index":7,"ty":328,"my":394,"h":40},{"index":7,"ty":328,"my":392,"h":40},{"index":7,"ty":328,"my":392,"h":40},{"index":7,"ty":328,"my":391,"h":40},{"index":7,"ty":328,"my":390,"h":40},{"index":6,"ty":287,"my":388,"h":40},{"index":6,"ty":287,"my":385,"h":40},{"index":6,"ty":287,"my":382,"h":40},{"index":6,"ty":287,"my":382,"h":40},{"index":6,"ty":287,"my":379,"h":40},{"index":6,"ty":287,"my":376,"h":40},{"index":6,"ty":287,"my":376,"h":40},{"index":6,"ty":287,"my":372,"h":40},{"index":6,"ty":287,"my":370,"h":40},{"index":6,"ty":287,"my":370,"h":40},{"index":6,"ty":287,"my":368,"h":40},{"index":6,"ty":287,"my":366,"h":40},{"index":6,"ty":287,"my":366,"h":40},{"index":6,"ty":287,"my":364,"h":40},{"index":6,"ty":287,"my":364,"h":40},{"index":6,"ty":287,"my":364,"h":40},{"index":6,"ty":287,"my":364,"h":40},{"index":6,"ty":287,"my":364,"h":40},{"index":6,"ty":287,"my":364,"h":40},{"index":6,"ty":287,"my":363,"h":40},{"index":6,"ty":287,"my":362,"h":40},{"index":6,"ty":287,"my":362,"h":40},{"index":6,"ty":287,"my":361,"h":40},{"index":6,"ty":287,"my":360,"h":40},{"index":6,"ty":287,"my":359,"h":40},{"index":6,"ty":287,"my":359,"h":40},{"index":6,"ty":287,"my":358,"h":40},{"index":6,"ty":287,"my":355,"h":40},{"index":6,"ty":287,"my":355,"h":40},{"index":6,"ty":287,"my":353,"h":40},{"index":6,"ty":287,"my":352,"h":40},{"index":6,"ty":287,"my":352,"h":40},{"index":6,"ty":287,"my":351,"h":40},{"index":6,"ty":287,"my":349,"h":40},{"index":6,"ty":287,"my":349,"h":40},{"index":5,"ty":246,"my":345,"h":40},{"index":5,"ty":246,"my":345,"h":40},{"index":5,"ty":246,"my":344,"h":40},{"index":5,"ty":246,"my":343,"h":40},{"index":5,"ty":246,"my":343,"h":40},{"index":5,"ty":246,"my":341,"h":40},{"index":5,"ty":246,"my":340,"h":40},{"index":5,"ty":246,"my":340,"h":40},{"index":5,"ty":246,"my":339,"h":40},{"index":5,"ty":246,"my":337,"h":40},{"index":5,"ty":246,"my":337,"h":40},{"index":5,"ty":246,"my":337,"h":40},{"index":5,"ty":246,"my":336,"h":40},{"index":5,"ty":246,"my":336,"h":40},{"index":5,"ty":246,"my":334,"h":40},{"index":5,"ty":246,"my":332,"h":40},{"index":5,"ty":246,"my":332,"h":40},{"index":5,"ty":246,"my":330,"h":40},{"index":5,"ty":246,"my":330,"h":40},{"index":5,"ty":246,"my":329,"h":40}]
}
}
,mounted(){
this.list.forEach(u=>{
if(this.x.indexOf(u.index)<0){
this.x.push(u.index)
}
if(this.y.indexOf(u.my-u.ty)<0){
this.y.push(u.my-u.ty)
}
})
}
}
</script>
<style lang="" scoped>
</style>
\ No newline at end of file
<template> <template>
<div class="tree"> <div class="tree">
<TreeGrid :columns="columns" :items="treeData"> <TreeGrid :columns="columns" :items="treeData" :drag="true">
<template slot-scope="{row,column,index}" slot="name"> <template slot-scope="{row,column,index}" slot="name">
<Icon type="md-folder" /> {{row.name}} <Icon type="md-folder" /> {{row.name}}
</template> </template>
...@@ -29,6 +29,7 @@ export default { ...@@ -29,6 +29,7 @@ export default {
title: "名称", title: "名称",
tree:true, tree:true,
slot:"name" slot:"name"
}, },
{ {
key: "status", key: "status",
......
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