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

ok

parent bf1f23c2
<template>
<div>
<div>
<Card>
<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>
<FormItem><Button type="primary" @click="search">查询</Button>
</FormItem>
</Form>
</template>
<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>
<FormItem><Button type="primary" @click="search">查询</Button>
</FormItem>
</Form></template>
<!-- <template slot="searchForm">
<Search />
</template> -->
......@@ -20,9 +18,8 @@
<Modal v-model="modal" :title="title" width="1200" footer-hide>
<component :is="detail" :eid="curId" :v="row" @on-close="cancel" @on-ok="ok" />
</Modal>
</div>
</div>
</template>
<script>
import Api from "./api";
import Search from "./search";
......@@ -36,35 +33,32 @@ export default {
author: "henq",
description: "project_plan 10/19/2020 10:23:07 AM",
},
props: {
eid: {
type: String
props:{
eid:{
type:String
},
data: {
type: Object,
default: () => {
data:{
type:Object,
default:()=>{
return {
id: "33930562-a9f7-bd95-88ab-d01eb1c4c369",
title: "示例项目"
id:"33930562-a9f7-bd95-88ab-d01eb1c4c369",
title:"示例项目"
}
}
}
},
data() {
return {
entity: {},
row: {},
entity:{},
row:{},
action: Api.index,
easySearch: {
keys: {
op: "title",
value: null
},
keys: { op: "title", value: null },
},
modal: false,
title: "新增",
detail: null,
curId: null,
curId:null,
list: [],
columns: [
// { key:"id",title:this.$t("id") ,hide:true ,align:"left" ,high:true },
......@@ -98,73 +92,60 @@ export default {
// }
render: (h, params) => {
return h("div", {
class: "action"
}, [
return h("div", { class: "action" }, [
h(
"op", {
attrs: {
icon: "md-arrow-dropright-circle",
"op",
{
attrs: { icon: "md-arrow-dropright-circle",
type: "icon",
title: "派发",
oprate: "edit",
disalbe:1,
},
on: {
click: () => this.copy(params.row.id)
},
on: { click: () => this.copy(params.row.id) },
},
),
h(
"op", {
attrs: {
icon: "md-add",
"op",
{
attrs: { icon: "md-add",
type: "icon",
title: "新增子任务",
oprate: "edit",
},
on: {
click: () => this.add(params.row)
},
oprate: "edit",},
on: { click: () => this.add(params.row) },
}
),
h(
"op", {
attrs: {
icon: "md-eye",
"op",
{
attrs: { icon: "md-create",
type: "icon",
title: "编辑",
oprate: "edit",
},
on: {
click: () => this.edit(params.row.id)
},
oprate: "edit", },
on: { click: () => this.edit(params.row.id) },
}
),
h(
"op", {
attrs: {
icon: "ios-trash",
"op",
{
attrs: { icon: "ios-trash",
type: "icon",
title: "删除",
oprate: "delete",
msg: "确认要删除吗?"
},
on: {
click: () => this.remove(params.row.id)
},
msg: "确认要删除吗?" },
on: { click: () => this.remove(params.row.id) },
}
),
]);
},
},
{
attrs: { icon: "md-arrow-dropright-circle",
type: "icon",
title: "派发",
oprate: "edit",
disalbe:1,
},
on: { click: () => this.copy(params.row.id) },
key: "type",
width: 90,
title: this.l("type"),
align: "left",
high: true,
code: "mes.project_plan.Type",
},
{
key: "title",
......@@ -175,22 +156,20 @@ export default {
high: true,
},
{
attrs: { icon: "md-create",
type: "icon",
title: "编辑",
oprate: "edit", },
on: { click: () => this.edit(params.row.id) },
}
),
h(
"op",
{
key: "endDate",
title: this.l("endDate"),
key: "status",
title: this.l("status"),
align: "left",
high: true,
type: "date"
code: "mes.project_plan.Status",
},
{
key: "startDate",
title: this.l("startDate"),
align: "left",
high: true
,type:"date"
},
{ key: "endDate", title: this.l("endDate"), align: "left", high: true,type:"date" },
// {
// key: "attachment",
// title: this.l("attachment"),
......@@ -202,7 +181,7 @@ export default {
title: this.l("executor"),
align: "left",
high: true,
type: "users",
type:"users",
},
],
};
......@@ -211,10 +190,7 @@ export default {
console.log(this);
this.search();
},
async fetch({
store,
params
}) {
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: {
......@@ -227,9 +203,9 @@ export default {
// this.$refs.grid.reload(this.easySearch);
var params = {
conditions: [{
fieldName: "projectId",
fieldName:"projectId",
conditionalType: 'Equal',
fieldValue: this.eid
fieldValue:this.eid
}],
// conditions: []
};
......@@ -247,7 +223,7 @@ export default {
"upId"
);
this.list = data;
this.list =data;
});
},
......@@ -259,13 +235,13 @@ export default {
// }
// },
add(row) {
if (row) {
this.curId = row.id;
this.row = row
} else {
this.curId = null;
this.row = {
projectId: this.data.id,
if(row){
this.curId=row.id;
this.row=row
}else{
this.curId=null;
this.row={
projectId:this.data.id
}
}
......@@ -310,6 +286,5 @@ export default {
},
};
</script>
<style lang="less">
</style>
\ No newline at end of file
......@@ -18,26 +18,38 @@
</div>
<ul>
<li>
<a @click="details"> <Icon type="ios-log-in" />详情 </a>
<a @click="details">
<Icon type="ios-log-in" />详情
</a>
&nbsp;
<span>|</span>
</li>
<li>
<a @click="template"> <Icon type="ios-photos" />模版</a>
<a @click="template">
<Icon type="ios-photos" />模版
</a>
&nbsp;
<span>|</span>
</li>
<li>
<a @click="task"> <Icon type="md-create" />任务 </a>
<a @click="task">
<Icon type="md-create" />任务
</a>
&nbsp;
<span>|</span>
</li>
<li>
<a @click="group"> <Icon type="md-create" />成员 </a>
<a @click="groupUser">
<Icon type="md-create" />成员
</a>
&nbsp;
<span>|</span>
</li>
<li>
<a @click="task"> <Icon type="md-create" />动态 </a>
<a @click="task">
<Icon type="md-create" />动态
</a>
&nbsp;
<span>|</span>
</li>
</ul>
......@@ -91,15 +103,46 @@ export default {
}
this.detail = () => import("./details");
},
group() {
methods: {
load(v) {
Api.get({
id: v
}).then((r) => {
this.entity = r.result;
// this.$emit("on-load");
});
},
details() {
this.title = "详细信息";
this.detail = () => import("./details");
},
template() {
// this.curId = this.eid;
this.title = "成员管理";
this.detail = () => import("../groupUser/index1");
this.title = "项目模板";
this.detail = () => import("../plan");
},
task() {
this.curId = this.eid;
this.title = "任务";
//this.detail = () => import("../task/index");
this.$router.push({
name: "project-task",
params: {
id: this.curId
}
});
},
groupUser() {
// this.curId = this.eid;
this.title = "任务";
// this.detail = () => import("./add");
},
l(key) {
key = "project_main" + "." + key;
return this.$t(key);
},
},
watch: {
eid(v) {
if (v > 0) {
......
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