Commit 74c5c92c authored by renjintao's avatar renjintao

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

parents 832f4f68 a4285b5c
import Api from '@/plugins/request';
export default {
//批量生成序列号并返回
serialcode(params) {
return Api.post(`${systemUrl}/cache/generate_serialcode`, params);
},
}
\ No newline at end of file
<template>
<div class="input-code">
<Input v-model="codeValue" clearable required>
<Button slot="append" @click="codeClick">自动生成</Button>
</Input>
</div>
</template>
<script>
import Api from "./api";
export default {
name:"inputCode",
data() {
return {
codeValue: this.value,
select: "",
};
},
model: {
prop: "value",
event: "on-change",
},
props: {
value:[String],
code: {
type: String,
default: "",
},
type: {
type: String,
},
},
mounted() {
// this.codeValue=this.value;
},
methods: {
// 生成临时编号code
getSerialcode() {
Api.serialcode({
code: this.code,
}).then((r) => {
if (r.result) {
this.codeValue = r.result[0];
this.$emit("on-change", this.codeValue);
}
});
},
codeClick() {
this.getSerialcode();
},
},
watch: {
value(v) {
this.codeValue = v;
},
},
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<img :src="downUrl + src" />
</template>
<script>
export default {
props: ["src"],
data() {
return {
path: "",
downUrl: fileUrlDown,
};
},
mounted() {
if (this.src) {
this.path = downUrl + v;
}
},
watch: {
src(v) {
if (v) {
this.path = downUrl + v;
}
},
},
};
</script>
\ No newline at end of file
......@@ -45,7 +45,8 @@
</Col>
<Col span="3" class="dcm-right">
<div class="img-touxiang">
<img :src="downUrl + avatorPath" v-if="avatorPath" />
<Pictrue :src="avatorPath" v-if="avatorPath" />
<!-- <img :src="downUrl + avatorPath" v-if="avatorPath" /> -->
<img
src="@/assets/images/files_header.png"
v-else
......
......@@ -15,6 +15,9 @@
<p>
<Tree :data="result"></Tree>
</p>
<p>
<inputCode v-model="data"/>
</p>
</div>
</template>
......@@ -27,6 +30,7 @@ export default {
data() {
return {
model: [],
data:"ddd",
result: [
{
title: "五二九纵",
......
......@@ -30,28 +30,7 @@
<Input v-model="entity.englishName"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('status')" prop="status">
<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"
>
<!-- <Checkbox v-model="entity.inheritCategoryId"></Checkbox> -->
<RadioGroup v-model="inherit">
<Radio label="1"></Radio>
<Radio label="0"></Radio>
</RadioGroup>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('templateId')" prop="templateId">
<Select
......@@ -80,18 +59,33 @@
</Select>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('status')" prop="status">
<Dictionary
code="word_classification_status"
v-model="entity.status"
type="radio"
></Dictionary>
<!-- <InputNumber v-model="entity.status"></InputNumber> -->
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('description')" prop="description">
<Input v-model="entity.description" type="textarea" :rows="5"></Input>
</FormItem>
</Col>
<!-- <Col :span="24">
<FormItem :label="l('templateId')" prop="templateId">
<Input v-model="entity.templateId"></Input>
<Col :span="12" v-if="eid != 0">
<FormItem label="扩展属性" prop="inheritCategoryId">
<!-- <Checkbox v-model="entity.inheritCategoryId"></Checkbox> -->
<RadioGroup v-model="inherit">
<Radio label="1">继承</Radio>
<Radio label="0">自定义</Radio>
</RadioGroup>
</FormItem>
</Col>-->
<Col :span="24" v-if="inherit == 0">
</Col>
<Col :span="24" v-if="inherit == '0'">
<Divider orientation="left">扩展属性</Divider>
<Table :columns="columns" :data="checkList" border>
<template slot-scope="{ row, index }" slot="title">
......@@ -198,16 +192,15 @@ export default {
type: 0,
englishFullName: "",
englishName: "",
status: 0,
status: 1,
description: "",
inheritCategoryId: "0", //0否,是,row的id值
template: "",
templateId: "",
},
inherit: "0",
inherit: this.eid ? "1" : "0",
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }],
workFlowIds: [{ required: true, message: "必填", trigger: "change" }],
},
checkList: [
{
......@@ -341,6 +334,10 @@ export default {
row: Object,
eid: Number,
},
created() {
// console.log(this.row.id);
console.log(this.eid);
},
mounted() {
this.tebleSet();
this.loadTemplate();
......@@ -348,7 +345,7 @@ export default {
},
methods: {
tebleSet() {
Api.getChildren({ id: 582 }).then((r) => {
Api.getChildren({ id: 673 }).then((r) => {
if (r.result) {
this.codeList = r.result;
}
......@@ -435,10 +432,10 @@ export default {
handleSubmit() {
this.$refs.form.validate((v) => {
if (v) {
if (this.row.id) {
this.entity.upId = this.row.id;
if (this.eid) {
this.entity.upId = this.eid;
this.entity.level = this.row.level;
this.entity.inheritCategoryId = this.row.id;
this.entity.inheritCategoryId = this.eid;
} else {
this.entity.upId = 0;
this.entity.level = 1;
......@@ -485,6 +482,5 @@ export default {
return this.$t(key);
},
},
watch: {},
};
</script>
\ No newline at end of file
......@@ -31,28 +31,7 @@
<Input v-model="entity.englishName"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('status')" prop="status">
<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"
>
<!-- <Checkbox v-model="entity.inheritCategoryId"></Checkbox> -->
<RadioGroup v-model="inherit">
<Radio label="1"></Radio>
<Radio label="0"></Radio>
</RadioGroup>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('templateId')" prop="templateId">
<Select
......@@ -81,17 +60,32 @@
</Select>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('status')" prop="status">
<Dictionary
code="word_classification_status"
v-model="entity.status"
type="radio"
></Dictionary>
<!-- <InputNumber v-model="entity.status"></InputNumber> -->
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('description')" prop="description">
<Input v-model="entity.description" type="textarea" :rows="5"></Input>
</FormItem>
</Col>
<!-- <Col :span="24">
<FormItem :label="l('templateId')" prop="templateId">
<Input v-model="entity.templateId"></Input>
<Col :span="12" v-if="eid != 0">
<FormItem label="扩展属性" prop="inheritCategoryId">
<!-- <Checkbox v-model="entity.inheritCategoryId"></Checkbox> -->
<RadioGroup v-model="inherit">
<Radio label="1">继承</Radio>
<Radio label="0">自定义</Radio>
</RadioGroup>
</FormItem>
</Col>-->
</Col>
<Col :span="24" v-if="inherit == 0">
<Divider orientation="left">扩展属性</Divider>
<Table :columns="columns" :data="checkList" border>
......@@ -189,10 +183,11 @@ export default {
return {
parmsName: "app=material&eid=1&name=documentTemplate",
codeList: [],
entity: {},
entity: {
status:'1'
},
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }],
workFlowIds: [{ required: true, message: "必填", trigger: "change" }],
},
templates: [],
workFlows: [],
......@@ -372,7 +367,7 @@ export default {
});
},
tebleSet() {
Api.getChildren({ id: 582 }).then((r) => {
Api.getChildren({ id: 673}).then((r) => {
if (r.result) {
this.codeList = r.result;
}
......
......@@ -3,7 +3,7 @@
<div class="mb10 pt5">
<Input
v-model.trim="searchValue"
placeholder="请输入库位名称"
placeholder="请输入分类名称"
clearable
style="width: 240px"
/>
......@@ -40,7 +40,7 @@ export default {
},
data() {
return {
searchValue: "", //搜索库位名称
searchValue: "", //搜索名称
treeData: [],
treeDataOld: [],
......@@ -223,13 +223,15 @@ export default {
res,
0,
(u) => {
u.expand = true;
// console.log(u);
u.expanded = false;
u.selected = false;
u.checked = false;
},
"upId"
);
this.treeData = this.$u.clone(data);
console.log(this.treeData);
});
},
//查询
......@@ -253,7 +255,7 @@ export default {
this.modal = true;
},
addrow(row) {
this.curId = 0;
this.curId = row.id;
this.row = row;
this.detail = () => import("./add");
this.modal = true;
......
<template>
<div class="document-add">
<Form ref="form" :model="entity" :rules="rules" :label-width="120">
<Form ref="form" :model="entity" :rules="rules" :label-width="110">
<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-if="li.dataType == 0 && li.field != 'code'"
v-model="entity[li.field]"
:disabled="li.field == 'code'"
:placeholder="
li.field == 'code' ? '保存后编号将自动生成' : ''
"
></Input>
<InputCode
v-if="li.dataType == 0 && li.field == 'code'"
code="WORD"
v-model="entity[li.field]"
/>
<InputNumber
v-if="li.dataType == 1 || li.dataType == 2"
v-model="entity[li.field]"
......@@ -172,19 +173,15 @@
<a href="#" @click="template" class="a-xiazai">下载模板</a>
</div>
</Col>
<Col :span="12">
<!-- <Col :span="12">
<FormItem :label="l('status')" prop="status">
<Dictionary
disabled
code="word.document.status"
v-model="entity.status"
></Dictionary>
<!-- <RadioGroup v-model="entity.status">
<Radio label="0">草稿</Radio>
<Radio label="1">送审</Radio>
</RadioGroup> -->
</FormItem>
</Col>
</Col> -->
</Row>
</Col>
<Col span="6">
......@@ -225,14 +222,13 @@
</template>
<script>
import Api from "./api";
export default {
name: "Add",
components: {},
data() {
return {
code: "",
// modal: false,
imgName: "",
avatorPath: "",
fileds: [], //扩展属性
......@@ -241,6 +237,7 @@ export default {
status: 0,
categoryId: this.treeId,
img: "",
code: "",
// title: "",
// field: "",
// dataType: null,
......@@ -265,6 +262,7 @@ export default {
},
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }],
// code: [{ required: true, message: "必填", trigger: "blur" }],
},
parmsName: "app=material&eid=1&name=document",
parms: {
......@@ -286,6 +284,9 @@ export default {
this.parms.eid = this.$u.guid();
this.$refs.refmovieFile1.inputShow = false;
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: {
imgUrl() {
window.open(this.avatorPath, "_blank");
......
......@@ -34,4 +34,5 @@ export default {
getcategorytemplate(params){ //获取分类的模板
return Api.get(`${material}/documenttemplate/getcategorytemplate`,params);
},
}
\ No newline at end of file
......@@ -110,7 +110,8 @@
</Col>
<Col span="4" class="dcm-right">
<div class="img-touxiang">
<img :src="downUrl + avatorPath" v-if="avatorPath" />
<!-- <img :src="downUrl + avatorPath" v-if="avatorPath" /> -->
<Pictrue :src="avatorPath" v-if="avatorPath" />
<img
src="@/assets/images/files_header.png"
v-else
......@@ -274,7 +275,7 @@ export default {
background: #fff;
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.15);
border-radius: 8px;
height: 80vh;
min-height: 80vh;
h4 {
height: 50px;
line-height: 50px;
......
<template>
<Form ref="form" :model="entity" :rules="rules" :label-width="120">
<Form ref="form" :model="entity" :rules="rules" :label-width="110">
<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-if="li.dataType == 0 && li.field != 'code'"
v-model="entity[li.field]"
:disabled="li.field == 'code'"
></Input>
<InputCode
v-if="li.dataType == 0 && li.field == 'code'"
v-model="entity[li.field]"
code="WORD"
/>
<InputNumber
v-if="li.dataType == 1 || li.dataType == 2"
v-model="entity[li.field]"
......@@ -169,14 +173,15 @@
<a href="#" @click="template" class="a-xiazai">下载模板</a>
</div>
</Col>
<Col :span="12">
<!-- <Col :span="12">
<FormItem :label="l('status')" prop="status">
<Dictionary
disabled
code="word.document.status"
v-model="entity.status"
></Dictionary>
</FormItem>
</Col>
</Col> -->
<!-- <Col :span="24" style="text-align: right;">
<FormItem>
<Button type="primary" @click="handleSubmit" v-noClick>保存</Button>
......@@ -243,6 +248,9 @@ export default {
this.parms.eid = this.$u.guid();
this.$refs.refmovieFile1.inputShow = false;
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: {
imgUrl() {
window.open(this.avatorPath, "_blank");
......
......@@ -42,7 +42,13 @@
</a>
</div>
<Content :class="!showMenu ? 'con_bord' : ''">
<Word ref="dataTable" :treeId="treeId" :addShow="addShow" :ids="ids" :workFlowIds="workFlowIds"/>
<Word
ref="dataTable"
:treeId="treeId"
:addShow="addShow"
:ids="ids"
:workFlowIds="workFlowIds"
/>
</Content>
</Layout>
</div>
......@@ -70,7 +76,7 @@ export default {
treeId: 0,
addShow: false,
ids: [],
workFlowIds:''
workFlowIds: "",
};
},
mounted() {
......@@ -108,8 +114,8 @@ export default {
let data = {
conditions: [
{
fieldName: "",
fieldValue: "",
fieldName: "status",
fieldValue: "1",
conditionalType: "Equal",
},
],
......@@ -145,7 +151,7 @@ export default {
// console.log(a)
console.log(b);
this.treeId = b.id;
this.workFlowIds=b.workFlowIds //流程id
this.workFlowIds = b.workFlowIds; //流程id
// if (b.children.length == 0) { //判断最底层才能添加文档
// this.addShow = true;
// this.$refs.dataTable.$refs.grid.reload(this.easySearch);
......
<template>
<div class=".detail-document">
{{ workFlowIds }}
<div class="body-document" v-if="eid != 0">
<h4>详细信息</h4>
<Row>
......@@ -42,9 +41,9 @@
<Filed :span="12" :name="l('creatorUserId') + ':'">
<User :value="entity.creatorUserId" />
</Filed>
<Filed :span="12" :name="l('status') + ':'">{{
entity.status == 0 ? "草稿" : "送审"
}}</Filed>
<Filed :span="12" :name="l('status') + ':'">
<state code="word.document.status" :value="entity.status" />
</Filed>
<Filed :span="24" :name="l('filePath') + ':'">
<files ref="refFile" :parms="parms" :showList="false" />
</Filed>
......@@ -53,7 +52,8 @@
</Col>
<Col span="4" class="dcm-right">
<div class="img-touxiang">
<img :src="downUrl + avatorPath" v-if="avatorPath" />
<!-- <img :src="downUrl + avatorPath" v-if="avatorPath" /> -->
<Pictrue :src="avatorPath" v-if="avatorPath" />
<img
src="@/assets/images/files_header.png"
v-else
......@@ -340,7 +340,7 @@ export default {
background: #fff;
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.15);
border-radius: 8px;
min-height: 310px;
h4 {
height: 50px;
line-height: 50px;
......
......@@ -16,7 +16,7 @@
<Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys">
<Input
placeholder="请输入关键字引用的文档名称/文档名称"
placeholder="请输入文档名称/编号"
v-model="easySearch.keys.value"
/>
</FormItem>
......@@ -44,17 +44,19 @@
<div class="body-card">
<Row class="title-i">
<Col :span="12">
<Ellipsis :text="row.name" :length="12" tooltip />
<Ellipsis :text="row.name" :length="18" tooltip />
</Col>
<Col :span="12" class="btn-click">{{ row.code }}</Col>
<Col :span="12" class="btn-click">
<Ellipsis :text="row.code" :length="18" tooltip
/></Col>
</Row>
<Row class="row-down" :gutter="10">
<Col span="7">
<div class="img-i">
<img :src="downUrl + row.img" v-if="row.img" />
<!-- onerror="this.src='/imgicon/chan_Pin.png'" -->
<!-- <img :src="downUrl + row.img" v-if="row.img" /> -->
<Pictrue :src="row.img" v-if="row.img" />
<img
src="@/assets/imgicon/chan_Pin.png"
src="@/assets/images/files_header.png"
v-else
width="100%"
height="100%"
......@@ -98,7 +100,7 @@
<Modal
v-model="modal"
:title="title"
width="1200"
width="1300"
footer-hide
:mask-closable="false"
:fullscreen="fullscreen"
......@@ -124,7 +126,7 @@ export default {
action: Api.index,
fullscreen: false,
easySearch: {
keys: { op: "refName,name", value: null },
keys: { op: "name,code", value: null },
categoryId: {
op: "In",
value: this.ids,
......@@ -134,7 +136,7 @@ export default {
title: "新增",
detail: null,
curId: 0,
downUrl: fileUrlDown,
columns: [
{
type: "selection",
......@@ -152,9 +154,10 @@ export default {
{
key: "creationTime",
title: this.l("creationTime"),
align: "left",
align: "center",
easy: true,
high: true,
width: 180,
},
{
key: "code",
......@@ -165,27 +168,30 @@ export default {
{
key: "status",
title: this.l("status"),
align: "left",
align: "center",
high: true,
code: "word.document.status",
width: 120,
},
{
key: "version",
title: this.l("revision"),
align: "left",
align: "center",
high: true,
width: 120,
},
{
key: "creatorUserId",
title: this.l("creatorUserId"),
align: "left",
align: "center",
high: true,
type: "user",
width: 120,
},
{
title: "操作",
key: "action",
width: 180,
width: 200,
align: "left",
render: (h, params) => {
return h("div", { class: "action" }, [
......@@ -406,7 +412,7 @@ export default {
height: 110px;
.img-i {
width: 90px;
background: #eee;
// background: #eee;
height: 90px;
img {
width: 90px;
......
......@@ -65,6 +65,10 @@ import OutputTime from '@/components/page/outputTime.vue'
import ViewerImg from '@/components/page/viewer.vue'
import ImportExcel from '@/components/page/import/process.vue'
import CustomProperties from '@/components/page/customProperties.vue'
import InputCode from '@/components/page/inputCode.vue'
import Pictrue from '@/components/page/pictrue.vue'
// import FormMaking from 'form-making'
......@@ -135,6 +139,9 @@ Vue.component("StoreTree", StoreTree)
Vue.component("StoreSelect", StoreSelect)
Vue.component("ImportExcel",ImportExcel)
Vue.component("CustomProperties",CustomProperties)
Vue.component("InputCode",InputCode)
Vue.component("Pictrue",Pictrue)
//注入mock
......
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