Commit b323d925 authored by 骆瑛's avatar 骆瑛

修改样式项目管理

parent 16b2f89a
...@@ -1265,5 +1265,6 @@ export default { ...@@ -1265,5 +1265,6 @@ export default {
module: '模块', module: '模块',
version: '版本', version: '版本',
projectId: '项目id', projectId: '项目id',
systemName: "系统业务"
} }
} }
\ No newline at end of file
...@@ -57,7 +57,51 @@ ...@@ -57,7 +57,51 @@
<Icon :type="iconType" />{{ textUp }} <Icon :type="iconType" />{{ textUp }}
</div> </div>
</Row> </Row>
<Divider orientation="left">扩展属性</Divider> <Row style="margin-top: 10px">
<Tabs>
<TabPane label="实体定义" name="base"> </TabPane>
<TabPane
v-for="tab in content.dtos"
:key="tab.code"
:label="tab.name"
>
</TabPane>
<Button @click="modal1 = true" size="small" slot="extra"
>增加</Button
>
<Modal
v-model="modal1"
title="增加"
@on-ok="okModal('formline')"
@on-cancel="cancelModal('formline')"
>
<Form
:model="formline"
ref="formline"
:rules="ruleInline"
:label-width="80"
>
<p>
<FormItem label="名称:" prop="name">
<Input
v-model="formline.name"
placeholder="请输入名称"
></Input>
</FormItem>
</p>
<p>
<FormItem label="编码:" prop="code">
<Input
v-model="formline.code"
placeholder="请输入编码"
></Input>
</FormItem>
</p>
</Form>
</Modal>
</Tabs>
</Row>
<Row>
<Row style="margin-bottom: 10px" :gutter="10"> <Row style="margin-bottom: 10px" :gutter="10">
<Col :span="6"> <Col :span="6">
<AutoComplete <AutoComplete
...@@ -71,7 +115,9 @@ ...@@ -71,7 +115,9 @@
:value="option.name" :value="option.name"
:key="option.id" :key="option.id"
> >
<span class="demo-auto-complete-title">{{ option.name }}</span> <span class="demo-auto-complete-title">{{
option.name
}}</span>
<span class="demo-auto-complete-count" style="float: right">{{ <span class="demo-auto-complete-count" style="float: right">{{
option.code option.code
}}</span> }}</span>
...@@ -82,34 +128,20 @@ ...@@ -82,34 +128,20 @@
<Button type="primary" @click="importColumns">导入</Button> <Button type="primary" @click="importColumns">导入</Button>
</Col> </Col>
</Row> </Row>
<Table :columns="columns" :data="checkList" border> <Table
<template slot-scope="{ row, index }" slot="title"> :columns="columns1"
<div v-if="row.fieldType == 1 || row.fieldType == 2"> :data="checkList"
{{ row.title }} border
</div> :draggable="true"
@on-drag-drop="onDragDrop"
>
<template slot-scope="{ row, index }" slot="columnDescription">
<Input <Input
v-model="row.title" v-on:input='onIpnt(row, index)'
placeholder="请输入名称" v-model="row.columnDescription"
@on-blur="setRow(row, index)"
v-if="row.fieldType == 3"
/>
</template>
<template slot-scope="{ row, index }" slot="note">
<Select
v-if="row.dataType == 3"
v-model="row.note"
clearable
transfer
@on-change="setRow(row, index)" @on-change="setRow(row, index)"
> placeholder="请输入"
<Option />
v-for="item in codeList"
:value="item.code"
:key="item.code"
>{{ item.name }}</Option
>
</Select>
<span v-else>{{ row.note }}</span>
</template> </template>
<template slot-scope="{ row, index }" slot="dataType"> <template slot-scope="{ row, index }" slot="dataType">
<Dictionary <Dictionary
...@@ -121,31 +153,85 @@ ...@@ -121,31 +153,85 @@
:key="row.dataType" :key="row.dataType"
></Dictionary> ></Dictionary>
</template> </template>
<template slot-scope="{ row, index }" slot="unitName"> <template slot-scope="{ row, index }" slot="propertyName">
<Input
v-on:input='onIpnt(row, index)'
v-model="row.propertyName"
@on-change="setRow(row, index)"
placeholder="请输入"
/>
</template>
<template slot-scope="{ row, index }" slot="code">
<Input
@on-change="setRow(row, index)"
v-model="row.code"
:disabled="row.dataType != 3 && row.dataType != 10"
placeholder="请输入"
/>
</template>
<template slot-scope="{ row, index }" slot="isNullable">
<Checkbox
v-model="row.isNullable"
@on-change="setRow(row, index)"
></Checkbox>
</template>
<template slot-scope="{ row, index }" slot="unit">
<Dictionary <Dictionary
v-if="row.dataType == 1 || row.dataType == 2" :disabled="row.dataType != 1 && row.dataType != 2"
@on-change="setRow(row, index)" @on-change="setRow(row, index)"
v-model="row.unitName" v-model="row.unit"
code="material.main.unitName" code="materail.category.dataType"
type="select" type="select"
placeholder="请选择单位" :value="row.dataType"
:value="row.unitName" :key="row.dataType"
:key="row.unitName"
></Dictionary> ></Dictionary>
</template> </template>
<template slot-scope="{ row, index }" slot="required"> <template slot-scope="{ row, index }" slot="length">
<Checkbox <Input
v-model="row.required" v-model="row.length"
@on-change="setRow(row, index)" @on-change="setRow(row, index)"
></Checkbox> placeholder="请输入"
/>
</template>
<template slot-scope="{ row, index }" slot="link">
<Input
v-model="row.link"
@on-change="setRow(row, index)"
placeholder="请输入"
number
/>
</template>
<template slot-scope="{ row, index }" slot="systemName">
<div>
{{ row.systemName }}
</div>
<!-- <Dictionary
@on-change="setRow(row, index)"
v-model="row.systemName"
code="project.main.systemName"
type="select"
:value="row.systemName"
:key="row.systemName"
></Dictionary> -->
</template> </template>
<template slot-scope="{ row, index }" slot="isUnique"> <template slot-scope="{ row, index }" slot="list">
<Checkbox v-model="row.list" @on-change="setRow(row, index)">
</Checkbox>
</template>
<template slot-scope="{ row, index }" slot="add">
<Checkbox v-model="row.add" @on-change="setRow(row, index)">
</Checkbox>
</template>
<template slot-scope="{ row, index }" slot="uniqueness">
<Checkbox <Checkbox
v-model="row.isUnique" v-model="row.uniqueness"
@on-change="setRow(row, index)" @on-change="setRow(row, index)"
></Checkbox> ></Checkbox>
</template> </template>
<template slot-scope="{ row, index }" slot="defaultValue">
<Input v-model="row.defaultValue" placeholder="请输入" />
</template>
<template slot-scope="{ row, index }" slot="action"> <template slot-scope="{ row, index }" slot="action">
<a <a
@click="remove(index, row)" @click="remove(index, row)"
...@@ -155,14 +241,16 @@ ...@@ -155,14 +241,16 @@
> >
</template> </template>
</Table> </Table>
<Button type="dashed" long @click="addNew('{}')" class="mt10" <Button type="dashed" long @click="addNew(0, '{}')" class="mt10"
>新增属性</Button >新增属性</Button
> >
</Row>
</Col> </Col>
<Col :span="24" class="tr mt10"> <Col :span="24" class="tr mt10">
<FormItem> <FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled" <Button type="primary" @click="handleSubmit" :disabled="disabled"
>保存</Button > >保存</Button
>
<Button @click="handleClose" class="ml20">取消</Button> <Button @click="handleClose" class="ml20">取消</Button>
</FormItem> </FormItem>
</Col> </Col>
...@@ -175,6 +263,15 @@ export default { ...@@ -175,6 +263,15 @@ export default {
name: "Add", name: "Add",
data() { data() {
return { return {
formline: {
name: "",
code: "",
},
ruleInline: {
name: [{ required: true, message: "请输入名称", trigger: "blur" }],
code: [{ required: true, message: "请输入编码", trigger: "blur" }],
},
modal1: false,
iconType: "ios-arrow-up", iconType: "ios-arrow-up",
textUp: "收起", textUp: "收起",
upDrop: true, upDrop: true,
...@@ -182,118 +279,148 @@ export default { ...@@ -182,118 +279,148 @@ export default {
completeList: [], completeList: [],
codeList: [], codeList: [],
checkList: [ checkList: [
// {
// // mid: maxId + 1,
// // field: "c" + maxId,
// systemName: 0,
// columnDescription: "", // 中文名称
// dbColumnName: "", // 字段名称
// dataType: 0, // 数据库中字段类型
// propertyName: "", //程序中的字段名称
// propertyType: "", // 程序中的字段类型
// code: "", // 数据字典编码
// isNullable: false, // 是否可空
// isKey: false, // 是否主键
// unit: 0, // 单位
// length: 0, //
// decimalDigits: 0, // 精度
// link: 0, //外键 表的
// defaultValue: "", // 默认值
// control: 0,
// add: 0,
// uniqueness: 0, // 唯一性 0 不限制 1 表内唯一 2 表内某条件下唯一
// ruleType: "", // 邮箱 ,电话,等,
// busType: 0, // 0 系统字段 1 业务字段 2 自定义字段
// fieldType: 3,
// action: 1,
// add: 0 //新增标识
// }
],
columns1: [
{ {
field: "code", title: "序号",
title: "编号", type: "index",
note: "", width: 70,
dataType: 0, align: "center",
unitName: "",
required: false,
isunique: false,
fieldType: 1,
categoryId: 0,
action: 1,
add: 0, //新增标识
}, },
{ {
field: "version", title: "名称(*)",
title: "版本", align: "center",
note: "", key: "columnDescription",
dataType: 0, slot: "columnDescription",
unitName: "", width: 150,
required: true, renderHeader: (h, params) => {
isunique: false, return h("div", [
fieldType: 1, h("span", "名称("),
categoryId: 0, h("span", { style: { color: "red" } }, "*"),
action: 1, h("span", ")"),
add: 0, //新增标识 ]);
},
}, },
{ {
field: "secret", title: "类型",
title: "密级", key: "dataType",
note: "", align: "center",
dataType: 3, slot: "dataType",
unitName: "", width: 150,
required: true, high: true,
isunique: false,
fieldType: 1,
categoryId: 0,
action: 1,
add: 0, //新增标识
}, },
{ {
field: "name", title: "属性(*)",
title: "标题", align: "center",
note: "", key: "propertyName",
dataType: 0, slot: "propertyName",
unitName: "", high: false,
required: true, renderHeader: (h, params) => {
isunique: false, return h("div", [
fieldType: 1, //共有属性(不能删除) h("span", "属性("),
categoryId: 0, h("span", { style: { color: "red" } }, "*"),
action: 1, h("span", ")"),
add: 0, //新增标识 ]);
},
}, },
{ {
field: "description", title: "关联",
title: "文档详细说明", key: "code",
note: "", align: "center",
dataType: 8, slot: "code",
unitName: "",
required: true,
isunique: false,
fieldType: 1, //共有属性(不能删除)
categoryId: 0,
action: 1,
add: 0, //新增标识
}, },
],
columns: [
{ {
title: "序号", title: "单位",
type: "index", key: "unit",
width: 80,
align: "center", align: "center",
slot: "unit",
}, },
{ {
title: "属性名称", title: "长度",
key: "title", key: "length",
slot: "title", align: "center",
slot: "length",
}, },
{ {
title: "属性类型", title: "业务类型",
key: "dataType", key: "systemName",
align: "center", align: "center",
slot: "dataType", slot: "systemName",
width: 200, width: 190,
render: (h, params) => {
return h("div", [
h("span", {}, this.sysDist(params.row.systemName)),
]);
},
}, },
{ {
title: "设置", title: "是否可空",
key: "note", key: "isNullable",
align: "center", align: "center",
slot: "note", slot: "isNullable",
width: 100,
}, },
{ {
title: "单位", title: "业务设置",
key: "unitName", align: "center",
children: [
{
title: "列表",
key: "list",
align: "center", align: "center",
slot: "unitName", slot: "list",
width: "150", width: 70,
}, },
{ {
title: "必填", title: "新增",
key: "required", key: "add",
align: "center", align: "center",
slot: "required", slot: "add",
width: 80, width: 70,
}, },
{ {
title: "唯一", title: "唯一",
key: "isUnique", key: "uniqueness",
align: "center", align: "center",
slot: "isUnique", slot: "uniqueness",
width: 80, width: 70,
},
{
title: "默认值",
key: "defaultValue",
align: "center",
slot: "defaultValue",
},
],
}, },
{ {
width: 80, width: 80,
title: "操作", title: "操作",
...@@ -312,7 +439,6 @@ export default { ...@@ -312,7 +439,6 @@ export default {
englishName: "", englishName: "",
status: null, status: null,
description: "", description: "",
content: [],
inheritCategoryId: null, inheritCategoryId: null,
code: "", code: "",
module: "", module: "",
...@@ -323,6 +449,10 @@ export default { ...@@ -323,6 +449,10 @@ export default {
name: [{ required: true, message: "必填", trigger: "blur" }], name: [{ required: true, message: "必填", trigger: "blur" }],
code: [{ required: true, message: "必填", trigger: "blur" }], code: [{ required: true, message: "必填", trigger: "blur" }],
}, },
content: {
base: [],
dtos: [],
},
}; };
}, },
props: { props: {
...@@ -330,12 +460,43 @@ export default { ...@@ -330,12 +460,43 @@ export default {
eid: Number, eid: Number,
}, },
mounted() { mounted() {
this.seachChange();
if (this.eid > 0) { if (this.eid > 0) {
this.load(this.eid); this.load(this.eid);
this.seachChange();
} }
}, },
methods: { methods: {
sysDist(value) {
if (value == 0) {
return "系统";
} else if (value == 1) {
return "业务";
} else if (value == 2) {
return "扩展";
}
},
okModal(name) {
this.$refs[name].validate((valid) => {
if (valid) {
let obj = {
name: this.formline.name,
code: this.formline.code,
list: [],
};
this.content.dtos.push(obj);
console.log(this.content.dtos);
this.$refs[name].resetFields();
this.modal1 = false;
}
});
},
cancelModal(name) {
this.$refs[name].resetFields();
this.modal1 = false;
},
onDragDrop(a, b) {
this.checkList.splice(b, 0, ...this.checkList.splice(a, 1));
},
importColumns() { importColumns() {
//导入 //导入
let changeId = {}; let changeId = {};
...@@ -347,7 +508,7 @@ export default { ...@@ -347,7 +508,7 @@ export default {
this.completeValue = ""; this.completeValue = "";
} }
}); });
this.addNew(changeId); this.addNew(1, changeId);
} }
}, },
upClick(value) { upClick(value) {
...@@ -377,7 +538,7 @@ export default { ...@@ -377,7 +538,7 @@ export default {
//新增的删除,直接删 //新增的删除,直接删
this.checkList.splice(index, 1); this.checkList.splice(index, 1);
let objArr = { let objArr = {
name: row.title, name: row.columnDescription,
code: row.code, code: row.code,
id: row.id, id: row.id,
}; };
...@@ -389,71 +550,107 @@ export default { ...@@ -389,71 +550,107 @@ export default {
this.checkList.splice(index, 1); this.checkList.splice(index, 1);
} }
}, },
onIpnt(a,b){
console.log(a,b)
},
setRow(row, index) { setRow(row, index) {
// if (index >= 1) {
// console.log(this.checkList.length)
// for(var i=1;i<this.checkList.length;i++){
// if (this.checkList[0].columnDescription == this.checkList[i].columnDescription) {
// this.$Message.error("表格名称重复!");
// row.columnDescription = "";
// return;
// }
// if (this.checkList[0].propertyName == this.checkList[i].propertyName) {
// this.$Message.error("表格属性重复!");
// row.propertyName = "";
// return;
// }
// }
// }
if (row.dataType == 0 || row.dataType == 8) {
row.length = 50;
} else {
row.length = 0;
}
this.$set(this.checkList, index, row); this.$set(this.checkList, index, row);
}, },
addNew(e) { addNew(index, e) {
let id = "", let id = "",
code = "", code = "",
name = ""; name = "",
if (e == "{}") { flag = false;
id = ""; if (index == 0 && e == "{}") {
code = ""; this.checkList.forEach((s, index) => {
name = ""; if (s.columnDescription == "") {
} else { this.$Message.warning("请填写表格名称!");
return (flag = true);
}
if (s.propertyName == "") {
this.$Message.warning("请填写表格属性!");
return (flag = true);
}
});
if (flag == true) {
return;
}
} else if (index == 1 && JSON.stringify(e) != "{}") {
id = e.id; id = e.id;
code = e.code; code = e.code;
name = e.name; name = e.name;
} else {
this.$Message.warning("请选择导入字段!");
return;
} }
let maxId = 0; // let maxId = 0;
this.checkList.map((u) => { // this.checkList.map((u) => {
if (u.mid > maxId) { // if (u.mid > maxId) {
maxId = u.mid; // maxId = u.mid;
} // }
}); // });
let obj = { let obj = {
id: id, id: id,
code: code, code: code,
mid: maxId + 1, // mid: maxId + 1,
field: "c" + maxId, // field: "c" + maxId,
title: name, systemName: 0,
note: "", columnDescription: name,
unitName: "", defaultValue: "",
isNullable: false,
unit: 0,
link: 0,
dataType: 0, dataType: 0,
required: false, isKey: false, // 是否主键
isunique: false, length: 50,
propertyName: "", //程序中的字段名称
propertyType: "", // 程序中的字段类型
fieldType: 3, fieldType: 3,
categoryId: 0, // categoryId: 0,
action: 1, action: 1,
add: 0, //新增标识 add: 0, //新增标识
}; };
this.checkList.push(obj); this.checkList.push(obj);
}, },
handleSubmit() { handleSubmit() {
let keys = false;
let name = "";
this.checkList.forEach((s, index) => {
if (s.columnDescription == "") {
this.$Message.warning("请填写表格名称!");
return (keys = true);
}
if (s.propertyName == "") {
this.$Message.warning("请填写表格属性!");
return (keys = true);
}
});
if (keys == true) {
return;
}
this.$refs.form.validate((v) => { this.$refs.form.validate((v) => {
if (v) { if (v) {
this.disabled = true; this.disabled = true;
var data={
base:this.checkList,
dtos:[
{
name:"新增",
code:"Create",
list:[]
},
{
name:"编辑",
code:"Eidt",
list:[]
},
{
name:"列表",
code:"List",
list:[]
},
]
}
this.entity.content = JSON.stringify(this.checkList); this.entity.content = JSON.stringify(this.checkList);
Api.create(this.entity) Api.create(this.entity)
.then((r) => { .then((r) => {
...@@ -478,6 +675,7 @@ export default { ...@@ -478,6 +675,7 @@ export default {
load(v) { load(v) {
Api.get({ id: v }).then((r) => { Api.get({ id: v }).then((r) => {
this.entity = r.result; this.entity = r.result;
this.content.base = this.checkList;
this.entity.id = 0; this.entity.id = 0;
}); });
}, },
...@@ -511,4 +709,5 @@ export default { ...@@ -511,4 +709,5 @@ export default {
.textIcon:hover { .textIcon:hover {
opacity: 0.7; opacity: 0.7;
} }
</style>> </style
>>
...@@ -156,7 +156,7 @@ ...@@ -156,7 +156,7 @@
>删除</a> >删除</a>
</template> </template>
</Table> </Table>
<Button type="dashed" long @click="addNew('{}')" class="mt10" <Button type="dashed" long @click="addNew(0,'{}')" class="mt10"
>新增属性</Button >新增属性</Button
> >
</Col> </Col>
...@@ -266,7 +266,7 @@ export default { ...@@ -266,7 +266,7 @@ export default {
this.completeValue = ""; this.completeValue = "";
} }
}); });
this.addNew(changeId); this.addNew(1,changeId);
} }
}, },
upClick(value) { upClick(value) {
...@@ -314,18 +314,21 @@ export default { ...@@ -314,18 +314,21 @@ export default {
setRow(row, index) { setRow(row, index) {
this.$set(this.checkList, index, row); this.$set(this.checkList, index, row);
}, },
addNew(e) { addNew(index,e) {
let id = "", let id = "",
code = "", code = "",
name = ""; name = "";
if (e == "{}") { if (index == 0 && e=='{}') {
id = ""; id = "";
code = ""; code = "";
name = ""; name = "";
} else { } else if(index == 1 && JSON.stringify(e)!='{}'){
id = e.id; id = e.id;
code = e.code; code = e.code;
name = e.name; name = e.name;
}else{
this.$Message.warning("请选择导入字段!");
return;
} }
let maxId = 0; let maxId = 0;
this.checkList.map((u) => { this.checkList.map((u) => {
......
...@@ -21,7 +21,8 @@ ...@@ -21,7 +21,8 @@
<Button type="primary" @click="add">新增</Button> <Button type="primary" @click="add">新增</Button>
</template> </template>
</DataGrid> </DataGrid>
<Modal v-model="modal" :title="title" width="1200" footer-hide> <!-- fullscreen -->
<Modal v-model="modal" :title="title" width="1200" footer-hide fullscreen >
<component :is="detail" :eid="curId" @on-close="cancel" @on-ok="ok" /> <component :is="detail" :eid="curId" @on-close="cancel" @on-ok="ok" />
</Modal> </Modal>
</div> </div>
......
<template> <template>
<Form ref="form" :model="entity" :rules="rules" :label-width="90"> <Form ref="form" :model="entity" :rules="rules" :label-width="90">
<Row> <Row>
<!-- <Col :span="12"
><FormItem :label="l('creationTime')" prop="creationTime">
<DatePicker
type="date"
v-model="entity.creationTime"
></DatePicker> </FormItem
></Col>
<Col :span="12"
><FormItem :label="l('creatorUserId')" prop="creatorUserId">
<InputNumber v-model="entity.creatorUserId"></InputNumber> </FormItem
></Col>
<Col :span="12"
><FormItem
:label="l('lastModificationTime')"
prop="lastModificationTime"
>
<DatePicker
type="date"
v-model="entity.lastModificationTime"
></DatePicker> </FormItem
></Col>
<Col :span="12"
><FormItem :label="l('lastModifierUserId')" prop="lastModifierUserId">
<InputNumber
v-model="entity.lastModifierUserId"
></InputNumber> </FormItem
></Col>
<Col :span="12"
><FormItem :label="l('isDeleted')" prop="isDeleted">
<InputNumber v-model="entity.isDeleted"></InputNumber> </FormItem
></Col>
<Col :span="12"
><FormItem :label="l('deletionTime')" prop="deletionTime">
<DatePicker
type="date"
v-model="entity.deletionTime"
></DatePicker> </FormItem
></Col>
<Col :span="12"
><FormItem :label="l('deleterUserId')" prop="deleterUserId">
<InputNumber v-model="entity.deleterUserId"></InputNumber> </FormItem
></Col> -->
<Col :span="12" <Col :span="12"
><FormItem :label="l('name')" prop="name"> ><FormItem :label="l('name')" prop="name">
<Input v-model="entity.name"> </Input> </FormItem <Input v-model="entity.name"> </Input> </FormItem
></Col> ></Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('code')" prop="code"> <FormItem :label="l('code')" prop="code">
<Input v-model="entity.code"> </Input> </FormItem <Input v-model="entity.code"> </Input> </FormItem>
>
</Col> </Col>
<Col :span="12"> <Col :span="12">
<!-- <FormItem :label="l('type')" prop="type">
<Input v-model="entity.type"> </Input> </FormItem
> -->
<FormItem :label="l('type')" prop="type"> <FormItem :label="l('type')" prop="type">
<Dictionary code="base.project.type" v-model="entity.type" ></Dictionary> <Dictionary code="base.project.type" v-model="entity.type" ></Dictionary>
</FormItem> </FormItem>
</Col> </Col>
<!-- <Col :span="12"
><FormItem :label="l('level')" prop="level">
<Input v-model="entity.level"> </Input> </FormItem
></Col> -->
<Col :span="12" <Col :span="12"
><FormItem :label="l('englishFullName')" prop="englishFullName"> ><FormItem :label="l('englishFullName')" prop="englishFullName">
<Input v-model="entity.englishFullName"> </Input> </FormItem <Input v-model="entity.englishFullName"> </Input> </FormItem
...@@ -74,9 +23,6 @@ ...@@ -74,9 +23,6 @@
<Input v-model="entity.englishName"> </Input> </FormItem <Input v-model="entity.englishName"> </Input> </FormItem
></Col> ></Col>
<Col :span="12"> <Col :span="12">
<!-- <FormItem :label="l('status')" prop="status">
<Input v-model="entity.status"> </Input> </FormItem
> -->
<FormItem :label="l('status')" prop="status"> <FormItem :label="l('status')" prop="status">
<Dictionary code="base.project.status" v-model="entity.status" ></Dictionary> <Dictionary code="base.project.status" v-model="entity.status" ></Dictionary>
</FormItem> </FormItem>
...@@ -85,22 +31,6 @@ ...@@ -85,22 +31,6 @@
><FormItem :label="l('module')" prop="module"> ><FormItem :label="l('module')" prop="module">
<Input v-model="entity.module"> </Input> </FormItem <Input v-model="entity.module"> </Input> </FormItem
></Col> ></Col>
<!-- <Col :span="12"
><FormItem :label="l('upId')" prop="upId">
<InputNumber v-model="entity.upId"></InputNumber> </FormItem
></Col> -->
<!--
<Col :span="12"
><FormItem :label="l('tenantId')" prop="tenantId">
<InputNumber v-model="entity.tenantId"></InputNumber> </FormItem
></Col> -->
<!-- <Col :span="12"
><FormItem :label="l('inheritCategoryId')" prop="inheritCategoryId">
<InputNumber
v-model="entity.inheritCategoryId"
></InputNumber> </FormItem
></Col> -->
<Col :span="24" <Col :span="24"
><FormItem :label="l('description')" prop="description"> ><FormItem :label="l('description')" prop="description">
<Input <Input
...@@ -111,9 +41,7 @@ ...@@ -111,9 +41,7 @@
></Col> ></Col>
</Row> </Row>
<FormItem> <FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled" <Button type="primary" @click="handleSubmit" :disabled="disabled" >保存</Button >
>保存</Button
>
<Button @click="handleClose" class="ml20">取消</Button> <Button @click="handleClose" class="ml20">取消</Button>
</FormItem> </FormItem>
</Form> </Form>
...@@ -126,13 +54,6 @@ export default { ...@@ -126,13 +54,6 @@ export default {
return { return {
disabled: false, disabled: false,
entity: { entity: {
// creationTime: null,
// creatorUserId: null,
// lastModificationTime: null,
// lastModifierUserId: null,
// isDeleted: null,
// deletionTime: null,
// deleterUserId: null,
name: "", name: "",
upId: this.eid, upId: this.eid,
level: null, level: null,
......
<template> <template>
<Form ref="form" :model="entity" :rules="rules" :label-width="90"> <Form ref="form" :model="entity" :rules="rules" :label-width="90">
<Row> <Row>
<!-- <Col :span="12"
><FormItem :label="l('creationTime')" prop="creationTime">
<DatePicker
type="date"
v-model="entity.creationTime"
></DatePicker> </FormItem
></Col>
<Col :span="12"
><FormItem :label="l('creatorUserId')" prop="creatorUserId">
<InputNumber v-model="entity.creatorUserId"></InputNumber> </FormItem
></Col>
<Col :span="12"
><FormItem
:label="l('lastModificationTime')"
prop="lastModificationTime"
>
<DatePicker
type="date"
v-model="entity.lastModificationTime"
></DatePicker> </FormItem
></Col>
<Col :span="12"
><FormItem :label="l('lastModifierUserId')" prop="lastModifierUserId">
<InputNumber
v-model="entity.lastModifierUserId"
></InputNumber> </FormItem
></Col>
<Col :span="12"
><FormItem :label="l('isDeleted')" prop="isDeleted">
<InputNumber v-model="entity.isDeleted"></InputNumber> </FormItem
></Col>
<Col :span="12"
><FormItem :label="l('deletionTime')" prop="deletionTime">
<DatePicker
type="date"
v-model="entity.deletionTime"
></DatePicker> </FormItem
></Col>
<Col :span="12"
><FormItem :label="l('deleterUserId')" prop="deleterUserId">
<InputNumber v-model="entity.deleterUserId"></InputNumber> </FormItem
></Col> -->
<Col :span="12" <Col :span="12"
><FormItem :label="l('name')" prop="name"> ><FormItem :label="l('name')" prop="name">
<Input v-model="entity.name"> </Input> </FormItem <Input v-model="entity.name"> </Input> </FormItem
...@@ -53,13 +11,12 @@ ...@@ -53,13 +11,12 @@
></Col> ></Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('type')" prop="type"> <FormItem :label="l('type')" prop="type">
<Dictionary code="base.project.type" v-model="entity.type" ></Dictionary> <Dictionary
code="base.project.type"
v-model="entity.type"
></Dictionary>
</FormItem> </FormItem>
</Col> </Col>
<!-- <Col :span="12"
><FormItem :label="l('level')" prop="level">
<Input v-model="entity.level"> </Input> </FormItem
></Col> -->
<Col :span="12" <Col :span="12"
><FormItem :label="l('englishFullName')" prop="englishFullName"> ><FormItem :label="l('englishFullName')" prop="englishFullName">
<Input v-model="entity.englishFullName"> </Input> </FormItem <Input v-model="entity.englishFullName"> </Input> </FormItem
...@@ -68,32 +25,18 @@ ...@@ -68,32 +25,18 @@
><FormItem :label="l('englishName')" prop="englishName"> ><FormItem :label="l('englishName')" prop="englishName">
<Input v-model="entity.englishName"> </Input> </FormItem <Input v-model="entity.englishName"> </Input> </FormItem
></Col> ></Col>
<Col :span="12" <Col :span="12">
>
<FormItem :label="l('status')" prop="status"> <FormItem :label="l('status')" prop="status">
<Dictionary code="base.project.status" v-model="entity.status" ></Dictionary> <Dictionary
code="base.project.status"
v-model="entity.status"
></Dictionary>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12" <Col :span="12"
><FormItem :label="l('module')" prop="module"> ><FormItem :label="l('module')" prop="module">
<Input v-model="entity.module"> </Input> </FormItem <Input v-model="entity.module"> </Input> </FormItem
></Col> ></Col>
<!-- <Col :span="12"
><FormItem :label="l('upId')" prop="upId">
<InputNumber v-model="entity.upId"></InputNumber> </FormItem
></Col>
<Col :span="12"
><FormItem :label="l('tenantId')" prop="tenantId">
<InputNumber v-model="entity.tenantId"></InputNumber> </FormItem
></Col>
<Col :span="12"
><FormItem :label="l('inheritCategoryId')" prop="inheritCategoryId">
<InputNumber
v-model="entity.inheritCategoryId"
></InputNumber> </FormItem
></Col> -->
<Col :span="24" <Col :span="24"
><FormItem :label="l('description')" prop="description"> ><FormItem :label="l('description')" prop="description">
<Input <Input
...@@ -142,9 +85,14 @@ export default { ...@@ -142,9 +85,14 @@ export default {
this.$refs.form.validate((v) => { this.$refs.form.validate((v) => {
if (v) { if (v) {
this.disabled = true; this.disabled = true;
let datas={ let datas = {
creationTime: this.entity.creationTime,
creatorUserId: this.entity.creatorUserId,
description: this.entity.description,
code: this.entity.code, code: this.entity.code,
id: this.entity.id, id: this.entity.id,
englishFullName: this.entity.englishFullName,
englishName: this.entity.englishName,
inheritCategoryId: this.entity.inheritCategoryId, inheritCategoryId: this.entity.inheritCategoryId,
lastModificationTime: this.entity.lastModificationTime, lastModificationTime: this.entity.lastModificationTime,
lastModifierUserId: this.entity.lastModifierUserId, lastModifierUserId: this.entity.lastModifierUserId,
...@@ -153,9 +101,9 @@ export default { ...@@ -153,9 +101,9 @@ export default {
name: this.entity.name, name: this.entity.name,
status: this.entity.status, status: this.entity.status,
tenantId: this.entity.tenantId, tenantId: this.entity.tenantId,
type:this.entity.type, type: this.entity.type,
upId: this.entity.upId upId: this.entity.upId,
} };
Api.update(datas) Api.update(datas)
.then((r) => { .then((r) => {
this.disabled = false; this.disabled = false;
......
...@@ -128,7 +128,6 @@ export default { ...@@ -128,7 +128,6 @@ export default {
key: "code", key: "code",
title: this.l("code"), title: this.l("code"),
align: "left", align: "left",
code: "project.base.code",
easy: true, easy: true,
high: true, high: true,
}, },
......
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