Commit e7490979 authored by 仇晓婷's avatar 仇晓婷

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

parents 708252bb 37babb56
...@@ -1120,7 +1120,9 @@ html [type=button] { ...@@ -1120,7 +1120,9 @@ html [type=button] {
a.empower { a.empower {
color: #FFBD59; color: #FFBD59;
} }
.ivu-drawer-wrap{
z-index: 5000;
}
a.icon { a.icon {
display: inline-block; display: inline-block;
...@@ -1138,9 +1140,9 @@ html [type=button] { ...@@ -1138,9 +1140,9 @@ html [type=button] {
} }
a.disable { a.disable {
color: #CAD1D9; color: #CAD1D9;
cursor: help; cursor:not-allowed;
i:hover { i:hover {
background:#CAD1D9; background:transparent;
} }
} }
......
...@@ -386,7 +386,7 @@ export default { ...@@ -386,7 +386,7 @@ export default {
// } // }
// }); // });
this.columnsCur = items; this.columnsCur = items;
console.log("cur", items,this.columnsCur); // console.log("cur", items,this.columnsCur);
}, },
//数据加载 //数据加载
load() { load() {
......
<template> <template>
<div class="time-view" v-if="startDate && endDate"> <div class="time-view" v-if="startDate && endDate">
<div>{{ startDate }}</div> <span>{{ startDate }}</span>
<div class="jian-tou"> <span class="jian-tou">{{ jg }} {{ unit }}</span>
<div>{{ jg }} {{ unit }}</div> <span>{{ endDate }}</span>
</div>
<div>{{ endDate }}</div>
</div> </div>
</template> </template>
<script> <script>
import dayjs from "dayjs";
export default { export default {
name: "", name: "",
data() { data() {
return { return {
startDate: null, startDate: null,
endDate: null, endDate: null,
unit: "h", unit: "",
jg: 0, jg: 0,
}; };
}, },
...@@ -48,36 +47,12 @@ export default { ...@@ -48,36 +47,12 @@ export default {
methods: { methods: {
init(v) { init(v) {
if (v) { if (v) {
this.startDate = v[this.start]; var start = dayjs(v[this.start]);
this.endDate = v[this.end]; var end = dayjs(v[this.end]);
this.startDate=start.format("YYYY-MM-DD");
this.endDate=end.format("YYYY-MM-DD");
this.jg=end.diff(start,'day');
} }
this.unit = this.mode;
var date1 = new Date(this.startDate).getTime(); //开始时间,时间戳
var date2 = new Date(this.endDate).getTime(); //结束时间,时间戳
this.jg = date2 - date1;
var result = "";
var minute = 1000 * 60;
var hour = minute * 60;
var day = hour * 24;
var month = day * 30;
if (this.jg < 0) return;
var monthC = this.jg / month;
var weekC = this.jg / (7 * day);
var dayC = this.jg / day;
var hourC = this.jg / hour;
var minC = this.jg / minute;
if (this.unit == "m") {
result = "" + parseInt(monthC);
} else if (this.unit == "w") {
result = "" + parseInt(weekC);
} else if (this.unit == "d") {
result = "" + parseInt(dayC);
} else if (this.unit == "h") {
result = "" + parseInt(hourC);
}
this.jg = result;
}, },
}, },
watch: { watch: {
...@@ -92,21 +67,19 @@ export default { ...@@ -92,21 +67,19 @@ export default {
</script> </script>
<style lang="less"> <style lang="less">
.time-view { .time-view {
// width: 600px; display: inline-block;
display: -webkit-flex;
display: flex;
.jian-tou { .jian-tou {
min-width: 55px; min-width: 55px;
text-align: center; text-align: center;
margin: 5px; padding: 0 5px 2px 5px;
background-image: url("../../assets/imgicon/range.png"); background-image: url("../../assets/imgicon/range.png");
background-size: 100%; background-size: 100%;
background-repeat: no-repeat; background-repeat: no-repeat;
margin-top: 7px; background-position: bottom right;
div { // border-bottom: #eee 2px solid;
margin-top: -13px; size: 12px;
} font-weight: bold;
} }
} }
</style> </style>
<template> <template>
<Tooltip trigger="hover" v-if="!disable&&title" :content="titles" placement="top-end"> <a v-if="disable" class="disable">
<slot>
<Icon v-if="type=='icon'" :type="icon" :color="colors" />
<span v-else="type=='text'" v-text="text"></span>
</slot>
</a>
<Tooltip trigger="hover" v-else-if="title" :content="titles" placement="top-end">
<a class="op" :class="css" @click="handler"> <a class="op" :class="css" @click="handler">
<slot> <slot>
<Icon v-if="type=='icon'" :type="icon" :color="colors" /> <Icon v-if="type=='icon'" :type="icon" :color="colors" />
...@@ -40,8 +46,8 @@ export default { ...@@ -40,8 +46,8 @@ export default {
type: String type: String
}, },
disable: { disable: {
type: Number, type: Boolean,
default: 0 default: false
}, },
}, },
...@@ -50,7 +56,8 @@ export default { ...@@ -50,7 +56,8 @@ export default {
text: "", text: "",
css: "detail", css: "detail",
colors: this.color, colors: this.color,
titles: this.title titles: this.title,
disabled:false,
}; };
}, },
created() { created() {
......
...@@ -221,43 +221,17 @@ export default { ...@@ -221,43 +221,17 @@ export default {
</script> </script>
<style lang="less"> <style lang="less">
// @import "../../assets/css/custom.less"; .tree-menu{
border: 1px solid #ddd;
// .tree-menu {
// h3 {
// height: 50px;
// font-size: 14px;
// font-family: Microsoft YaHei;
// font-weight: bold;
// line-height: 50px;
// color: @left-tree-header-color;
// background: @left-tree-header-bg-color;
// opacity: 1;
// padding-left: 10px;
// }
.p-list { .p-list {
position: relative; position: relative;
} }
.icon-d { .icon-d {
position: absolute; position: absolute;
top: 0; top: 0;
right: 0; right: 0;
} }
// .search { }
// height: 50px;
// padding: 5px 10px;
// }
// .fg {
// flex: none;
// // height:0;
// overflow: auto;
// padding-left: 10px;
// }
// .tree {
// height: calc(100vh - 215px);
// overflow: auto;
// }
// }
</style> </style>
<template> <template>
<div> <div>
<Select <Select :placeholder="placeholder" v-model="name" @on-change="change" :multiple="multiple" clearable filterable transfer>
:placeholder="placeholder" <Option v-for="item in users" :value="item.userId" :key="item.userId" :label="item.note" :disabled="item.status==0">
v-model="name"
@on-change="change"
:multiple="multiple"
clearable
filterable
transfer
>
<Option
v-for="item in users"
:value="item.userId"
:key="item.userId"
:label="item.note"
:disabled="item.status==0"
>
<div class="user"> <div class="user">
<State code="project.group.authority" :value="item.authority" class="mr10" type="tag"/> {{item.note}} <State code="project.group.authority" :value="item.authority" class="mr10" type="tag" /> {{item.note}}
<State code="project.group.role" :value="item.role" class="mr10" type="tag"/> <State code="project.group.role" :value="item.role" class="mr10" type="tag" />
</div> </div>
</Option> </Option>
</Select> </Select>
</div> </div>
</template> </template>
<script> <script>
...@@ -46,22 +32,26 @@ export default { ...@@ -46,22 +32,26 @@ export default {
type: String, type: String,
default: "请选择人员", default: "请选择人员",
}, },
multiple:{ multiple: {
type:Boolean, type: Boolean,
default:false, default: false,
}, },
projectId:{ projectId: {
type:String type: String
} }
}, },
methods: { methods: {
load() { load() {
var params={ var params = {
// codition:[{fieldName: "groupId", fieldValue: "b9d6fa9e-e033-4a3e-9925-c1f4437d970c", conditionalType: "Equal"}] conditions: [{
codition:[{fieldName: "projectId", fieldValue: this.projectId, conditionalType: "Equal"}] fieldName: "projectId",
fieldValue: this.projectId,
conditionalType: "Equal"
}]
} }
this.$api.post(`${material}/projectgroupuser/list`, params).then(r=>{ //
this.users=r.result; this.$api.post(`${material}/projectgroupuser/list`, params).then(r => {
this.users = r.result;
}) })
}, },
change(event) { change(event) {
...@@ -75,12 +65,16 @@ export default { ...@@ -75,12 +65,16 @@ export default {
}, },
// 加载人员 // 加载人员
}, },
watch: {
projectId(v){
this.load();
}
},
}; };
</script> </script>
<style lang="less"> <style lang="less">
@import "../../assets/css/custom.less"; @import "../../assets/css/custom.less";
.userGroup { .userGroup {}
}
</style> </style>
...@@ -1863,7 +1863,7 @@ export default { ...@@ -1863,7 +1863,7 @@ export default {
plansToEndTime: '计划结束时间', plansToEndTime: '计划结束时间',
completePercentage: '完成百分比', completePercentage: '完成百分比',
upTaskId: '上级任务Id', upTaskId: '上级任务Id',
workHour:'工时' workHour: '工时'
}, },
//工资记录 //工资记录
project_plan_record: { project_plan_record: {
...@@ -1894,7 +1894,7 @@ export default { ...@@ -1894,7 +1894,7 @@ export default {
projectId: '项目id', projectId: '项目id',
planId: '计划id', planId: '计划id',
title: '名称', title: '名称',
content:'备注信息' content: '备注信息'
}, },
project_group_user: { project_group_user: {
creationTime: '创建时间', creationTime: '创建时间',
...@@ -1912,9 +1912,242 @@ export default { ...@@ -1912,9 +1912,242 @@ export default {
status: '状态', status: '状态',
groupName: '项目组名称', groupName: '项目组名称',
groupId: '项目组Id', groupId: '项目组Id',
authority:'权限', authority: '权限',
whour:'可用工日', whour: '可用工日',
whourpd:'可用工时/天', whourpd: '可用工时/天',
joindate:'加入日期' joindate: '加入日期'
}
,
//文档分类
document_category: {
creationTime: '创建时间',
creatorUserId: '创建人',
lastModificationTime: '更新时间',
lastModifierUserId: '更新人',
isDeleted: '删除人',
deletionTime: '删除时间',
deleterUserId: '删除人',
name: '分类名称',
upId: '上级id',
level: '层级',
totalDocument: '分类下总文档数',
tenantId: '租户id',
type: '类别',
englishFullName: '英文全称',
englishName: '英文简称',
status: '',
inheritCategoryId: '继承', //继承分类id
// url:'上传模板', //模板路径
template: '模板Id', //模板路径
templateId: '选择模板',
status: '状态',
workFlows: '选择流程',
workFlowIds: '流程Id',
description: '备注'
},
document_template: {
creationTime: '创建时间',
creatorUserId: '创建人',
lastModificationTime: '更新时间',
lastModifierUserId: '更新人',
isDeleted: '删除人',
deletionTime: '删除时间',
deleterUserId: '删除人',
name: '名称',
status: '状态',
creator: '创建人',
remark: '备注',
url: '模板',
},
document_ref: {
creationTime: '创建时间',
creatorUserId: '创建人',
lastModificationTime: '更新时间',
lastModifierUserId: '更新人',
isDeleted: '删除人',
deletionTime: '删除时间',
deleterUserId: '删除人',
documentId: '文档id',
refName: '引用的文档名称',
refId: '引用的文档id',
name: '文档名称',
},
document_property_definition: {
title: '标题',
name: '编号',
revision: '版本',
description: '详细说明',
miji: "密级",
status: '状态',
filePath: '上传文件',
img: '上传图片',
field: '字段',
dataType: '数据类型',
dataLength: '数据长度',
dictionaryId: '',
note: '',
unitName: '单位',
tag: '属性类别',
categoryId: '所属分类',
required: '必填',
isUnique: '是否唯一',
fieldType: '',
creationTime: '创建时间',
creatorUserId: '创建人',
lastModificationTime: '更新时间',
lastModifierUserId: '更新人',
isDeleted: '删除人',
deletionTime: '删除时间',
deleterUserId: '删除人',
dictionaryCode: '',
codeRuleId: '',
},
project_plan: {
creationTime: '创建时间',
creatorUserId: '创建人',
lastModificationTime: '更新时间',
lastModifierUserId: '更新人',
isDeleted: '删除人',
deletionTime: '删除时间',
deleterUserId: '删除人',
projectId: '项目id',
upId: '父级',
title: '标题',
status: '状态',
note: '描述',
startDate: '开始日期',
endDate: '结束日期',
type: '类型',
attachment: '附件',
executor: '执行人',
},
project_main: {
creationTime: '创建时间',
creatorUserId: '创建人',
lastModificationTime: '更新时间',
lastModifierUserId: '更新人',
isDeleted: '删除人',
deletionTime: '删除时间',
deleterUserId: '删除人',
title: '标题',
note: '备注',
state: '状态',
type: '分类',
picture: '图片',
attachment: '附件',
phase: '阶段',
startDate: '开始日期',
endDate: '结束日期',
businessUnits: '业务单位',
},
//项目任务
project_task: {
creationTime: '创建时间',
creatorUserId: '创建人',
lastModificationTime: '更新时间',
lastModifierUserId: '更新人',
isDeleted: '删除人',
deletionTime: '删除时间',
deleterUserId: '删除人',
title: '标题',
planId: '计划id',
projectId: '项目id',
level: '级别',
status: '状态',
projectTitle: '项目标题',
planTitle: '计划名称',
userIds: '执行组',
userId: '执行人',
endDate: '完成日期',
workHour: '工时',
note: '备注',
startDate: '开始日期',
plansToStartDate: '计划开始日期',
plansToEndTime: '计划结束时间',
completePercentage: '完成百分比',
upTaskId: '上级任务Id',
},
//工资记录
project_plan_record: {
creationTime: '创建时间',
creatorUserId: '创建人',
lastModificationTime: '更新时间',
lastModifierUserId: '更新人',
isDeleted: '删除人',
deletionTime: '删除时间',
deleterUserId: '删除人',
projectId: '项目id',
planId: '计划id',
workHour: '工作时间',
status: '状态',
title: '标题',
note: '备注',
attachment: '附件',
taskId: '任务id',
},
project_group: {
creationTime: '创建时间',
creatorUserId: '创建人',
lastModificationTime: '更新时间',
lastModifierUserId: '更新人',
isDeleted: '删除人',
deletionTime: '删除时间',
deleterUserId: '删除人',
projectId: '项目id',
planId: '计划id',
title: '名称',
content: '备注信息'
},
project_group_user: {
creationTime: '创建时间',
creatorUserId: '创建人',
lastModificationTime: '更新时间',
lastModifierUserId: '更新人',
isDeleted: '删除人',
deletionTime: '删除时间',
deleterUserId: '删除人',
userId: '用户',
role: '角色',
projectId: '项目id',
planId: '计划id',
note: '备注',
status: '状态',
groupName: '项目组名称',
groupId: '项目组Id',
authority: '权限',
whour: '可用工日',
whourpd: '可用工时/天',
joindate: '加入日期',
title: '名称',
content: '备注信息'
},
project_log: {
creationTime: '创建时间',
creatorUserId: '创建人',
lastModificationTime: '更新时间',
lastModifierUserId: '更新人',
// isDeleted: '是否已删除',
deletionTime: '删除时间',
deleterUserId: '删除人',
entity: '实体',
entityId: '实体的id',
action: '行动',
content: '内容',
upId: '计划或任务id',
projectId: '项目id',
},
project_template: {
creationTime: '创建时间',
creatorUserId: '创建人',
lastModificationTime: '更新时间',
lastModifierUserId: '更新人',
isDeleted: '删除人',
deletionTime: '删除时间',
deleterUserId: '删除人',
title: '标题',
note: '请注意',
template: '模板',
attachment: '附件',
type: '模版类型',
} }
} }
\ No newline at end of file
import Api from '@/plugins/request' import Api from '@/plugins/request'
export default { export default {
index:`${material}/projectgroupuser/paged`, index: `${material}/projectgroupuser/paged`,
paged(params){ paged(params) {
return Api.post(`${material}/projectgroupuser/paged`,params); return Api.post(`${material}/projectgroupuser/paged`, params);
}, },
list(params){ list(params) {
return Api.post(`${material}/projectgroupuser/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);
}, },
create(params){ create(params) {
return Api.post(`${material}/projectgroupuser/create`,params); return Api.post(`${material}/projectgroupuser/create`, params);
}, },
update(params){ update(params) {
return Api.post(`${material}/projectgroupuser/update`,params); return Api.post(`${material}/projectgroupuser/update`, params);
}, },
delete(id) { delete(id) {
return Api.delete(`${material}/projectgroupuser/delete`,{params:{id:id}}); return Api.delete(`${material}/projectgroupuser/delete`, { params: { id: id } });
}, },
deletes(params) { deletes(params) {
return Api.post(`${material}/projectgroupuser/batchdelete`,params); return Api.post(`${material}/projectgroupuser/batchdelete`, params);
} },
} groundPaged(params) {
\ No newline at end of file // return Api.post(`${material}/projectgroup/paged`, params);
return Api.post(`${material}/projectgroup/list`, params);
},
importTeam(params) { //批量添加
return Api.post(`${material}/projectgroupuser/createbatch`, params);
},
allTeams(params) { //添加项目组和成员
return Api.post(`${material}/projectgroupuser/creategroupanduser`, params);
},
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
<template>
<Form ref="form" :model="entity" :rules="rules" :label-width="90">
<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"
><FormItem :label="l('entity')" prop="entity">
<Input v-model="entity.entity"> </Input> </FormItem
></Col>
<Col :span="12"
><FormItem :label="l('entityId')" prop="entityId">
<Input v-model="entity.entityId"> </Input> </FormItem
></Col>
<Col :span="12"
><FormItem :label="l('action')" prop="action">
<Dictionary
code="mes.project_log.Action"
v-model="entity.action"
></Dictionary> </FormItem
></Col>
<Col :span="24"
><FormItem :label="l('content')" prop="content">
<Input
v-model="entity.content"
type="textarea"
:rows="5"
></Input> </FormItem
></Col>
<Col :span="12"
><FormItem :label="l('upId')" prop="upId">
<Input v-model="entity.upId"> </Input> </FormItem
></Col>
<Col :span="12"
><FormItem :label="l('projectId')" prop="projectId">
<Input v-model="entity.projectId"> </Input> </FormItem
></Col>
</Row>
<FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled"
>保存</Button
>
<Button @click="handleClose" class="ml20">取消</Button>
</FormItem>
</Form>
</template>
<script>
import Api from "./api";
export default {
name: "Add",
data() {
return {
disabled: false,
entity: {
creationTime: null,
creatorUserId: null,
lastModificationTime: null,
lastModifierUserId: null,
isDeleted: null,
deletionTime: null,
deleterUserId: null,
entity: "",
entityId: "",
action: null,
content: "",
upId: "",
projectId: "",
},
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }],
},
};
},
props: {
v: Object,
eid: Number,
},
mounted() {
if (this.eid > 0) {
this.load(this.eid);
}
},
methods: {
handleSubmit() {
this.$refs.form.validate((v) => {
if (v) {
this.disabled = true;
Api.create(this.entity)
.then((r) => {
this.disabled = false;
if (r.success) {
this.$Message.success("保存成功");
this.$emit("on-ok");
} else {
this.$Message.error("保存失败");
}
})
.catch((err) => {
this.disabled = false;
this.$Message.error("保存失败");
console.warn(err);
});
}
});
},
handleClose() {
this.$emit("on-close");
},
load(v) {
Api.get({ id: v }).then((r) => {
this.entity = r.result;
this.entity.id = 0;
});
},
l(key) {
key = "project_log" + "." + key;
return this.$t(key);
},
},
watch: {
v() {
this.entity = this.$u.clone(this.v);
},
eid(v) {
if (v > 0) {
this.load(v);
}
},
},
};
</script>
\ No newline at end of file
import Api from '@/plugins/request'
export default {
index: `${material}/projectlog/paged`,
paged(params) {
return Api.post(`${material}/projectlog/paged`, params);
},
listall(params) {
return Api.post(`${material}/projectlog/list`, params);
},
get(params) {
return Api.get(`${material}/projectlog/get`, params);
},
create(params) {
return Api.post(`${material}/projectlog/create`, params);
},
update(params) {
return Api.post(`${material}/projectlog/update`, params);
},
delete(id) {
return Api.delete(`${material}/projectlog/delete`, { params: { id: id } });
},
deletes(params) {
return Api.post(`${material}/projectlog/batchdelete`, params);
},
list(params) {
return Api.post(`${material}/projectgroupuser/list`, params);
},
}
\ No newline at end of file
<template>
<div class="detail">
<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('entity')">{{ entity.entity }}</Filed>
<Filed :span="12" :name="l('entityId')">{{ entity.entityId }}</Filed>
<Filed :span="12" :name="l('action')">{{ entity.action }}</Filed>
<Filed :span="24" :name="l('content')">{{ entity.content }}</Filed>
<Filed :span="12" :name="l('upId')">{{ entity.upId }}</Filed>
<Filed :span="12" :name="l('projectId')">{{ entity.projectId }}</Filed>
</Row>
</div>
</template>
<script>
import Api from "./api";
export default {
name: "Add",
data() {
return {
entity: {},
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }],
code: [{ required: true, message: "必填", trigger: "blur" }],
},
};
},
props: {
eid: String,
},
mounted() {
if (this.eid ) {
this.load(this.eid);
}
},
methods: {
load(v) {
Api.get({ id: v }).then((r) => {
this.entity = r.result;
this.$emit("on-load");
});
},
handleClose() {
this.$emit("on-close");
},
l(key) {
key = "project_log" + "." + key;
return this.$t(key);
},
},
watch: {
eid(v) {
if (v > 0) {
this.load(v);
}
},
},
};
</script>
<style lang="less">
.detail{
width: 100%;
}
</style>
\ No newline at end of file
<template>
<Form ref="form" :model="entity" :rules="rules" :label-width="90">
<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"
><FormItem :label="l('entity')" prop="entity">
<Input v-model="entity.entity"> </Input> </FormItem
></Col>
<Col :span="12">
<FormItem :label="l('entityId')" prop="entityId">
<Input v-model="entity.entityId"> </Input> </FormItem >
</Col>
<Col :span="12"
><FormItem :label="l('action')" prop="action">
<Dictionary
code="mes.project_log.Action"
v-model="entity.action"
></Dictionary>
</FormItem
></Col>
<Col :span="24"
><FormItem :label="l('content')" prop="content">
<Input
v-model="entity.content"
type="textarea"
:rows="5"
></Input> </FormItem
></Col>
<Col :span="12"
><FormItem :label="l('upId')" prop="upId">
<Input v-model="entity.upId"> </Input> </FormItem
></Col>
<Col :span="12"
><FormItem :label="l('projectId')" prop="projectId">
<Input v-model="entity.projectId"> </Input> </FormItem
></Col>
</Row>
<FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled"
>保存</Button
>
<Button @click="handleClose" class="ml20">取消</Button>
</FormItem>
</Form>
</template>
<script>
import Api from "./api";
export default {
name: "Edit",
data() {
return {
disabled: false,
entity: {
},
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }],
},
};
},
props: {
eid: String,
},
mounted() {
console.log("this.eid",this.eid)
if (this.eid) {
this.load(this.eid);
}
},
methods: {
load(v) {
Api.get({ id: v }).then((r) => {
debugger
this.entity = r.result;
});
},
handleSubmit() {
this.$refs.form.validate((v) => {
if (v) {
this.disabled = true;
Api.update(this.entity)
.then((r) => {
this.disabled = false;
if (r.success) {
this.$Message.success("保存成功");
this.$emit("on-ok");
} else {
this.$Message.error("保存失败");
}
})
.catch((err) => {
this.disabled = false;
this.$Message.error("保存失败");
console.warn(err);
});
}
});
},
handleClose() {
this.$emit("on-close");
},
l(key) {
key = "project_log" + "." + key;
return this.$t(key);
},
},
watch: {
eid(v) {
if (v != 0) {
this.load(v);
}
},
},
};
</script>
\ No newline at end of file
<template>
<div>
<DataGrid :columns="columns" ref="grid" :action="action">
<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>
<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_log 10/20/2020 10:22:04 AM",
},
data() {
return {
action: Api.index,
easySearch: {},
modal: false,
title: "新增",
detail: null,
curId: "",
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: "entity", title: this.l("entity"), align: "left", high: true },
{
key: "entityId",
title: this.l("entityId"),
align: "left",
high: true,
},
{
key: "action",
title: this.l("action"),
align: "left",
high: true,
code: "mes.project_log.Action",
},
{ key: "upId", title: this.l("upId"), align: "left", high: true },
{
key: "projectId",
title: this.l("projectId"),
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) },
},
"删除"
),
]);
},
},
],
};
},
mounted() {
console.log(this);
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: {
ok() {
this.$refs.grid.load();
this.modal = false;
this.curId = "";
},
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;
// },
view(id) {
this.curId = id;
this.title = "详情";
this.detail = () => import("./list");
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 = "";
this.modal = false;
},
l(key) {
/*
project_log:{
creationTime:'创建时间',
creatorUserId:'创建人',
lastModificationTime:'更新时间',
lastModifierUserId:'更新人',
isDeleted:'删除人',
deletionTime:'删除时间',
deleterUserId:'删除人',
entity:'实体',
entityId:'实体的id',
action:'行动',
content:'内容',
upId:'计划或任务id',
projectId:'项目id',
}
*/
let vkey = "project_log" + "." + key;
return this.$t(vkey) || key;
},
},
};
</script>
<style lang="less">
</style>
\ No newline at end of file
This diff is collapsed.
<template>
<Form ref="form" :model="condition" :label-width="90">
<Row>
<Col :span="12" :v-if="condition.id.show"
><FormItem :label="$t('id')" prop="id">
<Input v-model="condition.id.value"> </Input> </FormItem
></Col>
<Col :span="12" :v-if="condition.creationTime.show"
><FormItem :label="l('creationTime')" prop="creationTime">
<DatePicker
type="daterange"
v-model="condition.creationTime.value"
></DatePicker> </FormItem
></Col>
<Col :span="12" :v-if="condition.creatorUserId.show"
><FormItem :label="l('creatorUserId')" prop="creatorUserId">
<Input v-model="condition.creatorUserId.value"> </Input> </FormItem
></Col>
<Col :span="12" :v-if="condition.lastModificationTime.show"
><FormItem
:label="l('lastModificationTime')"
prop="lastModificationTime"
>
<DatePicker
type="daterange"
v-model="condition.lastModificationTime.value"
></DatePicker> </FormItem
></Col>
<Col :span="12" :v-if="condition.lastModifierUserId.show"
><FormItem :label="l('lastModifierUserId')" prop="lastModifierUserId">
<Input v-model="condition.lastModifierUserId.value">
</Input> </FormItem
></Col>
<Col :span="12" :v-if="condition.deletionTime.show"
><FormItem :label="l('deletionTime')" prop="deletionTime">
<DatePicker
type="daterange"
v-model="condition.deletionTime.value"
></DatePicker> </FormItem
></Col>
<Col :span="12" :v-if="condition.entity.show"
><FormItem :label="l('entity')" prop="entity">
<Input v-model="condition.entity.value"> </Input> </FormItem
></Col>
<Col :span="12" :v-if="condition.entityId.show"
><FormItem :label="l('entityId')" prop="entityId">
<Input v-model="condition.entityId.value"> </Input> </FormItem
></Col>
<Col :span="12" :v-if="condition.action.show"
><FormItem :label="l('action')" prop="action">
<Dictionary
code="mes.project_log.Action"
v-model="condition.action.value"
></Dictionary> </FormItem
></Col>
<Col :span="24" :v-if="condition.content.show"
><FormItem :label="l('content')" prop="content">
<Input v-model="condition.content.value"> </Input> </FormItem
></Col>
<Col :span="12" :v-if="condition.upId.show"
><FormItem :label="l('upId')" prop="upId">
<Input v-model="condition.upId.value"> </Input> </FormItem
></Col>
<Col :span="12" :v-if="condition.projectId.show"
><FormItem :label="l('projectId')" prop="projectId">
<Input v-model="condition.projectId.value"> </Input> </FormItem
></Col>
</Row>
</Form>
</template>
<script>
import Api from "./api";
export default {
name: "Add",
data() {
return {
condition: {
id: { op: "Equal", value: null, show: true },
creationTime: { op: "Range", value: null, show: true },
creatorUserId: { op: "Equal", value: null, show: true },
lastModificationTime: { op: "Range", value: null, show: true },
lastModifierUserId: { op: "Equal", value: null, show: true },
deletionTime: { op: "Range", value: null, show: true },
entity: { op: "Equal", value: null, show: true },
entityId: { op: "Equal", value: null, show: true },
action: { op: "Equal", value: null, show: true },
content: { op: "Equal", value: null, show: true },
upId: { op: "Equal", value: null, show: true },
projectId: { op: "Equal", value: null, show: true },
},
};
},
methods: {
handleClose() {
this.$emit("on-close");
},
l(key) {
key = "project_log" + "." + key;
return this.$t(key);
},
},
};
</script>
\ No newline at end of file
<template> <template>
<div> <div>
<Card> <Card>
<EditGrid :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><Button type="primary" @click="search">查询</Button>
</FormItem> </FormItem>
...@@ -100,7 +99,7 @@ export default { ...@@ -100,7 +99,7 @@ export default {
type: "icon", type: "icon",
title: "派发", title: "派发",
oprate: "edit", oprate: "edit",
disable:params.row.status disable:params.row.status!=0
}, },
on: { click: () => this.send(params.row) }, on: { click: () => this.send(params.row) },
}, },
...@@ -111,6 +110,7 @@ export default { ...@@ -111,6 +110,7 @@ export default {
attrs: { icon: "md-add", attrs: { icon: "md-add",
type: "icon", type: "icon",
title: "新增子任务", title: "新增子任务",
disable:params.row.status>1,
oprate: "edit",}, oprate: "edit",},
on: { click: () => this.add(params.row) }, on: { click: () => this.add(params.row) },
} }
...@@ -121,7 +121,9 @@ export default { ...@@ -121,7 +121,9 @@ export default {
attrs: { icon: "md-create", attrs: { icon: "md-create",
type: "icon", type: "icon",
title: "编辑", title: "编辑",
oprate: "edit", }, oprate: "edit",
disable:params.row.status!==0,
},
on: { click: () => this.edit(params.row.id) }, on: { click: () => this.edit(params.row.id) },
} }
), ),
...@@ -132,6 +134,7 @@ export default { ...@@ -132,6 +134,7 @@ export default {
type: "icon", type: "icon",
title: "删除", title: "删除",
oprate: "delete", oprate: "delete",
disable:params.row.status!==0,
msg: "确认要删除吗?" }, msg: "确认要删除吗?" },
on: { click: () => this.remove(params.row.id) }, on: { click: () => this.remove(params.row.id) },
} }
......
...@@ -136,11 +136,12 @@ export default { ...@@ -136,11 +136,12 @@ export default {
}, },
group() { group() {
this.title = "项目成员"; this.title = "项目成员";
this.detail = () => import("../groupUser/index1"); this.detail = () => import("../groupUser/list");
}, },
log() { log() {
this.title = "项目动态"; this.curId = this.eid;
this.detail = () => import("../record/index1"); this.title = "动态";
this.detail = () => import("../log/list");
}, },
l(key) { l(key) {
key = "project_main" + "." + key; key = "project_main" + "." + key;
......
...@@ -12,13 +12,12 @@ ...@@ -12,13 +12,12 @@
</Col> </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" /></Input> <i-quill v-model="entity.note" :height="300" v-paste="handleImg" />
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('attachment')" prop="attachment"> <FormItem :label="l('attachment')" prop="attachment">
<files ref="refFile" :parms="parms" files /> <files ref="refFile" :parms="parms" files />
</Input>
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
...@@ -41,17 +40,9 @@ export default { ...@@ -41,17 +40,9 @@ export default {
return { return {
disabled: false, disabled: false,
entity: { entity: {
creationTime: null,
creatorUserId: null,
lastModificationTime: null,
lastModifierUserId: null,
isDeleted: null,
deletionTime: null,
deleterUserId: null,
projectId: "", projectId: "",
planId: "", planId: "",
workHour: 0, workHour: 0,
status: null,
title: "", title: "",
note: "", note: "",
attachment: "", attachment: "",
...@@ -64,21 +55,33 @@ export default { ...@@ -64,21 +55,33 @@ export default {
field: "", field: "",
}, },
rules: { rules: {
name: [{ title: [{
required: true, required: true,
message: '必填', message: '必填',
trigger: 'blur' trigger: 'blur'
}],
workHour: [{
required: true,
message: '必填',
trigger: 'blur',
type: "number"
}] }]
} }
} }
}, },
props: { props: {
v: Object, v: Object,
eid: String eid: String,
row: {
type: Object,
default: () => {
return null;
},
},
}, },
mounted() { mounted() {
if (this.eid != "") { if (this.eid != "") {
this.load(this.eid); // this.load(this.eid);
this.parms.eid = this.$u.guid(); this.parms.eid = this.$u.guid();
} }
}, },
...@@ -93,6 +96,8 @@ export default { ...@@ -93,6 +96,8 @@ export default {
} }
this.disabled = true; this.disabled = true;
this.entity.taskId = this.eid this.entity.taskId = this.eid
this.entity.projectId = this.row.projectId
this.entity.planId = this.row.planId
Api.create(this.entity).then((r) => { Api.create(this.entity).then((r) => {
this.disabled = false; this.disabled = false;
if (r.success) { if (r.success) {
...@@ -148,13 +153,19 @@ export default { ...@@ -148,13 +153,19 @@ export default {
}, },
watch: { watch: {
v() { v() {
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);
} }
},
row(v) {
if (v != null) {
//this.entity.projectId = v.projectId
//this.entity.planId = v.planId
} }
},
} }
} }
</script> </script>
...@@ -12,13 +12,12 @@ ...@@ -12,13 +12,12 @@
</Col> </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" /></Input> <i-quill v-model="entity.note" :height="300" v-paste="handleImg" />
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('attachment')" prop="attachment"> <FormItem :label="l('attachment')" prop="attachment">
<files ref="refFile" :parms="parms" files /> <files ref="refFile" :parms="parms" files />
</Input>
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
...@@ -46,7 +45,7 @@ export default { ...@@ -46,7 +45,7 @@ export default {
required: true, required: true,
message: '必填', message: '必填',
trigger: 'blur' trigger: 'blur'
}] }],
}, },
parms: { parms: {
app: "taskRecord", app: "taskRecord",
......
...@@ -98,7 +98,7 @@ export default { ...@@ -98,7 +98,7 @@ export default {
{ {
key: "creationTime", key: "creationTime",
title: this.l("creationTime"), title: this.l("creationTime"),
align: "left", align: "center",
high: true, high: true,
}, },
{ {
......
...@@ -17,14 +17,13 @@ ...@@ -17,14 +17,13 @@
<p class="content"> <p class="content">
操作员:<User :value="item.creatorUserId"></User> 操作员:<User :value="item.creatorUserId"></User>
</p> </p>
<p class="content"> <p class="content" v-if="item.workHour&&item.workHour>0">
工时:{{item.workHour}} 工时:{{item.workHour}}
</p> </p>
<p class="content"> <p class="content">
标题:{{item.title}} 标题:{{item.title}}
</p> </p>
<p class="pl10" v-if="item.note"><a @click="view(item.id)">查看详细</a></p> <p class="pl10" v-if="item.note&&item.note.length>0"><a @click="view(item.id)">查看详细</a></p>
<p class="pl10" v-if="item.attachment"><a @click="viewFiles(item.attachment)">查看附件</a></p>
</TimelineItem> </TimelineItem>
</Timeline> </Timeline>
<p class="content" v-else>暂无数据</p> <p class="content" v-else>暂无数据</p>
......
...@@ -12,12 +12,12 @@ ...@@ -12,12 +12,12 @@
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('userId')" prop="userId"> <FormItem :label="l('userId')" prop="userId">
<UserSelect ref="userSelected" v-model="entity.userId" /> <UserGroup v-model="entity.userId" :projectId="eid" />
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem label="计划起止日期" prop="date"> <FormItem label="计划日期" prop="date">
<DatePicker type="datetimerange" format="yyyy-MM-dd" v-model="date" placeholder="请选择时间范围" @on-change="changeFormat" style="width: 300px"></DatePicker> <DatePicker type="datetimerange" format="yyyy-MM-dd" placeholder="请选择时间范围" @on-change="changeFormat" style="width: 300px"></DatePicker>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="24"> <Col :span="24">
......
This diff is collapsed.
...@@ -12,13 +12,17 @@ ...@@ -12,13 +12,17 @@
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('userId')" prop="userId"> <FormItem :label="l('userId')" prop="userId">
<UserSelect ref="userSelected" v-model="entity.userId" /></Input> <UserGroup v-model="entity.userId" :projectId="entity.projectId" />
</FormItem>
</Col>
<Col :span="12">
<FormItem label="计划日期" prop="date">
<DatePicker type="datetimerange" format="yyyy-MM-dd" placeholder="请选择时间范围" v-model="planDate" @on-change="changeFormat" style="width: 300px"></DatePicker>
</FormItem> </FormItem>
</Col> </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" /></Input> <i-quill v-model="entity.note" :height="300" v-paste="handleImg" />
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
...@@ -44,6 +48,7 @@ export default { ...@@ -44,6 +48,7 @@ export default {
return { return {
disabled: false, disabled: false,
entity: {}, entity: {},
planDate: [],
rules: { rules: {
name: [{ name: [{
required: true, required: true,
...@@ -74,6 +79,9 @@ export default { ...@@ -74,6 +79,9 @@ export default {
}).then(r => { }).then(r => {
this.entity = r.result; this.entity = r.result;
this.entity.userId = parseInt(r.result.userId) this.entity.userId = parseInt(r.result.userId)
if (r.result.plansToStartDate && r.result.plansToStartDate != '' && r.result.plansToEndTime && r.result.plansToEndTime != '') {
this.planDate = [r.result.plansToStartDate, r.result.plansToEndTime]
}
}) })
}, },
handleSubmit() { handleSubmit() {
...@@ -120,6 +128,10 @@ export default { ...@@ -120,6 +128,10 @@ export default {
// new R // new R
} }
}, },
changeFormat(val) {
this.entity.plansToStartDate = val[0];
this.entity.plansToEndTime = val[1];
},
l(key) { l(key) {
key = "project_task" + "." + key; key = "project_task" + "." + key;
return this.$t(key) return this.$t(key)
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<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 :columns="columns" ref="grid" :action="action" :conditions="easySearch" :lazy="true"> <DataGrid :columns="columns" ref="grid" :action="action" :conditions="easySearch" :lazy="true">
<template slot="easySearch"> <template slot="easySearch">
<Form ref="formInline" inline> <Form ref="formInline" inline>
...@@ -44,15 +44,6 @@ ...@@ -44,15 +44,6 @@
--> -->
</Menu> </Menu>
</div> </div>
<div class="taskTab" v-if="false">
<Tabs value="statu2">
<TabPane label="所有" name="statu1" />
<TabPane label="未关闭" name="statu2" />
<TabPane label="指派给我" name="statu3" />
<TabPane label="由我参与" name="statu4" />
<TabPane label="已延期" name="statu5" />
</Tabs>
</div>
</FormItem> </FormItem>
<FormItem prop="keys"><Input placeholder="请输入项目标题/计划名称/任务标题" v-model="easySearch.keys.value" v-width="240" /> </FormItem> <FormItem prop="keys"><Input placeholder="请输入项目标题/计划名称/任务标题" v-model="easySearch.keys.value" v-width="240" /> </FormItem>
<FormItem><Button type="primary" @click="search">查询</Button></FormItem> <FormItem><Button type="primary" @click="search">查询</Button></FormItem>
...@@ -66,16 +57,11 @@ ...@@ -66,16 +57,11 @@
</Form> </Form>
</template> </template>
<template slot="buttons"> <template slot="buttons">
<Button type="primary" @click="add">新增</Button> <Button type="primary" @click="add" v-if="planId!=''">新增</Button>
</template>
<template slot="batch">
<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 v-model="modal" :title="title" width="1200" :fullscreen="fullScreen" footer-hide> <Modal v-model="modal" :title="title" width="1200" :fullscreen="fullScreen" footer-hide>
<component :is="detail" :eid="curId" :pid="planId" @on-close="cancel" @on-ok="ok" /> <component :is="detail" :eid="curId" :pid="planId" :row="rowObj" @on-close="cancel" @on-ok="ok" />
</Modal> </Modal>
</Content> </Content>
</Layout> </Layout>
...@@ -110,12 +96,17 @@ export default { ...@@ -110,12 +96,17 @@ export default {
planId: { planId: {
op: "In", op: "In",
value: [] value: []
},
status: {
op: "In",
value: []
} }
}, },
theme1: 'light', theme1: 'light',
modal: false, modal: false,
title: "新增", title: "新增",
detail: null, detail: null,
rowObj: null,
curId: '', curId: '',
fullScreen: false, fullScreen: false,
projectId: '', projectId: '',
...@@ -163,7 +154,7 @@ export default { ...@@ -163,7 +154,7 @@ export default {
title: this.l("status"), title: this.l("status"),
align: "center", align: "center",
high: true, high: true,
width: 120, width: 100,
code: 'project.task.status' code: 'project.task.status'
}, },
...@@ -176,36 +167,30 @@ export default { ...@@ -176,36 +167,30 @@ export default {
}, },
{ {
key: "startDate", key: "startDate",
title: '计划起止日期', title: '实际日期',
align: "center", align: "center",
high: true, high: true,
width: 200, width: 280,
render: (h, params) => { render: (h, params) => {
return h('TimeDifference', { return h('DateRange', {
props: { props: {
timeValue: { value: params.row,
startDate: params.row.plansToStartDate,
endDate: params.row.plansToEndTime,
},
work: 0
} }
}) })
} }
}, },
{ {
key: "startDate", key: "startDate",
title: '实际起止日期', title: '计划日期',
align: "center", align: "center",
high: true, high: true,
width: 200, width: 280,
render: (h, params) => { render: (h, params) => {
return h('TimeDifference', { return h('DateRange', {
props: { props: {
timeValue: { value: params.row,
startDate: params.row.startDate, start: "plansToStartDate",
endDate: params.row.endDate, end: "plansToEndTime",
},
work: 1
} }
}) })
} }
...@@ -262,8 +247,8 @@ export default { ...@@ -262,8 +247,8 @@ export default {
icon: "md-arrow-dropright-circle", icon: "md-arrow-dropright-circle",
type: "icon", type: "icon",
oprate: "edit", oprate: "edit",
title: params.row.status == 0 ? "开始" : params.row.status == 2 ? "继续" : '', title: "开始",
disable: params.row.status disable: params.row.status == 0 ? false : true
}, },
on: { on: {
click: () => this.updatepart(params.row.id, 1) click: () => this.updatepart(params.row.id, 1)
...@@ -274,11 +259,11 @@ export default { ...@@ -274,11 +259,11 @@ export default {
icon: "ios-alarm", icon: "ios-alarm",
type: "icon", type: "icon",
oprate: "edit", oprate: "edit",
title: "完成", title: "汇报工作",
disable: params.row.status == 1 ? 0 : 1 disable: params.row.status == 1 || params.row.status == 3 ? false : true
}, },
on: { on: {
click: () => this.updatepart(params.row.id, 2) click: () => this.viewRecord(params.row.id, params.row.status)
} }
}), }),
h('op', { h('op', {
...@@ -287,10 +272,10 @@ export default { ...@@ -287,10 +272,10 @@ export default {
type: "icon", type: "icon",
oprate: "add", oprate: "add",
title: "新增记录", title: "新增记录",
disable: params.row.status == 1 ? 0 : 1 disable: params.row.status == 1 ? false : true
}, },
on: { on: {
click: () => this.addRecord(params.row.id) click: () => this.addRecord(params.row)
} }
}), }),
h('op', { h('op', {
...@@ -299,7 +284,7 @@ export default { ...@@ -299,7 +284,7 @@ export default {
type: "icon", type: "icon",
oprate: "edit", oprate: "edit",
title: "修改", title: "修改",
disable: params.row.status disable: params.row.status == 0 ? false : true
}, },
on: { on: {
click: () => this.edit(params.row.id) click: () => this.edit(params.row.id)
...@@ -311,7 +296,7 @@ export default { ...@@ -311,7 +296,7 @@ export default {
type: "icon", type: "icon",
title: "删除", title: "删除",
oprate: 'delete', oprate: 'delete',
disable: params.row.status disable: params.row.status == 0 ? false : true
}, },
on: { on: {
click: () => this.remove(params.row.id) click: () => this.remove(params.row.id)
...@@ -357,7 +342,7 @@ export default { ...@@ -357,7 +342,7 @@ 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.easySearch.planId.value = this.planIdsCur this.easySearch.planId.value = this.planIdsCur
...@@ -407,7 +392,7 @@ export default { ...@@ -407,7 +392,7 @@ export default {
}) })
}, },
cancel() { cancel() {
this.curId = 0; this.curId = '';
this.modal = false this.modal = false
}, },
onHide() { onHide() {
...@@ -475,8 +460,9 @@ export default { ...@@ -475,8 +460,9 @@ export default {
this.detail = () => import('../record') this.detail = () => import('../record')
this.modal = true; this.modal = true;
}, },
addRecord(id) { addRecord(row) {
this.curId = id; this.curId = row.id;
this.rowObj = row
this.title = "新增记录"; this.title = "新增记录";
this.fullScreen = false; this.fullScreen = false;
this.detail = () => import('../record/add') this.detail = () => import('../record/add')
......
<template>
<Form ref="form" :model="entity" :rules="rules" :label-width="90">
<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"
><FormItem :label="l('title')" prop="title">
<Input v-model="entity.title"> </Input> </FormItem
></Col>
<Col :span="24"
><FormItem :label="l('note')" prop="note">
<Input
v-model="entity.note"
type="textarea"
:rows="5"
></Input> </FormItem
></Col>
<Col :span="12"
><FormItem :label="l('template')" prop="template">
<Input v-model="entity.template"> </Input> </FormItem
></Col>
<Col :span="12"
><FormItem :label="l('attachment')" prop="attachment">
<Input v-model="entity.attachment"> </Input> </FormItem
></Col>
<Col :span="12"
><FormItem :label="l('type')" prop="type">
<Dictionary code="project.task.level" v-model="entity.type"></Dictionary>
<!-- <Dictionary
code="mes.project_template.Type"
v-model="entity.type"
></Dictionary> -->
</FormItem >
</Col>
</Row>
<FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled"
>保存</Button
>
<Button @click="handleClose" class="ml20">取消</Button>
</FormItem>
</Form>
</template>
<script>
import Api from "./api";
export default {
name: "Add",
data() {
return {
disabled: false,
entity: {
creationTime: null,
creatorUserId: null,
lastModificationTime: null,
lastModifierUserId: null,
isDeleted: null,
deletionTime: null,
deleterUserId: null,
title: "",
note: "",
template: "",
attachment: "",
type: null,
},
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }],
},
};
},
props: {
v: Object,
eid: String,
},
mounted() {
if (this.eid ) {
this.load(this.eid);
}
},
methods: {
handleSubmit() {
this.$refs.form.validate((v) => {
if (v) {
this.disabled = true;
Api.create(this.entity)
.then((r) => {
this.disabled = false;
if (r.success) {
this.$Message.success("保存成功");
this.$emit("on-ok");
} else {
this.$Message.error("保存失败");
}
})
.catch((err) => {
this.disabled = false;
this.$Message.error("保存失败");
console.warn(err);
});
}
});
},
handleClose() {
this.$emit("on-close");
},
load(v) {
Api.get({ id: v }).then((r) => {
this.entity = r.result;
this.entity.id = 0;
});
},
l(key) {
key = "project_template" + "." + key;
return this.$t(key);
},
},
watch: {
v() {
this.entity = this.$u.clone(this.v);
},
eid(v) {
if (v !="") {
this.load(v);
}
},
},
};
</script>
\ No newline at end of file
import Api from '@/plugins/request'
export default {
index: `${material}/projecttemplate/paged`,
paged(params) {
return Api.post(`${material}/projecttemplate/paged`, params);
},
get(params) {
return Api.get(`${material}/projecttemplate/get`, params);
},
create(params) {
return Api.post(`${material}/projecttemplate/create`, params);
},
update(params) {
return Api.post(`${material}/projecttemplate/update`, params);
},
delete(id) {
return Api.delete(`${material}/projecttemplate/delete`, { params: { id: id } });
},
deletes(params) {
return Api.post(`${material}/projecttemplate/batchdelete`, params);
}
}
\ No newline at end of file
<template>
<div class="detail">
<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('title')">{{ entity.title }}</Filed>
<Filed :span="12" :name="l('template')">{{ entity.template }}</Filed>
<Filed :span="12" :name="l('attachment')">{{ entity.attachment }}</Filed>
<Filed :span="12" :name="l('type')">{{ entity.type }}</Filed>
<Filed :span="24" :name="l('note')">{{ entity.note }}</Filed>
</Row>
</div>
</template>
<script>
import Api from "./api";
export default {
name: "Add",
data() {
return {
entity: {},
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }],
code: [{ required: true, message: "必填", trigger: "blur" }],
},
};
},
props: {
eid: String,
},
mounted() {
if (this.eid ) {
this.load(this.eid);
}
},
methods: {
load(v) {
Api.get({ id: v }).then((r) => {
this.entity = r.result;
this.$emit("on-load");
});
},
handleClose() {
this.$emit("on-close");
},
l(key) {
key = "project_template" + "." + key;
return this.$t(key);
},
},
watch: {
eid(v) {
if (v !="") {
this.load(v);
}
},
},
};
</script>
\ No newline at end of file
<template>
<Form ref="form" :model="entity" :rules="rules" :label-width="90">
<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"
><FormItem :label="l('title')" prop="title">
<Input v-model="entity.title"> </Input> </FormItem
></Col>
<Col :span="24"
><FormItem :label="l('note')" prop="note">
<Input
v-model="entity.note"
type="textarea"
:rows="5"
></Input> </FormItem
></Col>
<Col :span="12"
><FormItem :label="l('template')" prop="template">
<Input v-model="entity.template"> </Input> </FormItem
></Col>
<Col :span="12"
><FormItem :label="l('attachment')" prop="attachment">
<Input v-model="entity.attachment"> </Input> </FormItem
></Col>
<Col :span="12"
><FormItem :label="l('type')" prop="type">
<!-- code="mes.project_template.Type" -->
<Dictionary
code="project.task.level"
v-model="entity.type"
></Dictionary> </FormItem
></Col>
</Row>
<FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled" >保存</Button >
<Button @click="handleClose" class="ml20">取消</Button>
</FormItem>
</Form>
</template>
<script>
import Api from "./api";
export default {
name: "Edit",
data() {
return {
disabled: false,
entity: {},
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }],
},
};
},
props: {
eid: String,
},
mounted() {
if (this.eid) {
this.load(this.eid);
}
},
methods: {
load(v) {
Api.get({ id: v }).then((r) => {
this.entity = r.result;
});
},
handleSubmit() {
this.$refs.form.validate((v) => {
if (v) {
this.disabled = true;
Api.update(this.entity)
.then((r) => {
this.disabled = false;
if (r.success) {
this.$Message.success("保存成功");
this.$emit("on-ok");
} else {
this.$Message.error("保存失败");
}
})
.catch((err) => {
this.disabled = false;
this.$Message.error("保存失败");
console.warn(err);
});
}
});
},
handleClose() {
this.$emit("on-close");
},
l(key) {
key = "project_template" + "." + key;
return this.$t(key);
},
},
watch: {
eid(v) {
if (v != "") {
this.load(v);
}
},
},
};
</script>
\ No newline at end of file
<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>
<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_template 10/29/2020 5:40:26 PM",
},
data() {
return {
action: Api.index,
easySearch: {
keys: { op: "title", value: null },
},
modal: false,
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: "title",
title: this.l("title"),
align: "left",
easy: true,
high: true,
},
{
key: "attachment",
title: this.l("attachment"),
align: "left",
high: true,
},
{
key: "type",
title: this.l("type"),
align: "left",
high: true,
code:"project.task.level"
// code: "mes.project_template.Type",
},
{
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) },
},
"删除"
),
]);
},
},
],
};
},
mounted() {
console.log(this);
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: {
ok() {
this.$refs.grid.load();
this.modal = false;
this.curId = "";
},
search() {
this.$refs.grid.reload(this.easySearch);
},
add() {
this.curId = "";
this.title = "新增";
this.detail = () => import("./add");
this.modal = true;
},
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.$refs.grid.load();
this.$Message.success("删除成功");
}
});
},
cancel() {
this.curId = 0;
this.modal = false;
},
l(key) {
/*
project_template:{
creationTime:'创建时间',
creatorUserId:'创建人',
lastModificationTime:'更新时间',
lastModifierUserId:'更新人',
isDeleted:'删除人',
deletionTime:'删除时间',
deleterUserId:'删除人',
title:'标题',
note:'请注意',
template:'模板',
attachment:'附件',
type:'模版类型',
}
*/
let vkey = "project_template" + "." + key;
return this.$t(vkey) || key;
},
},
};
</script>
<style lang="less">
</style>
\ No newline at end of file
<template>
<Form ref="form" :model="condition" :label-width="90">
<Row>
<Col :span="12" :v-if="condition.id.show"
><FormItem :label="$t('id')" prop="id">
<Input v-model="condition.id.value"> </Input> </FormItem
></Col>
<Col :span="12" :v-if="condition.creationTime.show"
><FormItem :label="l('creationTime')" prop="creationTime">
<DatePicker
type="daterange"
v-model="condition.creationTime.value"
></DatePicker> </FormItem
></Col>
<Col :span="12" :v-if="condition.creatorUserId.show"
><FormItem :label="l('creatorUserId')" prop="creatorUserId">
<Input v-model="condition.creatorUserId.value"> </Input> </FormItem
></Col>
<Col :span="12" :v-if="condition.lastModificationTime.show"
><FormItem
:label="l('lastModificationTime')"
prop="lastModificationTime"
>
<DatePicker
type="daterange"
v-model="condition.lastModificationTime.value"
></DatePicker> </FormItem
></Col>
<Col :span="12" :v-if="condition.lastModifierUserId.show"
><FormItem :label="l('lastModifierUserId')" prop="lastModifierUserId">
<Input v-model="condition.lastModifierUserId.value">
</Input> </FormItem
></Col>
<Col :span="12" :v-if="condition.deletionTime.show"
><FormItem :label="l('deletionTime')" prop="deletionTime">
<DatePicker
type="daterange"
v-model="condition.deletionTime.value"
></DatePicker> </FormItem
></Col>
<Col :span="12" :v-if="condition.title.show"
><FormItem :label="l('title')" prop="title">
<Input v-model="condition.title.value"> </Input> </FormItem
></Col>
<Col :span="24" :v-if="condition.note.show"
><FormItem :label="l('note')" prop="note">
<Input v-model="condition.note.value"> </Input> </FormItem
></Col>
<Col :span="12" :v-if="condition.attachment.show"
><FormItem :label="l('attachment')" prop="attachment">
<Input v-model="condition.attachment.value"> </Input> </FormItem
></Col>
<Col :span="12" :v-if="condition.type.show"
><FormItem :label="l('type')" prop="type">
<Dictionary
code="mes.project_template.Type"
v-model="condition.type.value"
></Dictionary> </FormItem
></Col>
</Row>
</Form>
</template>
<script>
import Api from "./api";
export default {
name: "Add",
data() {
return {
condition: {
id: { op: "Equal", value: null, show: true },
creationTime: { op: "Range", value: null, show: true },
creatorUserId: { op: "Equal", value: null, show: true },
lastModificationTime: { op: "Range", value: null, show: true },
lastModifierUserId: { op: "Equal", value: null, show: true },
deletionTime: { op: "Range", value: null, show: true },
title: { op: "Equal", value: null, show: true },
note: { op: "Equal", value: null, show: true },
attachment: { op: "Equal", value: null, show: true },
type: { op: "Equal", value: null, show: true },
},
};
},
methods: {
handleClose() {
this.$emit("on-close");
},
l(key) {
key = "project_template" + "." + key;
return this.$t(key);
},
},
};
</script>
\ No newline at end of file
...@@ -76,7 +76,7 @@ import InputCode from '@/components/page/inputCode.vue' ...@@ -76,7 +76,7 @@ import InputCode from '@/components/page/inputCode.vue'
import Pictrue from '@/components/page/pictrue.vue' import Pictrue from '@/components/page/pictrue.vue'
import WordTree from '@/components/page/wordTree.vue' import WordTree from '@/components/page/wordTree.vue'
import Actions from '@/components/page/actions.vue' import Actions from '@/components/page/actions.vue'
import DateDRange from '@/components/page/dateRange.vue' import DateRange from '@/components/page/dateRange.vue'
import FilesViewer from '@/components/page/filesViewer.vue' import FilesViewer from '@/components/page/filesViewer.vue'
...@@ -158,7 +158,7 @@ Vue.component("InputCode", InputCode) ...@@ -158,7 +158,7 @@ Vue.component("InputCode", InputCode)
Vue.component("Pictrue", Pictrue) Vue.component("Pictrue", Pictrue)
Vue.component("WordTree", WordTree) Vue.component("WordTree", WordTree)
Vue.component("Actions", Actions) Vue.component("Actions", Actions)
Vue.component("DateDRange", DateDRange) Vue.component("DateRange", DateRange)
Vue.component("Life", Life) Vue.component("Life", Life)
Vue.component("FilesViewer",FilesViewer) Vue.component("FilesViewer",FilesViewer)
......
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