Commit 8c242835 authored by 仇晓婷's avatar 仇晓婷

文档保存,状态判断

parent 03245e5d
...@@ -52,11 +52,6 @@ ...@@ -52,11 +52,6 @@
</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('templateId')" prop="templateId"> <FormItem :label="l('templateId')" prop="templateId">
<Select <Select
...@@ -71,6 +66,12 @@ ...@@ -71,6 +66,12 @@
</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>
...@@ -327,7 +328,6 @@ export default { ...@@ -327,7 +328,6 @@ export default {
mounted() { mounted() {
this.tebleSet(); this.tebleSet();
this.loadTemplate(); this.loadTemplate();
}, },
methods: { methods: {
tebleSet() { tebleSet() {
...@@ -396,18 +396,6 @@ export default { ...@@ -396,18 +396,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;
...@@ -417,9 +405,15 @@ export default { ...@@ -417,9 +405,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) => {
...@@ -452,8 +446,6 @@ export default { ...@@ -452,8 +446,6 @@ export default {
return this.$t(key); return this.$t(key);
}, },
}, },
watch: { watch: {},
},
}; };
</script> </script>
\ No newline at end of file
...@@ -53,11 +53,6 @@ ...@@ -53,11 +53,6 @@
</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('templateId')" prop="templateId"> <FormItem :label="l('templateId')" prop="templateId">
<Select <Select
...@@ -73,6 +68,12 @@ ...@@ -73,6 +68,12 @@
</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>
...@@ -414,10 +415,15 @@ export default { ...@@ -414,10 +415,15 @@ export default {
} 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>
...@@ -239,7 +240,7 @@ export default { ...@@ -239,7 +240,7 @@ export default {
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 +280,7 @@ export default { ...@@ -279,7 +280,7 @@ export default {
props: { props: {
v: Object, v: Object,
treeId: Number, treeId: Number,
eid: String, eid: Number,
}, },
created() {}, created() {},
mounted() { mounted() {
...@@ -330,8 +331,10 @@ export default { ...@@ -330,8 +331,10 @@ 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) => {
......
...@@ -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) => {
......
...@@ -361,7 +361,7 @@ export default { ...@@ -361,7 +361,7 @@ export default {
.c { .c {
padding-left: 8px; padding-left: 8px;
div { div {
height: 18px; height: 25px;
} }
} }
.shuo-ming { .shuo-ming {
......
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