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 {
englishName:'英文简称',
status:'',
inheritCategoryId:'继承', //继承分类id
template:'上传模板', //模板路径
templateId:'',
// url:'上传模板', //模板路径
template:'模板Id', //模板路径
templateId:'选择模板',
status:'状态',
workFlows:'选择流程',
workFlowIds:'流程Id',
description:'备注'
},
document_template:{
......
......@@ -52,34 +52,40 @@
</RadioGroup>
</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="12">
<FormItem :label="l('template')" prop="template">
<!-- <Input v-model="entity.template" type="textarea" :rows="5"></Input> -->
<inputFile
class="tphoto"
ref="refmovieFile1"
v-model="imgName"
:parms="parmsName"
files
/>
<FormItem :label="l('templateId')" prop="templateId">
<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>
</Col>
<Col :span="12">
<FormItem :label="l('template')" prop="template">
<!-- <Input v-model="entity.template" type="textarea" :rows="5"></Input> -->
<Select v-model="template" @on-select-change="setTemplate">
<Option v-for="(t, i) in templates" :key="i" :value="t.id">{{
<FormItem :label="l('workFlows')" prop="workFlowIds">
<Select
v-model="entity.workFlowIds"
@on-change="setWorkFlows"
clearable
filterable
>
<Option v-for="(t, i) in workFlows" :key="i" :value="t.id">{{
t.name
}}</Option>
</Select>
</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>
......@@ -180,11 +186,9 @@ export default {
name: "Add",
data() {
return {
imgName: "",
parmsName: "app=material&eid=1&name=documentTemplate",
codeList: [],
temlplates: [],
template: null,
templates: [],
workFlows: [],
entity: {
creatorUserId: this.$store.state.userInfo.userId,
name: "",
......@@ -324,12 +328,12 @@ export default {
align: "center",
},
],
parms: {
app: "material",
eid: null,
name: "",
field: "",
},
// parms: {
// app: "material",
// eid: null,
// name: "",
// field: "",
// },
};
},
props: {
......@@ -339,8 +343,7 @@ export default {
mounted() {
this.tebleSet();
this.loadTemplate();
this.parms.eid = this.$u.guid();
this.$refs.refFile.intFiles();
this.loadWorkFlows();
},
methods: {
tebleSet() {
......@@ -358,11 +361,36 @@ export default {
};
Api.filesList(data).then((r) => {
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() {
let maxId = 0;
this.checkList.map((u) => {
......@@ -403,18 +431,6 @@ export default {
handleSubmit() {
this.$refs.form.validate((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) {
this.entity.upId = this.row.id;
this.entity.level = this.row.level;
......@@ -424,9 +440,15 @@ export default {
this.entity.level = 1;
this.entity.inheritCategoryId = 0;
}
let pros = [];
if (this.inherit == 1) {
pros = [];
} else {
pros = this.checkList;
}
let data = {
cat: this.entity,
pros: this.checkList,
pros: pros,
};
Api.create(data)
.then((r) => {
......@@ -459,15 +481,6 @@ export default {
return this.$t(key);
},
},
watch: {
// v() {
// this.entity = this.$u.clone(this.v);
// },
// eid(v) {
// if (v > 0) {
// this.load(v);
// }
// },
},
watch: {},
};
</script>
\ No newline at end of file
......@@ -28,6 +28,11 @@ export default {
return Api.get(`${systemUrl}/Dictionary/getChildren`,params); //字典
},
filesList(params){
return Api.post(`${material}/documenttemplate/paged`,params);//模板列表里获取上传列表
},
}
\ No newline at end of file
return Api.post(`${material}/documenttemplate/paged`,params);//模板列表
},
getpaged(params) {
return Api.post(`${workflowUrl}/schema/getpaged`, params);//流程列表
},
}
\ No newline at end of file
......@@ -53,29 +53,40 @@
</RadioGroup>
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('description')" prop="description">
<Input v-model="entity.description" type="textarea" :rows="5"></Input>
<Col :span="12">
<FormItem :label="l('templateId')" prop="templateId">
<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>
</Col>
<Col :span="12">
<FormItem :label="l('template')" prop="template">
<!-- <Input v-model="entity.template" type="textarea" :rows="5"></Input> -->
<inputFile
class="tphoto"
ref="refmovieFile1"
v-model="imgName"
:parms="parmsName"
files
/>
<FormItem :label="l('workFlows')" prop="workFlowIds">
<Select
v-model="entity.workFlowIds"
@on-change="setWorkFlows"
clearable
filterable
>
<Option v-for="(t, i) in workFlows" :key="i" :value="t.id">{{
t.name
}}</Option>
</Select>
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('template')" prop="templateId">
<!-- <Input v-model="entity.template" type="textarea" :rows="5"></Input> -->
<files ref="refFile" :parms="parms" files />
<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>
......@@ -176,13 +187,13 @@ export default {
name: "Edit",
data() {
return {
imgName: "",
parmsName: "app=material&eid=1&name=documentTemplate",
codeList: [],
entity: {},
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }],
},
templates: [],
inherit: null,
checkList: [
{
......@@ -304,12 +315,6 @@ export default {
align: "center",
},
],
parms: {
app: "material",
eid: null,
name: "",
field: "",
},
};
},
props: {
......@@ -317,11 +322,51 @@ export default {
},
mounted() {
this.tebleSet();
this.loadTemplate();
this.loadWorkFlows();
if (this.eid > 0) {
this.load(this.eid);
}
},
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() {
Api.getChildren({ id: 582 }).then((r) => {
if (r.result) {
......@@ -329,10 +374,12 @@ export default {
}
});
},
load(v) {
Api.get({ id: v }).then((r) => {
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) {
this.inherit = "0";
} else {
......@@ -398,20 +445,20 @@ export default {
handleSubmit() {
this.$refs.form.validate((v) => {
if (v) {
if (this.$refs.refFile.nameList.length > 0) {
this.entity.templateId = this.parms.eid;
} else {
this.entity.templateId = "";
}
if (this.inherit == 0) {
this.entity.inheritCategoryId = 0;
} else {
this.entity.inheritCategoryId = this.entity.upId;
}
let pros = [];
if (this.inherit == 1) {
pros = [];
} else {
pros = this.checkList;
}
let data = {
cat: this.entity,
pros: this.checkList,
pros: pros,
};
Api.update(data)
......
......@@ -172,6 +172,7 @@
<Col :span="12">
<FormItem :label="l('status')" prop="status">
<Dictionary
disabled
code="word.document.status"
v-model="entity.status"
></Dictionary>
......@@ -217,29 +218,24 @@
</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,
},
components: {},
data() {
return {
// modal: false,
isId: "",
imgName: "",
avatorPath: "",
fileds: [], //扩展属性
entity: {
creatorUserId: this.$store.state.userInfo.userId,
status: "",
status: 0,
categoryId: this.treeId,
img: "",
// title: "",
......@@ -279,7 +275,7 @@ export default {
props: {
v: Object,
treeId: Number,
eid: String,
eid: Number,
},
created() {},
mounted() {
......@@ -330,18 +326,14 @@ export default {
}
if (this.$refs.refFile.nameList.length > 0) {
this.entity.filePath = this.parms.eid;
this.entity.status = 1;
} else {
this.entity.filePath = "";
this.entity.status = 0;
}
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 {
......
......@@ -27,4 +27,7 @@ export default {
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 {
if (v) {
if (this.$refs.refFile.nameList.length > 0) {
this.entity.filePath = this.parms.eid;
this.entity.status = 1; //上传文件后状态变为工作中
} else {
this.entity.filePath = "";
this.entity.status = 0; //默认私有
}
Api.update(this.entity)
.then((r) => {
......
......@@ -42,7 +42,7 @@
</a>
</div>
<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>
</Layout>
</div>
......@@ -70,6 +70,7 @@ export default {
treeId: 0,
addShow: false,
ids: [],
workFlowIds:''
};
},
mounted() {
......@@ -127,6 +128,7 @@ export default {
"upId"
);
this.list = this.$u.clone(data);
// console.log(this.list);
});
},
toggle() {
......@@ -141,8 +143,9 @@ export default {
},
change(a, b) {
// console.log(a)
console.log(b);
console.log(b);
this.treeId = b.id;
this.workFlowIds=b.workFlowIds //流程id
// if (b.children.length == 0) { //判断最底层才能添加文档
// this.addShow = true;
// this.$refs.dataTable.$refs.grid.reload(this.easySearch);
......@@ -166,47 +169,31 @@ export default {
this.ids = ids;
},
renderContent(h, { root, node, data }) {
return h(
"span",
{
on: {
click: () => {
this.handleSelect(root, data); //手动选择树节点
},
let type = "";
if (data.type == 0) {
type = "md-folder";
} else if (data.type == 1) {
type = "ios-copy";
} else {
type = "ios-book";
}
return h("span", [
h("Icon", {
props: {
type: type,
},
},
data.title
);
},
handleSelect(root, data) {
// let pid = -1; //定义最顶级id
// var pname = "";
// var upId = data.upId;
// 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;
// }
style: {
marginRight: "8px",
},
}),
h(
"span",
data.title
),
]);
},
showMenuFn() {
//this.$Message.info("展开左侧树")
this.showMenu = true;
......
<template>
<div class=".detail-document">
<div class="body-document">
{{ workFlowIds }}
<div class="body-document" v-if="eid != 0">
<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>
<Filed
v-for="li in fileds"
:key="li.field"
:span="li.span"
:name="li.title + ':'"
>
<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"
: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')+':'">
<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')+':'">
<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>
......@@ -33,27 +53,91 @@
</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%" />
<img :src="downUrl + avatorPath" v-if="avatorPath" />
<img
src="@/assets/images/files_header.png"
v-else
width="100%"
height="100%"
/>
</div>
</Col>
</Row>
</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>
</template>
<script>
import Api from "./api";
import Process from "@/components/orderOperator/process";
export default {
name: "Add",
name: "submit",
components: {
Process,
},
data() {
return {
action: Api.index,
avatorPath: "",
downUrl: fileUrlDown,
entity: {},
ModalInfo: false,
metCodesStrTxt: "",
rules: {
name: [{ 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: [],
parms: {
app: "material",
......@@ -61,14 +145,78 @@ export default {
name: "",
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() {
this.dataListRetrunNew.schemaId = this.workFlowIds;
this.initFiled();
this.parms.eid = this.$u.guid();
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: {
//格式化原始数据
formatFun(data) {
data = this.rowsTable;
return data;
},
load(v) {
Api.get({ id: v }).then((r) => {
this.entity = r.result;
......@@ -111,6 +259,60 @@ export default {
handleClose() {
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) {
key = "document_property_definition" + "." + key;
return this.$t(key);
......@@ -160,7 +362,7 @@ export default {
}
}
.detail-d {
padding-left: 20px;
padding: 10px;
.filed-d {
border-top: 1px solid #e0e0e0;
}
......
......@@ -9,6 +9,8 @@
:type="typeInfo"
:span="6"
:lazy="true"
:format="formatFun"
@on-selection-change="onSelect"
>
<template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline>
......@@ -35,6 +37,9 @@
@click="changeShwo"
></Button>
</template>
<template slot="batch">
<Button type="primary" @click="modalSchedule">批量送审</Button>
</template>
<template slot="card" slot-scope="{ row }">
<div class="body-card">
<Row class="title-i">
......@@ -80,6 +85,10 @@
<a @click="remove(row.id)"> <Icon type="ios-trash" />删除 </a
>&nbsp;
<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>
</Col>
</Row>
......@@ -97,7 +106,10 @@
<component
:is="detail"
:eid="curId"
ids:ids
:treeId="treeId"
:rowsTable="rowsTable"
:workFlowIds="workFlowIds"
@on-close="cancel"
@on-ok="ok"
/>
......@@ -124,6 +136,11 @@ export default {
curId: 0,
downUrl: fileUrlDown,
columns: [
{
type: "selection",
width: 70,
align: "center",
},
{
key: "id",
title: this.$t("id"),
......@@ -150,11 +167,7 @@ export default {
title: this.l("status"),
align: "left",
high: true,
render: (h, params) => {
return h("div", [
h("span", params.row.status == 0 ? "草稿" : "送审"),
]);
},
code: "word.document.status",
},
{
key: "version",
......@@ -172,8 +185,8 @@ export default {
{
title: "操作",
key: "action",
width: 140,
align: "center",
width: 180,
align: "left",
render: (h, params) => {
return h("div", { class: "action" }, [
h(
......@@ -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 {
titleInfo: "卡片模式",
ModalIm: false,
temTitle: "文档管理",
selectRows: [],
rowsTable: [],
};
},
props: {
treeId: Number,
addShow: Boolean,
ids: Array,
workFlowIds: String,
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
mounted() {},
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() {
//显示模式切换
if (this.typeInfo == "card") {
......@@ -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) {
this.fullscreen = true;
this.curId = id;
......@@ -361,7 +416,7 @@ export default {
.c {
padding-left: 8px;
div {
height: 18px;
height: 25px;
}
}
.shuo-ming {
......
......@@ -92,8 +92,7 @@ export default {
status: 1,
creator: "",
remark: "",
template: "", //上传名称
templateId: "", //上传id
url: "",
},
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }],
......@@ -105,19 +104,11 @@ export default {
v: Object,
eid: Number,
},
mounted() {
// this.parms.eid = this.$u.guid();
// this.$refs.refFile.intFiles();
},
mounted() {},
methods: {
handleSubmit() {
this.$refs.form.validate((v) => {
if (v) {
// if (this.$refs.refFile.nameList.length > 0) {
// this.entity.url = this.parms.eid;
// } else {
// this.entity.url = "";
// }
Api.create(this.entity)
.then((r) => {
if (r.success) {
......@@ -147,8 +138,7 @@ export default {
imgName(newName, oldName) {
if (newName != "") {
const imgPathsArr = JSON.parse(newName);
this.entity.templateId = imgPathsArr[0].filePath;
this.entity.template = imgPathsArr[0].fileName;
this.entity.url = imgPathsArr[0].filePath;
}
},
},
......
......@@ -56,6 +56,7 @@
</FormItem>
</Col>-->
<Col :span="12">
{{imgName}}
<FormItem :label="l('url')" prop="url">
<inputFile
class="tphoto"
......@@ -104,7 +105,8 @@ export default {
load(v) {
Api.get({ id: v }).then((r) => {
this.entity = r.result;
this.entity.imgName = r.result.templateId;
this.entity.url = r.result.url;
this.imgName = r.result.url;
});
},
handleSubmit() {
......@@ -138,8 +140,7 @@ export default {
imgName(newName, oldName) {
if (newName != "") {
const imgPathsArr = JSON.parse(newName);
this.entity.templateId = imgPathsArr[0].filePath;
this.entity.template = imgPathsArr[0].fileName;
this.entity.url = imgPathsArr[0].filePath;
}
},
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