Commit 55ab96ec authored by 仇晓婷's avatar 仇晓婷

样式

parent a5ed601f
......@@ -73,14 +73,20 @@ export default {
}
},
},
{ key: "level", title: this.l("level"), align: "center", high: true },
{
key: "totalDocument",
title: this.l("totalDocument"),
align: "center",
width: 160,
},
// {
// key: "level",
// title: this.l("level"),
// align: "center",
// high: true,
// hide: true,
// },
// {
// key: "totalDocument",
// title: this.l("totalDocument"),
// align: "center",
// width: 160,
// hide: true,
// },
// {
// key: "tenantId",
// title: this.l("tenantId"),
......@@ -225,7 +231,7 @@ export default {
},
add() {
this.curId = 0;
this.row.id = '';
this.row.id = "";
this.title = "新增";
this.detail = () => import("./add");
this.modal = true;
......
<template>
<div>
<Form ref="form" :model="entity" :rules="rules" :label-width="120">
<Row>
<Col span="18">
<Row>
<Col v-for="li in fileds" :key="li.field" :span="li.span">
<FormItem :label="li.title" :prop="li.name">
<Input v-if="li.dataType==0" v-model="entity[li.field]" :disabled="li.field=='code'"></Input>
<Input
v-if="li.dataType==0"
v-model="entity[li.field]"
:disabled="li.field=='code'"
></Input>
<InputNumber
v-if="li.dataType==1||li.dataType==2"
v-model="entity[li.field]"
......@@ -172,13 +177,23 @@
</Col>
</Row>
</Form>
<!-- <Modal v-model="modal" title="文档送审" footer-hide fullscreen :mask-closable="false">
<Submit :isId="isId" ref="submit" @on-close="close"></Submit>
</Modal>-->
</div>
</template>
<script>
import Api from "./api";
// import Submit from "./submit";
export default {
name: "Add",
components: {
// Submit,
},
data() {
return {
// modal: false,
isId: "",
imgName: "",
avatorPath: "",
fileds: [], //扩展属性
......@@ -270,6 +285,12 @@ export default {
Api.create(this.entity)
.then((r) => {
if (r.success) {
// if (this.entity.status == 1) {
// this.modal = true;
// this.isId = r.result.id;
// } else {
// this.modal = false;
// }
this.$Message.success("保存成功");
this.$emit("on-ok");
} else {
......
<template>
<div class=".detail-document">
<div class="body-document">
<h4>详细信息</h4>
<Row>
<Col span="20">
<div class="new-detail detail-d">
<Row>
<Filed v-for="li in fileds" :key="li.field" :span="li.span" :name="li.title+':'">
<State v-if="li.dataType==3" :code="li.note" :value="entity[li.field]" />
<div v-else-if="li.dataType==8">{{entity[li.field]}}</div>
<div v-else-if="li.dataType==5" v-html="entity[li.field]"></div>
<DTSpan v-else-if="li.dataType==4" :value="entity[li.field]" />
<span v-else>{{entity[li.field]}}</span>
<State
v-if="li.unitName&&(li.dataType==1||li.dataType==2)"
:code="li.note"
:value="entity[li.field]"
/>
</Filed>
</Row>
<Row class="filed-d">
<Filed :span="12" :name="l('creationTime')+':'">{{entity.creationTime}}</Filed>
<Filed :span="12" :name="l('creatorUserId')+':'">
<User :value="entity.creatorUserId" />
</Filed>
<Filed :span="12" :name="l('status')+':'">{{entity.status==0?'草稿':'送审'}}</Filed>
<Filed :span="24" :name="l('filePath')+':'">
<files ref="refFile" :parms="parms" :showList="false" />
</Filed>
</Row>
</div>
</Col>
<Col span="4" class="dcm-right">
<div class="img-touxiang">
<img :src="downUrl+avatorPath" v-if="avatorPath" />
<img src="@/assets/images/files_header.png" v-else width="100%" height="100%" />
</div>
</Col>
</Row>
</div>
</div>
</template>
<script>
import Api from "./api";
export default {
name: "Add",
data() {
return {
avatorPath: "",
downUrl: fileUrlDown,
entity: {},
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }],
code: [{ required: true, message: "必填", trigger: "blur" }],
},
fileds: [],
parms: {
app: "material",
eid: null,
name: "",
field: "",
},
};
},
props: ["eid", "treeId"],
mounted() {
this.initFiled();
this.parms.eid = this.$u.guid();
},
methods: {
load(v) {
Api.get({ id: v }).then((r) => {
this.entity = r.result;
this.parms.eid = r.result.filePath;
this.avatorPath = r.result.img;
this.$emit("on-load");
});
},
initFiled() {
Api.listbyid({
categoryId: this.treeId,
}).then((r) => {
if (r.result) {
let result = [];
result = r.result.definie.concat(r.result.inherit);
console.log(result);
this.fileds = result.filter(function (item) {
item.span = 6;
if (item.dataType > 4) {
item.span = 24;
}
delete item["id"];
// return item.fieldType != 1;
return item;
});
this.fileds.map((u) => {
let v = "";
if (u.dataType == 1 || u.dataType == 2) {
v = 0;
}
this.entity[u.field] = "";
this.$set(this.entity, u.filed, v);
});
}
if (this.eid) {
this.load(this.eid);
}
});
},
handleClose() {
this.$emit("on-close");
},
l(key) {
key = "document_property_definition" + "." + key;
return this.$t(key);
},
},
watch: {
eid(v) {
if (v > 0) {
this.load(v);
}
},
},
};
</script>
<style lang="less">
.top-title {
// margin: 10px;
background: #fff;
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.15);
position: relative;
border-radius: 5px;
}
.body-document {
margin-top: 10px;
background: #fff;
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.15);
border-radius: 8px;
h4 {
height: 50px;
line-height: 50px;
background: #515a6e;
padding: 0 10px;
color: #f5f6fa;
border-radius: 5px 5px 0 0;
}
.img-touxiang {
width: 230px;
height: 230px;
float: right;
margin-top: 10px;
margin-right: 10px;
img {
width: 100%;
height: 100%;
border-radius: 5px;
}
}
.detail-d {
padding-left: 20px;
.filed-d {
border-top: 1px solid #e0e0e0;
}
}
}
.detail-document {
background-color: #f5f7f9 !important;
}
</style>
\ No newline at end of file
......@@ -47,7 +47,12 @@
</Col>
<Col span="17" class="c">
<div>版本:{{row.version}}</div>
<div>文档详细说明:{{row.description}}</div>
<div>状态:{{ row.status == 0 ? "草稿" : "送审"}}</div>
<!-- <div>
创建人:
<User :value="row.creatorUserId" />
</div>-->
<div>时间:{{row.creationTime}}</div>
<p class="a-icon">
<a @click="edit(row.id)">
<Icon type="md-create" />编辑
......@@ -103,68 +108,34 @@ export default {
align: "left",
high: true,
},
{ key: "name", title: this.l("title"), align: "left", high: true },
{
key: "title",
title: this.l("title"),
align: "left",
easy: true,
high: true,
},
{ key: "field", title: this.l("field"), align: "left", high: true },
{
key: "dataType",
title: this.l("dataType"),
align: "left",
high: true,
},
{
key: "dataLength",
title: this.l("dataLength"),
align: "left",
high: true,
},
{
key: "dictionaryId",
title: this.l("dictionaryId"),
align: "left",
high: true,
},
{ key: "note", title: this.l("note"), align: "left", high: true },
{
key: "unitName",
title: this.l("unitName"),
key: "creationTime",
title: this.l("creationTime"),
align: "left",
easy: true,
high: true,
},
{ key: "tag", title: this.l("tag"), align: "left", high: true },
{
key: "categoryId",
title: this.l("categoryId"),
align: "left",
high: true,
},
{
key: "required",
title: this.l("required"),
key: "code",
title: this.l("name"),
align: "left",
high: true,
},
{
key: "isUnique",
title: this.l("isUnique"),
key: "status",
title: this.l("status"),
align: "left",
high: true,
render: (h, params) => {
return h("div", [
h("span", params.row.status == 0 ? "草稿" : "送审"),
]);
},
{
key: "fieldType",
title: this.l("fieldType"),
align: "left",
high: true,
},
{
key: "creationTime",
title: this.l("creationTime"),
key: "version",
title: this.l("revision"),
align: "left",
high: true,
},
......@@ -173,49 +144,7 @@ export default {
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: "dictionaryCode",
title: this.l("dictionaryCode"),
align: "left",
easy: true,
high: true,
},
{
key: "codeRuleId",
title: this.l("codeRuleId"),
align: "left",
high: true,
type: "user",
},
{
title: "操作",
......@@ -425,7 +354,7 @@ export default {
.a-icon {
text-align: right;
margin-top: 25px;
margin-top: 10px;
}
}
}
......
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