Commit 05c8e5ad authored by 仇晓婷's avatar 仇晓婷

文档优化

parent 63a4d8c4
......@@ -13,7 +13,10 @@
</Col>-->
<Col :span="12">
<FormItem :label="l('type')" prop="type">
<Dictionary code="word_classification_type" v-model="entity.type"></Dictionary>
<Dictionary
code="word_classification_type"
v-model="entity.type"
></Dictionary>
<!-- <InputNumber v-model="entity.type"></InputNumber> -->
</FormItem>
</Col>
......@@ -29,12 +32,19 @@
</Col>
<Col :span="12">
<FormItem :label="l('status')" prop="status">
<Dictionary code="word_classification_status" v-model="entity.status"></Dictionary>
<Dictionary
code="word_classification_status"
v-model="entity.status"
></Dictionary>
<!-- <InputNumber v-model="entity.status"></InputNumber> -->
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('inheritCategoryId')" prop="inheritCategoryId" v-if="row.id">
<FormItem
:label="l('inheritCategoryId')"
prop="inheritCategoryId"
v-if="row.id"
>
<!-- <Checkbox v-model="entity.inheritCategoryId"></Checkbox> -->
<RadioGroup v-model="inherit">
<Radio label="1"></Radio>
......@@ -59,34 +69,41 @@
<Input v-model="entity.templateId"></Input>
</FormItem>
</Col>-->
<Col :span="24">
<Col :span="24" v-if="inherit==0">
<Divider orientation="left">扩展属性</Divider>
<Table :columns="columns" :data="checkList" border>
<template slot-scope="{ row, index }" slot="title">
<div v-if="row.fieldType==1||row.fieldType==2">{{row.title}}</div>
<div v-if="row.fieldType == 1 || row.fieldType == 2">
{{ row.title }}
</div>
<Input
v-model="row.title"
placeholder="请输入名称"
@on-blur="setRow(row,index)"
v-if="row.fieldType==3"
@on-blur="setRow(row, index)"
v-if="row.fieldType == 3"
/>
</template>
<template slot-scope="{ row, index }" slot="note">
<!-- <Input v-if="row.dataType==3" v-model="row.note" placeholder="请输入字典编码" @on-blur="setRow(row,index)" /> -->
<Select
v-if="row.dataType==3"
v-if="row.dataType == 3"
v-model="row.note"
clearable
transfer
@on-change="setRow(row,index)"
@on-change="setRow(row, index)"
>
<Option v-for="item in codeList" :value="item.code" :key="item.code">{{ item.name }}</Option>
<Option
v-for="item in codeList"
:value="item.code"
:key="item.code"
>{{ item.name }}</Option
>
</Select>
<span v-else>{{row.note}}</span>
<span v-else>{{ row.note }}</span>
</template>
<template slot-scope="{ row, index }" slot="dataType">
<Dictionary
@on-change="setRow(row,index)"
@on-change="setRow(row, index)"
v-model="row.dataType"
code="materail.category.dataType"
type="select"
......@@ -96,8 +113,8 @@
</template>
<template slot-scope="{ row, index }" slot="unitName">
<Dictionary
v-if="row.dataType==1||row.dataType==2"
@on-change="setRow(row,index)"
v-if="row.dataType == 1 || row.dataType == 2"
@on-change="setRow(row, index)"
v-model="row.unitName"
code="material.main.unitName"
type="select"
......@@ -107,17 +124,30 @@
></Dictionary>
</template>
<template slot-scope="{ row, index }" slot="required">
<Checkbox v-model="row.required" @on-change="setRow(row,index)"></Checkbox>
<Checkbox
v-model="row.required"
@on-change="setRow(row, index)"
></Checkbox>
</template>
<template slot-scope="{ row, index }" slot="isUnique">
<Checkbox v-model="row.isUnique" @on-change="setRow(row,index)"></Checkbox>
<Checkbox
v-model="row.isUnique"
@on-change="setRow(row, index)"
></Checkbox>
</template>
<template slot-scope="{ row, index }" slot="action">
<a @click="remove(index,row)" style="color:#FF7A8B" v-if="row.fieldType>1">删除</a>
<a
@click="remove(index, row)"
style="color: #ff7a8b"
v-if="row.fieldType > 1"
>删除</a
>
</template>
</Table>
<Button type="dashed" long @click="addNew" class="mt10">新增属性</Button>
<Button type="dashed" long @click="addNew" class="mt10"
>新增属性</Button
>
</Col>
<Col :span="24" class="tr mt10">
<FormItem>
......@@ -181,6 +211,19 @@ export default {
action: 1,
add: 0, //新增标识
},
{
field: "secret",
title: "密级",
note: "",
dataType: 3,
unitName: "",
required: true,
isunique: false,
fieldType: 1,
categoryId: 0,
action: 1,
add: 0, //新增标识
},
{
field: "name",
title: "标题",
......
......@@ -14,7 +14,10 @@
</Col>-->
<Col :span="12">
<FormItem :label="l('type')" prop="type">
<Dictionary code="word_classification_type" v-model="entity.type"></Dictionary>
<Dictionary
code="word_classification_type"
v-model="entity.type"
></Dictionary>
<!-- <InputNumber v-model="entity.type"></InputNumber> -->
</FormItem>
</Col>
......@@ -30,12 +33,19 @@
</Col>
<Col :span="12">
<FormItem :label="l('status')" prop="status">
<Dictionary code="word_classification_status" v-model="entity.status"></Dictionary>
<Dictionary
code="word_classification_status"
v-model="entity.status"
></Dictionary>
<!-- <InputNumber v-model="entity.status"></InputNumber> -->
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('inheritCategoryId')" prop="inheritCategoryId" v-if="entity.upId!=0">
<FormItem
:label="l('inheritCategoryId')"
prop="inheritCategoryId"
v-if="entity.upId != 0"
>
<!-- <Checkbox v-model="entity.inheritCategoryId"></Checkbox> -->
<RadioGroup v-model="inherit">
<Radio label="1"></Radio>
......@@ -60,34 +70,41 @@
<Input v-model="entity.templateId"></Input>
</FormItem>
</Col>-->
<Col :span="24">
<Col :span="24" v-if="inherit==0">
<Divider orientation="left">扩展属性</Divider>
<Table :columns="columns" :data="checkList" border>
<template slot-scope="{ row, index }" slot="title">
<div v-if="row.fieldType==1||row.fieldType==2">{{row.title}}</div>
<div v-if="row.fieldType == 1 || row.fieldType == 2">
{{ row.title }}
</div>
<Input
v-model="row.title"
placeholder="请输入名称"
@on-blur="setRow(row,index)"
v-if="row.fieldType==3"
@on-blur="setRow(row, index)"
v-if="row.fieldType == 3"
/>
</template>
<template slot-scope="{ row, index }" slot="note">
<!-- <Input v-if="row.dataType==3" v-model="row.note" placeholder="请输入字典编码" @on-blur="setRow(row,index)" /> -->
<Select
v-if="row.dataType==3"
v-if="row.dataType == 3"
v-model="row.note"
clearable
transfer
@on-change="setRow(row,index)"
@on-change="setRow(row, index)"
>
<Option v-for="item in codeList" :value="item.code" :key="item.code">{{ item.name }}</Option>
<Option
v-for="item in codeList"
:value="item.code"
:key="item.code"
>{{ item.name }}</Option
>
</Select>
<span v-else>{{row.note}}</span>
<span v-else>{{ row.note }}</span>
</template>
<template slot-scope="{ row, index }" slot="dataType">
<Dictionary
@on-change="setRow(row,index)"
@on-change="setRow(row, index)"
v-model="row.dataType"
code="materail.category.dataType"
type="select"
......@@ -97,8 +114,8 @@
</template>
<template slot-scope="{ row, index }" slot="unitName">
<Dictionary
v-if="row.dataType==1||row.dataType==2"
@on-change="setRow(row,index)"
v-if="row.dataType == 1 || row.dataType == 2"
@on-change="setRow(row, index)"
v-model="row.unitName"
code="material.main.unitName"
type="select"
......@@ -108,17 +125,30 @@
></Dictionary>
</template>
<template slot-scope="{ row, index }" slot="required">
<Checkbox v-model="row.required" @on-change="setRow(row,index)"></Checkbox>
<Checkbox
v-model="row.required"
@on-change="setRow(row, index)"
></Checkbox>
</template>
<template slot-scope="{ row, index }" slot="isUnique">
<Checkbox v-model="row.isUnique" @on-change="setRow(row,index)"></Checkbox>
<Checkbox
v-model="row.isUnique"
@on-change="setRow(row, index)"
></Checkbox>
</template>
<template slot-scope="{ row, index }" slot="action">
<a @click="remove(index,row)" style="color:#FF7A8B" v-if="row.fieldType>1">删除</a>
<a
@click="remove(index, row)"
style="color: #ff7a8b"
v-if="row.fieldType > 1"
>删除</a
>
</template>
</Table>
<Button type="dashed" long @click="addNew" class="mt10">新增属性</Button>
<Button type="dashed" long @click="addNew" class="mt10"
>新增属性</Button
>
</Col>
<Col :span="24" class="tr mt10">
<FormItem>
......@@ -168,6 +198,19 @@ export default {
action: 1,
add: 0, //新增标识
},
{
field: "secret",
title: "密级",
note: "",
dataType: 3,
unitName: "",
required: true,
isunique: false,
fieldType: 1,
categoryId: 0,
action: 1,
add: 0, //新增标识
},
{
field: "name",
title: "标题",
......
<template>
<div>
<div class="mb10 pt5">
<Input v-model.trim="searchValue" placeholder="请输入库位名称" clearable style="width: 240px" />
<Input
v-model.trim="searchValue"
placeholder="请输入库位名称"
clearable
style="width: 240px"
/>
<Button type="primary" class @click="handleSearch">查询</Button>
<div class="fr">
<Button type="primary" @click="add()">新增分类</Button>
......@@ -10,7 +15,13 @@
<TreeGrid :columns="columns" :items="treeData"></TreeGrid>
<Modal v-model="modal" :title="title" width="1200" footer-hide>
<component :is="detail" :eid="curId" @on-close="cancel" @on-ok="ok" :row="row" />
<component
:is="detail"
:eid="curId"
@on-close="cancel"
@on-ok="ok"
:row="row"
/>
</Modal>
</div>
</template>
......@@ -53,26 +64,7 @@ export default {
easy: true,
high: true,
},
{
key: "creationTime",
title: this.l("creationTime"),
width: 180,
align: "center",
},
{
key: "creatorUserId",
title: this.l("creatorUserId"),
align: "center",
render: (h, params) => {
if (params.row.creatorUserId) {
return h("User", {
props: {
value: params.row.creatorUserId,
},
});
}
},
},
// {
// key: "level",
// title: this.l("level"),
......@@ -107,6 +99,7 @@ export default {
align: "left",
easy: true,
high: true,
width: 300,
},
{
key: "englishName",
......@@ -122,21 +115,44 @@ export default {
high: true,
code: "word_classification_status",
},
// {
// key: "inheritCategoryId",
// title: this.l("inheritCategoryId"),
// align: "center",
// high: true,
// hide: true,
// render: (h, params) => {
// return h("div", [
// h("span", params.row.inheritCategoryId == 0 ? "否" : "是"),
// ]);
// },
// },
{
key: "description",
title: this.l("description"),
align: "left",
width: 200,
},
{
key: "inheritCategoryId",
title: this.l("inheritCategoryId"),
key: "creatorUserId",
title: this.l("creatorUserId"),
align: "center",
high: true,
render: (h, params) => {
return h("div", [
h("span", params.row.inheritCategoryId == 0 ? "否" : "是"),
]);
if (params.row.creatorUserId) {
return h("User", {
props: {
value: params.row.creatorUserId,
},
});
}
},
},
{
key: "description",
title: this.l("description"),
align: "left",
key: "creationTime",
title: this.l("creationTime"),
width: 200,
align: "center",
},
{
title: "操作",
......
......@@ -7,29 +7,50 @@
<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-if="li.dataType == 0"
v-model="entity[li.field]"
:disabled="li.field=='code'"
:disabled="li.field == 'code'"
:placeholder="
li.field == 'code' ? '保存后编号将自动生成' : ''
"
></Input>
<InputNumber
v-if="li.dataType==1||li.dataType==2"
v-if="li.dataType == 1 || li.dataType == 2"
v-model="entity[li.field]"
class="w100"
></InputNumber>
<Dictionary v-if="li.dataType==3" v-model="entity[li.field]" :code="li.note"></Dictionary>
<Input v-if="li.dataType==5" type="textarea" v-model="entity[li.filed]"></Input>
<Dictionary
v-if="li.dataType == 3"
v-model="entity[li.field]"
:code="li.note"
></Dictionary>
<Input
v-if="li.dataType == 5"
type="textarea"
v-model="entity[li.filed]"
></Input>
<DatePicker
v-if="li.dataType==4"
v-if="li.dataType == 4"
v-model="entity[li.field]"
type="date"
:placeholder="'选择'+li.title"
:placeholder="'选择' + li.title"
></DatePicker>
<InputFile v-if="li.dataType==6" v-model="entity[li.field]"></InputFile>
<InputFile
v-if="li.dataType == 6"
v-model="entity[li.field]"
></InputFile>
<!-- <files ref="refFile" :parms="parms" fileFormat :Photos="true" @clickItem="clickData" /> -->
<InputFile v-if="li.dataType==7" v-model="entity[li.field]"></InputFile>
<Input v-if="li.dataType==8" type="textarea" v-model="entity[li.field]"></Input>
<InputFile
v-if="li.dataType == 7"
v-model="entity[li.field]"
></InputFile>
<Input
v-if="li.dataType == 8"
type="textarea"
v-model="entity[li.field]"
></Input>
<state
v-if="li.unitName&&(li.dataType==1||li.dataType==2)"
v-if="li.unitName && (li.dataType == 1 || li.dataType == 2)"
:value="li.unitName"
code="material.main.unitName"
type="tag"
......@@ -160,16 +181,26 @@
</Col>
<Col span="6">
<FormItem :label="l('img')" prop="img">
<inputFile class="tphoto" ref="refmovieFile1" v-model="imgName" :parms="parmsName" />
<inputFile
class="tphoto"
ref="refmovieFile1"
v-model="imgName"
:parms="parmsName"
/>
</FormItem>
<div class="img-touxiang">
<img :src="avatorPath" v-if="imgName" />
<img src="@/assets/images/files_header.png" v-else width="100%" height="100%" />
<img
src="@/assets/images/files_header.png"
v-else
width="100%"
height="100%"
/>
</div>
</Col>
</Row>
<Row>
<Col :span="24" style="text-align: right;">
<Col :span="24" style="text-align: right">
<FormItem>
<Button type="primary" @click="handleSubmit" v-noClick>保存</Button>
<Button @click="handleClose" class="ml20">取消</Button>
......
......@@ -12,7 +12,11 @@
@click="toggle"
title="展开/合并"
></Button>
<Button icon="md-refresh" title="刷新" @click="loadTree()"></Button>
<Button
icon="md-refresh"
title="刷新"
@click="loadTree()"
></Button>
<Button icon="md-rewind" title="收起" @click="hide"></Button>
</ButtonGroup>
</div>
......@@ -22,7 +26,12 @@
</div>
<div class="fg">
<div class="tree">
<Tree :data="data" ref="tree" @on-select-change="change" :render="renderContent"></Tree>
<Tree
:data="data"
ref="tree"
@on-select-change="change"
:render="renderContent"
></Tree>
</div>
</div>
</div>
......@@ -32,7 +41,7 @@
<Icon type="ios-arrow-forward" size="24" />
</a>
</div>
<Content :class="!showMenu?'con_bord':''">
<Content :class="!showMenu ? 'con_bord' : ''">
<Word ref="dataTable" :treeId="treeId" :addShow="addShow" :ids="ids" />
</Content>
</Layout>
......@@ -134,12 +143,12 @@ export default {
// console.log(a)
console.log(b);
this.treeId = b.id;
if (b.children.length == 0) {
this.addShow = true;
this.$refs.dataTable.$refs.grid.reload(this.easySearch);
} else {
this.addShow = false;
}
// if (b.children.length == 0) { //判断最底层才能添加文档
// this.addShow = true;
// this.$refs.dataTable.$refs.grid.reload(this.easySearch);
// } else {
// this.addShow = false;
// }
let ids = [];
ids.push(b.value);
if (b.children) {
......
......@@ -14,7 +14,10 @@
<template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys">
<Input placeholder="请输入关键字引用的文档名称/文档名称" v-model="easySearch.keys.value" />
<Input
placeholder="请输入关键字引用的文档名称/文档名称"
v-model="easySearch.keys.value"
/>
</FormItem>
<FormItem>
<Button type="primary" @click="search">查询</Button>
......@@ -26,28 +29,38 @@
</template>
<template slot="buttons">
<Button type="primary" @click="add">新增</Button>
<Button :icon="iconInfo" shape="circle" :title="titleInfo" @click="changeShwo"></Button>
<Button
:icon="iconInfo"
shape="circle"
:title="titleInfo"
@click="changeShwo"
></Button>
<Button @click="openModalIm">导入</Button>
</template>
<template slot="card" slot-scope="{row}">
<template slot="card" slot-scope="{ row }">
<div class="body-card">
<Row class="title-i">
<Col :span="12">
<Ellipsis :text="row.name" :length="12" tooltip />
</Col>
<Col :span="12" class="btn-click">{{row.code}}</Col>
<Col :span="12" class="btn-click">{{ row.code }}</Col>
</Row>
<Row class="row-down" :gutter="10">
<Col span="7">
<div class="img-i">
<img :src="downUrl +row.img" v-if="row.img" />
<img :src="downUrl + row.img" v-if="row.img" />
<!-- onerror="this.src='/imgicon/chan_Pin.png'" -->
<img src="@/assets/imgicon/chan_Pin.png" v-else width="100%" height="100%" />
<img
src="@/assets/imgicon/chan_Pin.png"
v-else
width="100%"
height="100%"
/>
</div>
</Col>
<Col span="17" class="c">
<div>版本:{{row.version}}</div>
<div>状态:{{ row.status == 0 ? "草稿" : "送审"}}</div>
<div>版本:{{ row.version }}</div>
<div>状态:{{ row.status == 0 ? "草稿" : "送审" }}</div>
<!-- <div>
创建人:
<User :value="row.creatorUserId" />
......@@ -55,18 +68,19 @@
<div class="shuo-ming">
<span>文档说明:</span>
<Ellipsis :text="row.description" :length="12" tooltip class="tooltip-shuo" />
<Ellipsis
:text="row.description"
:length="12"
tooltip
class="tooltip-shuo"
/>
</div>
<p class="a-icon">
<a @click="edit(row.id)">
<Icon type="md-create" />编辑
</a>&nbsp;
<a @click="remove(row.id)">
<Icon type="ios-trash" />删除
</a>&nbsp;
<a @click="view(row.id)">
<Icon type="md-document" />详情
</a>
<a @click="edit(row.id)"> <Icon type="md-create" />编辑 </a
>&nbsp;
<a @click="remove(row.id)"> <Icon type="ios-trash" />删除 </a
>&nbsp;
<a @click="view(row.id)"> <Icon type="md-document" />详情 </a>
</p>
</Col>
</Row>
......@@ -240,14 +254,18 @@ export default {
this.$refs.grid.reload(this.easySearch);
},
add() {
this.fullscreen = false;
if (this.addShow == false) {
this.$Message.error("请在分类最子集新增文档");
if (this.treeId == 0) {
this.$Message.error("请在分类下添加文档");
} else {
// if (this.addShow == false) { //判断最底层才能添加文档
// this.$Message.error("请在分类最子集新增文档");
// } else {
this.fullscreen = false;
this.curId = 0;
this.title = "新增";
this.detail = () => import("./add");
this.modal = true;
// }
}
},
copy(id) {
......
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