Commit 406a3cca authored by renjintao's avatar renjintao

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

parents a4c64b8a 8f720f24
...@@ -1733,9 +1733,12 @@ export default { ...@@ -1733,9 +1733,12 @@ export default {
englishName:'英文简称', englishName:'英文简称',
status:'', status:'',
inheritCategoryId:'继承', //继承分类id inheritCategoryId:'继承', //继承分类id
template:'上传模板', //模板路径 // url:'上传模板', //模板路径
templateId:'', template:'模板Id', //模板路径
templateId:'选择模板',
status:'状态', status:'状态',
workFlows:'选择流程',
workFlowIds:'流程Id',
description:'备注' description:'备注'
}, },
document_template:{ document_template:{
......
...@@ -52,34 +52,40 @@ ...@@ -52,34 +52,40 @@
</RadioGroup> </RadioGroup>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="24">
<FormItem :label="l('description')" prop="description">
<Input v-model="entity.description" type="textarea" :rows="5"></Input>
</FormItem>
</Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('template')" prop="template"> <FormItem :label="l('templateId')" prop="templateId">
<!-- <Input v-model="entity.template" type="textarea" :rows="5"></Input> --> <Select
<inputFile v-model="entity.templateId"
class="tphoto" @on-change="setTemplate"
ref="refmovieFile1" clearable
v-model="imgName" filterable
:parms="parmsName" >
files <Option v-for="(t, i) in templates" :key="i" :value="t.id">{{
/> t.name
}}</Option>
</Select>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('template')" prop="template"> <FormItem :label="l('workFlows')" prop="workFlowIds">
<!-- <Input v-model="entity.template" type="textarea" :rows="5"></Input> --> <Select
<Select v-model="template" @on-select-change="setTemplate"> v-model="entity.workFlowIds"
<Option v-for="(t, i) in templates" :key="i" :value="t.id">{{ @on-change="setWorkFlows"
clearable
filterable
>
<Option v-for="(t, i) in workFlows" :key="i" :value="t.id">{{
t.name t.name
}}</Option> }}</Option>
</Select> </Select>
</FormItem> </FormItem>
</Col> </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"> <!-- <Col :span="24">
<FormItem :label="l('templateId')" prop="templateId"> <FormItem :label="l('templateId')" prop="templateId">
<Input v-model="entity.templateId"></Input> <Input v-model="entity.templateId"></Input>
...@@ -180,11 +186,9 @@ export default { ...@@ -180,11 +186,9 @@ export default {
name: "Add", name: "Add",
data() { data() {
return { return {
imgName: "",
parmsName: "app=material&eid=1&name=documentTemplate",
codeList: [], codeList: [],
temlplates: [], templates: [],
template: null, workFlows: [],
entity: { entity: {
creatorUserId: this.$store.state.userInfo.userId, creatorUserId: this.$store.state.userInfo.userId,
name: "", name: "",
...@@ -324,12 +328,12 @@ export default { ...@@ -324,12 +328,12 @@ export default {
align: "center", align: "center",
}, },
], ],
parms: { // parms: {
app: "material", // app: "material",
eid: null, // eid: null,
name: "", // name: "",
field: "", // field: "",
}, // },
}; };
}, },
props: { props: {
...@@ -339,8 +343,7 @@ export default { ...@@ -339,8 +343,7 @@ export default {
mounted() { mounted() {
this.tebleSet(); this.tebleSet();
this.loadTemplate(); this.loadTemplate();
this.parms.eid = this.$u.guid(); this.loadWorkFlows();
this.$refs.refFile.intFiles();
}, },
methods: { methods: {
tebleSet() { tebleSet() {
...@@ -358,11 +361,36 @@ export default { ...@@ -358,11 +361,36 @@ export default {
}; };
Api.filesList(data).then((r) => { Api.filesList(data).then((r) => {
if (r.result) { if (r.result) {
// this.templates = r.result; this.templates = r.result.items;
}
});
},
setTemplate(a) {
this.templates.forEach((r) => {
if (a == r.id) {
this.entity.template = r.name;
}
});
},
loadWorkFlows() {
let data = {
pageIndex: 1,
pageSize: 100,
conditions: [],
};
Api.getpaged(data).then((r) => {
if (r.result) {
this.workFlows = r.result.items;
}
});
},
setWorkFlows(a) {
this.workFlows.forEach((r) => {
if (a == r.id) {
this.entity.workFlows = r.name;
} }
}); });
}, },
setTemplate() {},
addNew() { addNew() {
let maxId = 0; let maxId = 0;
this.checkList.map((u) => { this.checkList.map((u) => {
...@@ -403,18 +431,6 @@ export default { ...@@ -403,18 +431,6 @@ export default {
handleSubmit() { handleSubmit() {
this.$refs.form.validate((v) => { this.$refs.form.validate((v) => {
if (v) { if (v) {
if (this.$refs.refFile.nameList.length > 0) {
let nameList = this.$refs.refFile.nameList;
let names = [];
nameList.forEach((e) => {
names.push(e.fileName);
});
this.entity.templateId = this.parms.eid;
this.entity.template = names.join(",");
} else {
// this.entity.filePath = "";
this.entity.templateId = "";
}
if (this.row.id) { if (this.row.id) {
this.entity.upId = this.row.id; this.entity.upId = this.row.id;
this.entity.level = this.row.level; this.entity.level = this.row.level;
...@@ -424,9 +440,15 @@ export default { ...@@ -424,9 +440,15 @@ export default {
this.entity.level = 1; this.entity.level = 1;
this.entity.inheritCategoryId = 0; this.entity.inheritCategoryId = 0;
} }
let pros = [];
if (this.inherit == 1) {
pros = [];
} else {
pros = this.checkList;
}
let data = { let data = {
cat: this.entity, cat: this.entity,
pros: this.checkList, pros: pros,
}; };
Api.create(data) Api.create(data)
.then((r) => { .then((r) => {
...@@ -459,15 +481,6 @@ export default { ...@@ -459,15 +481,6 @@ export default {
return this.$t(key); return this.$t(key);
}, },
}, },
watch: { watch: {},
// v() {
// this.entity = this.$u.clone(this.v);
// },
// eid(v) {
// if (v > 0) {
// this.load(v);
// }
// },
},
}; };
</script> </script>
\ No newline at end of file
...@@ -28,6 +28,11 @@ export default { ...@@ -28,6 +28,11 @@ export default {
return Api.get(`${systemUrl}/Dictionary/getChildren`,params); //字典 return Api.get(`${systemUrl}/Dictionary/getChildren`,params); //字典
}, },
filesList(params){ filesList(params){
return Api.post(`${material}/documenttemplate/paged`,params);//模板列表里获取上传列表 return Api.post(`${material}/documenttemplate/paged`,params);//模板列表
}, },
} getpaged(params) {
\ No newline at end of file return Api.post(`${workflowUrl}/schema/getpaged`, params);//流程列表
},
}
\ No newline at end of file
...@@ -53,29 +53,40 @@ ...@@ -53,29 +53,40 @@
</RadioGroup> </RadioGroup>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="24"> <Col :span="12">
<FormItem :label="l('description')" prop="description"> <FormItem :label="l('templateId')" prop="templateId">
<Input v-model="entity.description" type="textarea" :rows="5"></Input> <Select
v-model="entity.templateId"
@on-change="setTemplate"
clearable
filterable
>
<Option v-for="(t, i) in templates" :key="i" :value="t.id">{{
t.name
}}</Option>
</Select>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('template')" prop="template"> <FormItem :label="l('workFlows')" prop="workFlowIds">
<!-- <Input v-model="entity.template" type="textarea" :rows="5"></Input> --> <Select
<inputFile v-model="entity.workFlowIds"
class="tphoto" @on-change="setWorkFlows"
ref="refmovieFile1" clearable
v-model="imgName" filterable
:parms="parmsName" >
files <Option v-for="(t, i) in workFlows" :key="i" :value="t.id">{{
/> t.name
}}</Option>
</Select>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="24"> <Col :span="24">
<FormItem :label="l('template')" prop="templateId"> <FormItem :label="l('description')" prop="description">
<!-- <Input v-model="entity.template" type="textarea" :rows="5"></Input> --> <Input v-model="entity.description" type="textarea" :rows="5"></Input>
<files ref="refFile" :parms="parms" files />
</FormItem> </FormItem>
</Col> </Col>
<!-- <Col :span="24"> <!-- <Col :span="24">
<FormItem :label="l('templateId')" prop="templateId"> <FormItem :label="l('templateId')" prop="templateId">
<Input v-model="entity.templateId"></Input> <Input v-model="entity.templateId"></Input>
...@@ -176,13 +187,13 @@ export default { ...@@ -176,13 +187,13 @@ export default {
name: "Edit", name: "Edit",
data() { data() {
return { return {
imgName: "",
parmsName: "app=material&eid=1&name=documentTemplate", parmsName: "app=material&eid=1&name=documentTemplate",
codeList: [], codeList: [],
entity: {}, entity: {},
rules: { rules: {
name: [{ required: true, message: "必填", trigger: "blur" }], name: [{ required: true, message: "必填", trigger: "blur" }],
}, },
templates: [],
inherit: null, inherit: null,
checkList: [ checkList: [
{ {
...@@ -304,12 +315,6 @@ export default { ...@@ -304,12 +315,6 @@ export default {
align: "center", align: "center",
}, },
], ],
parms: {
app: "material",
eid: null,
name: "",
field: "",
},
}; };
}, },
props: { props: {
...@@ -317,11 +322,51 @@ export default { ...@@ -317,11 +322,51 @@ export default {
}, },
mounted() { mounted() {
this.tebleSet(); this.tebleSet();
this.loadTemplate();
this.loadWorkFlows();
if (this.eid > 0) { if (this.eid > 0) {
this.load(this.eid); this.load(this.eid);
} }
}, },
methods: { methods: {
loadTemplate() {
let data = {
pageIndex: 1,
pageSize: 100,
conditions: [],
};
Api.filesList(data).then((r) => {
if (r.result) {
this.templates = r.result.items;
}
});
},
setTemplate(a) {
this.templates.forEach((r) => {
if (a == r.id) {
this.entity.template = r.name;
}
});
},
loadWorkFlows() {
let data = {
pageIndex: 1,
pageSize: 100,
conditions: [],
};
Api.getpaged(data).then((r) => {
if (r.result) {
this.workFlows = r.result.items;
}
});
},
setWorkFlows(a) {
this.workFlows.forEach((r) => {
if (a == r.id) {
this.entity.workFlows = r.name;
}
});
},
tebleSet() { tebleSet() {
Api.getChildren({ id: 582 }).then((r) => { Api.getChildren({ id: 582 }).then((r) => {
if (r.result) { if (r.result) {
...@@ -329,10 +374,12 @@ export default { ...@@ -329,10 +374,12 @@ 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.parms.eid = r.result.templateId; this.entity.templateId = parseInt(r.result.templateId);
this.entity.workFlowIds = r.result.workFlowIds;
if (r.result.inheritCategoryId == 0) { if (r.result.inheritCategoryId == 0) {
this.inherit = "0"; this.inherit = "0";
} else { } else {
...@@ -398,20 +445,20 @@ export default { ...@@ -398,20 +445,20 @@ export default {
handleSubmit() { handleSubmit() {
this.$refs.form.validate((v) => { this.$refs.form.validate((v) => {
if (v) { if (v) {
if (this.$refs.refFile.nameList.length > 0) {
this.entity.templateId = this.parms.eid;
} else {
this.entity.templateId = "";
}
if (this.inherit == 0) { if (this.inherit == 0) {
this.entity.inheritCategoryId = 0; this.entity.inheritCategoryId = 0;
} else { } else {
this.entity.inheritCategoryId = this.entity.upId; this.entity.inheritCategoryId = this.entity.upId;
} }
let pros = [];
if (this.inherit == 1) {
pros = [];
} else {
pros = this.checkList;
}
let data = { let data = {
cat: this.entity, cat: this.entity,
pros: this.checkList, pros: pros,
}; };
Api.update(data) Api.update(data)
......
...@@ -172,6 +172,7 @@ ...@@ -172,6 +172,7 @@
<Col :span="12"> <Col :span="12">
<FormItem :label="l('status')" prop="status"> <FormItem :label="l('status')" prop="status">
<Dictionary <Dictionary
disabled
code="word.document.status" code="word.document.status"
v-model="entity.status" v-model="entity.status"
></Dictionary> ></Dictionary>
...@@ -217,29 +218,24 @@ ...@@ -217,29 +218,24 @@
</Col> </Col>
</Row> </Row>
</Form> </Form>
<!-- <Modal v-model="modal" title="文档送审" footer-hide fullscreen :mask-closable="false">
<Submit :isId="isId" ref="submit" @on-close="close"></Submit>
</Modal>-->
</div> </div>
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
// import Submit from "./submit";
export default { export default {
name: "Add", name: "Add",
components: { components: {},
// Submit,
},
data() { data() {
return { return {
// modal: false, // modal: false,
isId: "",
imgName: "", imgName: "",
avatorPath: "", avatorPath: "",
fileds: [], //扩展属性 fileds: [], //扩展属性
entity: { entity: {
creatorUserId: this.$store.state.userInfo.userId, creatorUserId: this.$store.state.userInfo.userId,
status: "", status: 0,
categoryId: this.treeId, categoryId: this.treeId,
img: "", img: "",
// title: "", // title: "",
...@@ -279,7 +275,7 @@ export default { ...@@ -279,7 +275,7 @@ export default {
props: { props: {
v: Object, v: Object,
treeId: Number, treeId: Number,
eid: String, eid: Number,
}, },
created() {}, created() {},
mounted() { mounted() {
...@@ -330,18 +326,14 @@ export default { ...@@ -330,18 +326,14 @@ export default {
} }
if (this.$refs.refFile.nameList.length > 0) { if (this.$refs.refFile.nameList.length > 0) {
this.entity.filePath = this.parms.eid; this.entity.filePath = this.parms.eid;
this.entity.status = 1;
} else { } else {
this.entity.filePath = ""; this.entity.filePath = "";
this.entity.status = 0;
} }
Api.create(this.entity) Api.create(this.entity)
.then((r) => { .then((r) => {
if (r.success) { if (r.success) {
// if (this.entity.status == 1) {
// this.modal = true;
// this.isId = r.result.id;
// } else {
// this.modal = false;
// }
this.$Message.success("保存成功"); this.$Message.success("保存成功");
this.$emit("on-ok"); this.$emit("on-ok");
} else { } else {
......
...@@ -27,4 +27,7 @@ export default { ...@@ -27,4 +27,7 @@ export default {
listbyid(params){ listbyid(params){
return Api.get(`${material}/documentpropertydefinition/listbyid`,params); return Api.get(`${material}/documentpropertydefinition/listbyid`,params);
}, },
batchstart(params) {
return Api.post(`${workflowUrl}/instance/batchstart`, params); //送审
},
} }
\ No newline at end of file
...@@ -304,8 +304,10 @@ export default { ...@@ -304,8 +304,10 @@ export default {
if (v) { if (v) {
if (this.$refs.refFile.nameList.length > 0) { if (this.$refs.refFile.nameList.length > 0) {
this.entity.filePath = this.parms.eid; this.entity.filePath = this.parms.eid;
this.entity.status = 1; //上传文件后状态变为工作中
} else { } else {
this.entity.filePath = ""; this.entity.filePath = "";
this.entity.status = 0; //默认私有
} }
Api.update(this.entity) Api.update(this.entity)
.then((r) => { .then((r) => {
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
</a> </a>
</div> </div>
<Content :class="!showMenu ? 'con_bord' : ''"> <Content :class="!showMenu ? 'con_bord' : ''">
<Word ref="dataTable" :treeId="treeId" :addShow="addShow" :ids="ids" /> <Word ref="dataTable" :treeId="treeId" :addShow="addShow" :ids="ids" :workFlowIds="workFlowIds"/>
</Content> </Content>
</Layout> </Layout>
</div> </div>
...@@ -70,6 +70,7 @@ export default { ...@@ -70,6 +70,7 @@ export default {
treeId: 0, treeId: 0,
addShow: false, addShow: false,
ids: [], ids: [],
workFlowIds:''
}; };
}, },
mounted() { mounted() {
...@@ -127,6 +128,7 @@ export default { ...@@ -127,6 +128,7 @@ export default {
"upId" "upId"
); );
this.list = this.$u.clone(data); this.list = this.$u.clone(data);
// console.log(this.list);
}); });
}, },
toggle() { toggle() {
...@@ -141,8 +143,9 @@ export default { ...@@ -141,8 +143,9 @@ export default {
}, },
change(a, b) { change(a, b) {
// console.log(a) // console.log(a)
console.log(b); console.log(b);
this.treeId = b.id; this.treeId = b.id;
this.workFlowIds=b.workFlowIds //流程id
// if (b.children.length == 0) { //判断最底层才能添加文档 // if (b.children.length == 0) { //判断最底层才能添加文档
// this.addShow = true; // this.addShow = true;
// this.$refs.dataTable.$refs.grid.reload(this.easySearch); // this.$refs.dataTable.$refs.grid.reload(this.easySearch);
...@@ -166,47 +169,31 @@ export default { ...@@ -166,47 +169,31 @@ export default {
this.ids = ids; this.ids = ids;
}, },
renderContent(h, { root, node, data }) { renderContent(h, { root, node, data }) {
return h( let type = "";
"span", if (data.type == 0) {
{ type = "md-folder";
on: { } else if (data.type == 1) {
click: () => { type = "ios-copy";
this.handleSelect(root, data); //手动选择树节点 } else {
}, type = "ios-book";
}
return h("span", [
h("Icon", {
props: {
type: type,
}, },
}, style: {
data.title marginRight: "8px",
); },
}, }),
handleSelect(root, data) { h(
// let pid = -1; //定义最顶级id "span",
// var pname = "";
// var upId = data.upId; data.title
// let roots = root; ),
// function addId(roots, upId) { ]);
// roots.map((u) => {
// if (u.node.id == upId) {
// if (u.node.upId == 0) {
// pid = u.node.id;
// pname = u.node.name;
// } else {
// upId = u.node.upId;
// addId(roots, upId);
// }
// }
// });
// }
// addId(roots, upId);
// this.nodeInfo.categoryId = data.id;
// this.nodeInfo.rootCategoryName = data.name;
// if (pid == -1) {
// this.nodeInfo.rootCategoryId = data.id;
// this.nodeInfo.rootCategoryName = data.name;
// } else {
// this.nodeInfo.rootCategoryId = pid;
// this.nodeInfo.rootCategoryName = pname;
// }
}, },
showMenuFn() { showMenuFn() {
//this.$Message.info("展开左侧树") //this.$Message.info("展开左侧树")
this.showMenu = true; this.showMenu = true;
......
<template> <template>
<div class=".detail-document"> <div class=".detail-document">
<div class="body-document"> {{ workFlowIds }}
<div class="body-document" v-if="eid != 0">
<h4>详细信息</h4> <h4>详细信息</h4>
<Row> <Row>
<Col span="20"> <Col span="20">
<div class="new-detail detail-d"> <div class="new-detail detail-d">
<Row> <Row>
<Filed v-for="li in fileds" :key="li.field" :span="li.span" :name="li.title+':'"> <Filed
<State v-if="li.dataType==3" :code="li.note" :value="entity[li.field]" /> v-for="li in fileds"
<div v-else-if="li.dataType==8">{{entity[li.field]}}</div> :key="li.field"
<div v-else-if="li.dataType==5" v-html="entity[li.field]"></div> :span="li.span"
<DTSpan v-else-if="li.dataType==4" :value="entity[li.field]" /> :name="li.title + ':'"
<span v-else>{{entity[li.field]}}</span> >
<State <State
v-if="li.unitName&&(li.dataType==1||li.dataType==2)" 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" :code="li.note"
:value="entity[li.field]" :value="entity[li.field]"
/> />
</Filed> </Filed>
</Row> </Row>
<Row class="filed-d"> <Row class="filed-d">
<Filed :span="12" :name="l('creationTime')+':'">{{entity.creationTime}}</Filed> <Filed :span="12" :name="l('creationTime') + ':'">{{
<Filed :span="12" :name="l('creatorUserId')+':'"> entity.creationTime
}}</Filed>
<Filed :span="12" :name="l('creatorUserId') + ':'">
<User :value="entity.creatorUserId" /> <User :value="entity.creatorUserId" />
</Filed> </Filed>
<Filed :span="12" :name="l('status')+':'">{{entity.status==0?'草稿':'送审'}}</Filed> <Filed :span="12" :name="l('status') + ':'">{{
<Filed :span="24" :name="l('filePath')+':'"> entity.status == 0 ? "草稿" : "送审"
}}</Filed>
<Filed :span="24" :name="l('filePath') + ':'">
<files ref="refFile" :parms="parms" :showList="false" /> <files ref="refFile" :parms="parms" :showList="false" />
</Filed> </Filed>
</Row> </Row>
...@@ -33,27 +53,91 @@ ...@@ -33,27 +53,91 @@
</Col> </Col>
<Col span="4" class="dcm-right"> <Col span="4" class="dcm-right">
<div class="img-touxiang"> <div class="img-touxiang">
<img :src="downUrl+avatorPath" v-if="avatorPath" /> <img :src="downUrl + avatorPath" v-if="avatorPath" />
<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> </div>
</Col> </Col>
</Row> </Row>
</div> </div>
<!-- <DataGrid
v-else
:columns="cols"
ref="grid"
:conditions="easySearch"
:action="action"
:initsearch="sets"
:tool="false"
:page="false"
:height="300"
:format="formatFun"
/> -->
<DataGrid
v-else
:height="300"
:columns="columns"
ref="grid"
:action="action"
:conditions="easySearch"
:high="false"
:tool="false"
:page="false"
:format="formatFun"
/>
<Process ref="userProcess" :schemaIdVal="workFlowIds" />
<div slot="footer">
<Button @click="modalInfo">取消</Button>
<Button type="primary" @click="upSave">确定送审</Button>
</div>
<!-- 信息提示 -->
<Modal
v-model="ModalInfo"
title="信息提示"
width="600"
:mask-closable="false"
:scrollable="true"
ok-text="确定"
cancel-text="取消"
>
{{ metCodesStrTxt }}
<div slot="footer">
<Button @click="ModalInfo = false">取消</Button>
<Button type="primary" @click="modalInfoOk">确定</Button>
</div>
</Modal>
</div> </div>
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
import Process from "@/components/orderOperator/process";
export default { export default {
name: "Add", name: "submit",
components: {
Process,
},
data() { data() {
return { return {
action: Api.index,
avatorPath: "", avatorPath: "",
downUrl: fileUrlDown, downUrl: fileUrlDown,
entity: {}, entity: {},
ModalInfo: false,
metCodesStrTxt: "",
rules: { rules: {
name: [{ required: true, message: "必填", trigger: "blur" }], name: [{ required: true, message: "必填", trigger: "blur" }],
code: [{ required: true, message: "必填", trigger: "blur" }], code: [{ required: true, message: "必填", trigger: "blur" }],
}, },
easySearch: {
keys: { op: "refName,name", value: null },
categoryId: {
op: "In",
value: this.ids,
},
},
fileds: [], fileds: [],
parms: { parms: {
app: "material", app: "material",
...@@ -61,14 +145,78 @@ export default { ...@@ -61,14 +145,78 @@ export default {
name: "", name: "",
field: "", field: "",
}, },
dataListRetrunNew: {
schemaId: this.workFlowIds, //流程id
idList: [], //合格证id List
codeList: [], //合格证编号List
operatorIdList: [], //操作员id
}, //确定后返回
columns: [
{
type: "selection",
width: 70,
align: "center",
},
{
key: "id",
title: this.$t("id"),
hide: true,
align: "left",
high: true,
},
{ key: "name", title: this.l("title"), align: "left", high: true },
{
key: "creationTime",
title: this.l("creationTime"),
align: "left",
easy: true,
high: true,
},
{
key: "code",
title: this.l("name"),
align: "left",
high: true,
},
{
key: "status",
title: this.l("status"),
align: "left",
high: true,
code: "word.document.status",
},
{
key: "version",
title: this.l("revision"),
align: "left",
high: true,
},
{
key: "creatorUserId",
title: this.l("creatorUserId"),
align: "left",
high: true,
type: "user",
},
],
}; };
}, },
props: ["eid", "treeId"],
props: ["eid", "ids", "treeId", "rowsTable", "workFlowIds"],
mounted() { mounted() {
this.dataListRetrunNew.schemaId = this.workFlowIds;
this.initFiled(); this.initFiled();
this.parms.eid = this.$u.guid(); this.parms.eid = this.$u.guid();
}, },
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: { methods: {
//格式化原始数据
formatFun(data) {
data = this.rowsTable;
return data;
},
load(v) { load(v) {
Api.get({ id: v }).then((r) => { Api.get({ id: v }).then((r) => {
this.entity = r.result; this.entity = r.result;
...@@ -111,6 +259,60 @@ export default { ...@@ -111,6 +259,60 @@ export default {
handleClose() { handleClose() {
this.$emit("on-close"); this.$emit("on-close");
}, },
upSave() {
this.dataListRetrunNew.idList = [];
this.dataListRetrunNew.codeList = [];
let codeList = [];
let idList = [];
if (this.eid !== 0) {
if (this.entity.code != 0) {
codeList.push(this.entity.code);
} else {
codeList.push(this.eid);
}
idList.push(this.eid);
} else {
this.rowsTable.forEach((e) => {
idList.push(e.id);
if (e.code) {
codeList.push(e.code);
} else {
codeList.push(e.id);
}
});
}
this.dataListRetrunNew.idList = idList;
this.dataListRetrunNew.codeList = codeList;
let metCodesStr = JSON.stringify(codeList)
.replace("[", "")
.replace("]", "")
.replace(/\"/g, "");
this.ModalInfoStaut = "orderSendReview";
this.metCodesStrTxt = "确定送审此文档吗? ";
this.ModalInfo = true;
},
returnDataList() {
let ues = this.$refs.userProcess;
this.dataListRetrunNew.operatorIdList = ues.immutData;
alert(JSON.stringify(this.dataListRetrunNew));
// //返回审批数据
return this.dataListRetrunNew;
},
modalInfoOk() {
let ues = this.$refs.userProcess;
this.dataListRetrunNew.operatorIdList = ues.immutData;
Api.batchstart(this.dataListRetrunNew).then((r) => {
if (r.success) {
this.ModalInfo = false;
this.$Message.success("送审成功");
this.$emit("on-close");
this.$emit("on-ok");
}
});
},
modalInfo() {
this.$emit("on-close");
},
l(key) { l(key) {
key = "document_property_definition" + "." + key; key = "document_property_definition" + "." + key;
return this.$t(key); return this.$t(key);
...@@ -160,7 +362,7 @@ export default { ...@@ -160,7 +362,7 @@ export default {
} }
} }
.detail-d { .detail-d {
padding-left: 20px; padding: 10px;
.filed-d { .filed-d {
border-top: 1px solid #e0e0e0; border-top: 1px solid #e0e0e0;
} }
......
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
:type="typeInfo" :type="typeInfo"
:span="6" :span="6"
:lazy="true" :lazy="true"
:format="formatFun"
@on-selection-change="onSelect"
> >
<template slot="easySearch"> <template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline> <Form ref="formInline" :model="easySearch" inline>
...@@ -35,6 +37,9 @@ ...@@ -35,6 +37,9 @@
@click="changeShwo" @click="changeShwo"
></Button> ></Button>
</template> </template>
<template slot="batch">
<Button type="primary" @click="modalSchedule">批量送审</Button>
</template>
<template slot="card" slot-scope="{ row }"> <template slot="card" slot-scope="{ row }">
<div class="body-card"> <div class="body-card">
<Row class="title-i"> <Row class="title-i">
...@@ -80,6 +85,10 @@ ...@@ -80,6 +85,10 @@
<a @click="remove(row.id)"> <Icon type="ios-trash" />删除 </a <a @click="remove(row.id)"> <Icon type="ios-trash" />删除 </a
>&nbsp; >&nbsp;
<a @click="view(row.id)"> <Icon type="md-document" />详情 </a> <a @click="view(row.id)"> <Icon type="md-document" />详情 </a>
&nbsp;
<a @click="sub(row.id)" v-if="row.status == 1">
<Icon type="md-color-wand" />送审
</a>
</div> </div>
</Col> </Col>
</Row> </Row>
...@@ -97,7 +106,10 @@ ...@@ -97,7 +106,10 @@
<component <component
:is="detail" :is="detail"
:eid="curId" :eid="curId"
ids:ids
:treeId="treeId" :treeId="treeId"
:rowsTable="rowsTable"
:workFlowIds="workFlowIds"
@on-close="cancel" @on-close="cancel"
@on-ok="ok" @on-ok="ok"
/> />
...@@ -124,6 +136,11 @@ export default { ...@@ -124,6 +136,11 @@ export default {
curId: 0, curId: 0,
downUrl: fileUrlDown, downUrl: fileUrlDown,
columns: [ columns: [
{
type: "selection",
width: 70,
align: "center",
},
{ {
key: "id", key: "id",
title: this.$t("id"), title: this.$t("id"),
...@@ -150,11 +167,7 @@ export default { ...@@ -150,11 +167,7 @@ export default {
title: this.l("status"), title: this.l("status"),
align: "left", align: "left",
high: true, high: true,
render: (h, params) => { code: "word.document.status",
return h("div", [
h("span", params.row.status == 0 ? "草稿" : "送审"),
]);
},
}, },
{ {
key: "version", key: "version",
...@@ -172,8 +185,8 @@ export default { ...@@ -172,8 +185,8 @@ export default {
{ {
title: "操作", title: "操作",
key: "action", key: "action",
width: 140, width: 180,
align: "center", align: "left",
render: (h, params) => { render: (h, params) => {
return h("div", { class: "action" }, [ return h("div", { class: "action" }, [
h( h(
...@@ -201,6 +214,14 @@ export default { ...@@ -201,6 +214,14 @@ export default {
}, },
"删除" "删除"
), ),
h(
"op",
{
attrs: { oprate: "detail" },
on: { click: () => this.sub(params.row.id) },
},
params.row.status == 1 ? "送审" : ""
),
]); ]);
}, },
}, },
...@@ -210,18 +231,38 @@ export default { ...@@ -210,18 +231,38 @@ export default {
titleInfo: "卡片模式", titleInfo: "卡片模式",
ModalIm: false, ModalIm: false,
temTitle: "文档管理", temTitle: "文档管理",
selectRows: [],
rowsTable: [],
}; };
}, },
props: { props: {
treeId: Number, treeId: Number,
addShow: Boolean, addShow: Boolean,
ids: Array, ids: Array,
workFlowIds: String,
}, },
async fetch({ store, params }) { async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
mounted() {}, mounted() {},
methods: { methods: {
//格式化原始数据
formatFun(data) {
data.map((e) => {
if (e.status == 1) {
e._disabled = false;
} else {
e._disabled = true;
}
});
return data;
},
onSelect(a, b) {
// console.log(a);
// console.log(b);
//批量选择
this.selectRows = a;
},
changeShwo() { changeShwo() {
//显示模式切换 //显示模式切换
if (this.typeInfo == "card") { if (this.typeInfo == "card") {
...@@ -257,7 +298,21 @@ export default { ...@@ -257,7 +298,21 @@ export default {
// } // }
} }
}, },
sub(id) {
this.fullscreen = true;
this.curId = id;
this.title = "文档送审";
this.detail = () => import("./submit");
this.modal = true;
},
modalSchedule() {
this.fullscreen = true;
this.rowsTable = this.selectRows;
this.title = "文档送审";
this.curId = 0;
this.detail = () => import("./submit");
this.modal = true;
},
view(id) { view(id) {
this.fullscreen = true; this.fullscreen = true;
this.curId = id; this.curId = id;
...@@ -361,7 +416,7 @@ export default { ...@@ -361,7 +416,7 @@ export default {
.c { .c {
padding-left: 8px; padding-left: 8px;
div { div {
height: 18px; height: 25px;
} }
} }
.shuo-ming { .shuo-ming {
......
...@@ -92,8 +92,7 @@ export default { ...@@ -92,8 +92,7 @@ export default {
status: 1, status: 1,
creator: "", creator: "",
remark: "", remark: "",
template: "", //上传名称 url: "",
templateId: "", //上传id
}, },
rules: { rules: {
name: [{ required: true, message: "必填", trigger: "blur" }], name: [{ required: true, message: "必填", trigger: "blur" }],
...@@ -105,19 +104,11 @@ export default { ...@@ -105,19 +104,11 @@ export default {
v: Object, v: Object,
eid: Number, eid: Number,
}, },
mounted() { mounted() {},
// this.parms.eid = this.$u.guid();
// this.$refs.refFile.intFiles();
},
methods: { methods: {
handleSubmit() { handleSubmit() {
this.$refs.form.validate((v) => { this.$refs.form.validate((v) => {
if (v) { if (v) {
// if (this.$refs.refFile.nameList.length > 0) {
// this.entity.url = this.parms.eid;
// } else {
// this.entity.url = "";
// }
Api.create(this.entity) Api.create(this.entity)
.then((r) => { .then((r) => {
if (r.success) { if (r.success) {
...@@ -147,8 +138,7 @@ export default { ...@@ -147,8 +138,7 @@ export default {
imgName(newName, oldName) { imgName(newName, oldName) {
if (newName != "") { if (newName != "") {
const imgPathsArr = JSON.parse(newName); const imgPathsArr = JSON.parse(newName);
this.entity.templateId = imgPathsArr[0].filePath; this.entity.url = imgPathsArr[0].filePath;
this.entity.template = imgPathsArr[0].fileName;
} }
}, },
}, },
......
...@@ -56,6 +56,7 @@ ...@@ -56,6 +56,7 @@
</FormItem> </FormItem>
</Col>--> </Col>-->
<Col :span="12"> <Col :span="12">
{{imgName}}
<FormItem :label="l('url')" prop="url"> <FormItem :label="l('url')" prop="url">
<inputFile <inputFile
class="tphoto" class="tphoto"
...@@ -104,7 +105,8 @@ export default { ...@@ -104,7 +105,8 @@ 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.entity.imgName = r.result.templateId; this.entity.url = r.result.url;
this.imgName = r.result.url;
}); });
}, },
handleSubmit() { handleSubmit() {
...@@ -138,8 +140,7 @@ export default { ...@@ -138,8 +140,7 @@ export default {
imgName(newName, oldName) { imgName(newName, oldName) {
if (newName != "") { if (newName != "") {
const imgPathsArr = JSON.parse(newName); const imgPathsArr = JSON.parse(newName);
this.entity.templateId = imgPathsArr[0].filePath; this.entity.url = imgPathsArr[0].filePath;
this.entity.template = imgPathsArr[0].fileName;
} }
}, },
eid(v) { eid(v) {
......
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