Commit af48d377 authored by renjintao's avatar renjintao

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

parents c57ca226 2297d1bc
......@@ -302,10 +302,10 @@ export default {
};
},
created() {
this.initColumns();
},
mounted() {
this.initColumns();
if (this.data && this.data.length > 0) {
this.list = this.data;
return;
......@@ -367,24 +367,24 @@ export default {
});
var items=this.$u.clone(this.columns);
var soct=this.$scopedSlots;
console.warn("that.$scopedSlots()",soct["action"]());
items.forEach((u) => {
if (u.slot) {
u.render = (h, params) => {
return h(
"span",
// soct[u.slot]({
// row: params.row,
// column: params.column,
// index: params.index,
// })
params.row.id
);
};
delete u.slot;
}
});
// var soct=this.$scopedSlots;
// // console.warn("that.$scopedSlots()",soct["action"]());
// items.forEach((u) => {
// if (u.slot) {
// u.render = (h, params) => {
// return h(
// "span",
// // soct[u.slot]({
// // row: params.row,
// // column: params.column,
// // index: params.index,
// // })
// params.row.id
// );
// };
// delete u.slot;
// }
// });
this.columnsCur = items;
console.log("cur", items,this.columnsCur);
},
......
......@@ -98,8 +98,8 @@ export default {
action: '操作',
creationTime: '操作时间',
libraryTube: '操作人',
routingDetail:'工序名称',
routingDetailNo:'工序号'
routingDetail: '工序名称',
routingDetailNo: '工序号'
},
MaterialPowder: {
code: '粉末编码',
......@@ -435,11 +435,11 @@ export default {
cityName: '省市县',
creationTime: '创建时间',
upMent: '上级部门',
code:'部门编号',
location:'省市县',
parent_Id:'上级部门',
property:'属性',
parentTitle:'上级部门'
code: '部门编号',
location: '省市县',
parent_Id: '上级部门',
property: '属性',
parentTitle: '上级部门'
},
instance: {
id: '主键',
......@@ -1437,19 +1437,19 @@ export default {
executive_branch: '执行部门',
},
remind:{//工艺提醒,工艺案例
remind: { //工艺提醒,工艺案例
title: '名称',
creator: '创建人',
creationTime:'创建时间',
creationTime: '创建时间',
content: '内容',
filePath: "上传文件", //文件路径
filePaths: "", //多个文件路径
dispatchId: '工单id',
routingDetailId: '工序id',
routingDetail:'工序',
routingDetail: '工序',
routingHeaderId: '工艺规程id',
type: '类型(1工艺案例,2工艺提醒)',
status:'状态',
status: '状态',
},
product_info: {
......@@ -1475,7 +1475,7 @@ export default {
version: "版本"
},
order_list: {
Id:'工单Id',
Id: '工单Id',
mesCode: '订单编号',
status: '工单状态',
statusOrder: '订单状态',
......@@ -1682,144 +1682,163 @@ export default {
storeId: '库位id',
storeTitle: '库位名称',
stockCode: '物料序号',
count1:"可申请数",
count2:"申请数",
count3:"已领用数/出库数",
count4:"领用",
applicationNumber:"申请数"
count1: "可申请数",
count2: "申请数",
count3: "已领用数/出库数",
count4: "领用",
applicationNumber: "申请数"
},
//导入中心
import_center:{
creationTime:'创建时间',
creatorUserId:'创建人',
lastModificationTime:'更新时间',
lastModifierUserId:'更新人',
isDeleted:'是否删除',
deletionTime:'删除时间',
deleterUserId:'删除人',
creator:'上传人',
lastModifier:'更新人名',
name:'名称',
file:'文件',
status:'状态',
remark:'备注',
import_center: {
creationTime: '创建时间',
creatorUserId: '创建人',
lastModificationTime: '更新时间',
lastModifierUserId: '更新人',
isDeleted: '是否删除',
deletionTime: '删除时间',
deleterUserId: '删除人',
creator: '上传人',
lastModifier: '更新人名',
name: '名称',
file: '文件',
status: '状态',
remark: '备注',
},
UserMessage:{
title:'标题',
creationTime:'接受时间',
content:'内容',
senderId:'发送人',
receiverId:'接受人',
status:'状态',
messageType:'类别',
content:'内容',
UserMessage: {
title: '标题',
creationTime: '接受时间',
content: '内容',
senderId: '发送人',
receiverId: '接受人',
status: '状态',
messageType: '类别',
content: '内容',
},
//文档分类
document_category:{
creationTime:'创建时间',
creatorUserId:'创建人',
lastModificationTime:'更新时间',
lastModifierUserId:'更新人',
isDeleted:'删除人',
deletionTime:'删除时间',
deleterUserId:'删除人',
name:'分类名称',
upId:'上级id',
level:'层级',
totalDocument:'分类下总文档数',
tenantId:'租户id',
type:'类别',
englishFullName:'英文全称',
englishName:'英文简称',
status:'',
inheritCategoryId:'继承', //继承分类id
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:'',
template: '模板Id', //模板路径
templateId: '选择模板',
status: '状态',
workFlows: '选择流程',
workFlowIds: '流程Id',
description: '备注'
},
project_main:{
creationTime:'创建时间',
creatorUserId:'创建人',
lastModificationTime:'更新时间',
lastModifierUserId:'更新人',
isDeleted:'删除人',
deletionTime:'删除时间',
deleterUserId:'删除人',
title:'标题',
note:'备注',
state:'状态',
type:'分类',
picture:'图片',
attachment:'附件',
phase:'阶段',
startDate:'开始日期',
endDate:'结束日期',
businessUnits:'业务单位',
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: '业务单位',
}
}
<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('projectId')" prop="projectId">
<InputNumber v-model="entity.projectId"></InputNumber> </FormItem
></Col>
<Col :span="12"
><FormItem :label="l('upId')" prop="upId">
<InputNumber v-model="entity.upId"></InputNumber> </FormItem
></Col> -->
<Col :span="12"
><FormItem :label="l('title')" prop="title">
<Input v-model="entity.title"> </Input> </FormItem
></Col>
<Col :span="12"
><FormItem :label="l('status')" prop="status">
<Dictionary
code="mes.project_plan.Status"
v-model="entity.status"
></Dictionary> </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('startDate')" prop="startDate">
<DatePicker
type="date"
v-model="entity.startDate"
></DatePicker> </FormItem
></Col>
<Col :span="12"
><FormItem :label="l('endDate')" prop="endDate">
<DatePicker
type="date"
v-model="entity.endDate"
></DatePicker> </FormItem
></Col>
<Col :span="12"
><FormItem :label="l('type')" prop="type">
<Dictionary
code="mes.project_plan.Type"
v-model="entity.type"
></Dictionary> </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('executor')" prop="executor">
<Input v-model="entity.executor"> </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,
projectId: "33930562-a9f7-bd95-88ab-d01eb1c4c369",
upId: "33930562-a9f7-bd95-88ab-d01eb1c4c369",
title: "",
status: 0,
note: "",
startDate: null,
endDate: null,
type: 0,
attachment: "",
executor: "",
},
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_plan" + "." + 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}proje/ctplan/paged`,
paged(params) {
return Api.post(`${material}/projectplan/paged`, params);
},
list(params) {
return Api.post(`${material}/projectplan/list`, params);
},
get(params) {
return Api.get(`${material}/projectplan/get`, params);
},
create(params) {
return Api.post(`${material}/projectplan/create`, params);
},
update(params) {
return Api.post(`${material}/projectplan/update`, params);
},
delete(id) {
return Api.delete(`${material}/projectplan/delete`, {
params: {
id: id
}
});
},
deletes(params) {
return Api.post(`${material}/projectplan/batchdelete`, params);
}
}
<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('projectId')">{{entity.projectId}}</Filed>
<Filed :span="12" :name="l('upId')">{{entity.upId}}</Filed>
<Filed :span="12" :name="l('title')">{{entity.title}}</Filed>
<Filed :span="12" :name="l('status')">{{entity.status}}</Filed>
<Filed :span="24" :name="l('note')">{{entity.note}}</Filed>
<Filed :span="12" :name="l('startDate')">{{entity.startDate}}</Filed>
<Filed :span="12" :name="l('endDate')">{{entity.endDate}}</Filed>
<Filed :span="12" :name="l('type')">{{entity.type}}</Filed>
<Filed :span="12" :name="l('attachment')">{{entity.attachment}}</Filed>
<Filed :span="12" :name="l('executor')">{{entity.executor}}</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: Number
},
mounted() {
if (this.eid > 0) {
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_plan" + "." + key;
return this.$t(key)
}
},
watch: {
eid(v) {
if (v > 0) {
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('projectId')" prop="projectId"> <InputNumber v-model="entity.projectId"></InputNumber>
</FormItem></Col>
<Col :span="12"><FormItem :label="l('upId')" prop="upId"> <InputNumber v-model="entity.upId"></InputNumber>
</FormItem></Col>
<Col :span="12"><FormItem :label="l('title')" prop="title"> <Input v-model="entity.title"> </Input>
</FormItem></Col>
<Col :span="12"><FormItem :label="l('status')" prop="status"> <Dictionary code="mes.project_plan.Status" v-model="entity.status"></Dictionary>
</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('startDate')" prop="startDate"> <DatePicker type="date" v-model="entity.startDate"></DatePicker>
</FormItem></Col>
<Col :span="12"><FormItem :label="l('endDate')" prop="endDate"> <DatePicker type="date" v-model="entity.endDate"></DatePicker>
</FormItem></Col>
<Col :span="12"><FormItem :label="l('type')" prop="type"> <Dictionary code="mes.project_plan.Type" v-model="entity.type"></Dictionary>
</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('executor')" prop="executor"> <Input v-model="entity.executor"> </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: Number
},
mounted() {
if (this.eid > 0) {
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_plan" + "." + key;
return this.$t(key)
}
},
watch: {
eid(v) {
if (v != 0) {
this.load(v);
}
}
}
}
</script>
\ No newline at end of file
<template>
<div>
<Card class="mb20">
<p slot="extra">
<Icon type="ios-arrow-down" />
</p>
项目信息
</Card>
<Card>
<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">
<Search />
</template>
<template slot="buttons">
<Button type="primary" @click="add">新增</Button>
</template>
</TreeGrid>
</Card>
<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_plan 10/19/2020 10:23:07 AM",
},
data() {
return {
action: Api.index,
easySearch: {
keys: { op: "title", value: null },
},
modal: false,
title: "新增",
detail: null,
curId: 0,
list: [
],
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 },
{ type: "selection", width: 80, align: "center" },
{
title: "操作",
key: "action",
width: 150,
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) },
},
"删除"
),
]);
},
},
{
key: "type",
width:90,
title: this.l("type"),
align: "left",
high: true,
code: "mes.project_plan.Type",
},
{
key: "title",
title: this.l("title"),
align: "left",
tree: true,
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: "attachment",
// title: this.l("attachment"),
// align: "left",
// high: true,
// },
{
key: "executor",
title: this.l("executor"),
align: "left",
high: true,
},
],
};
},
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);
var params={
conditions:[]
}
Api.list(params).then(r=>{
})
},
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("./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
<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.projectId.show"><FormItem :label="l('projectId')" prop="projectId"> <Input v-model="condition.projectId.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.title.show"><FormItem :label="l('title')" prop="title"> <Input v-model="condition.title.value"> </Input>
</FormItem></Col>
<Col :span="12" :v-if="condition.status.show"><FormItem :label="l('status')" prop="status"> <Dictionary code="mes.project_plan.Status" v-model="condition.status.value"></Dictionary>
</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.startDate.show"><FormItem :label="l('startDate')" prop="startDate"> <DatePicker type="daterange" v-model="condition.startDate.value"></DatePicker>
</FormItem></Col>
<Col :span="12" :v-if="condition.endDate.show"><FormItem :label="l('endDate')" prop="endDate"> <DatePicker type="daterange" v-model="condition.endDate.value"></DatePicker>
</FormItem></Col>
<Col :span="12" :v-if="condition.type.show"><FormItem :label="l('type')" prop="type"> <Dictionary code="mes.project_plan.Type" v-model="condition.type.value"></Dictionary>
</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.executor.show"><FormItem :label="l('executor')" prop="executor"> <Input v-model="condition.executor.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},
projectId:{op:"Equal",value:null,show:true},
upId:{op:"Equal",value:null,show:true},
title:{op:"Equal",value:null,show:true},
status:{op:"Equal",value:null,show:true},
note:{op:"Equal",value:null,show:true},
startDate:{op:"Range",value:null,show:true},
endDate:{op:"Range",value:null,show:true},
type:{op:"Equal",value:null,show:true},
attachment:{op:"Equal",value:null,show:true},
executor:{op:"Equal",value:null,show:true},
},
}
},
methods: {
handleClose() {
this.$emit('on-close')
},
l(key) {
key = "project_plan" + "." + key;
return this.$t(key)
}
}
}
</script>
\ No newline at end of file
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