|
@@ -10,10 +10,10 @@
|
|
|
<!--标题 分类-->
|
|
|
<Set ref="set" @setSelectChange="selectChange" @setTitleChange="titleChange" />
|
|
|
<!--文件列表-->
|
|
|
- <file-list :attinfos="uploadCacheData.attinfos" v-if="uploadType == '1' || uploadType == '2'">
|
|
|
+ <file-list ref="attFileList" v-if="uploadType == '1' || uploadType == '2'">
|
|
|
<upload slot="upload" @onSuccess="onSuccess" target="archives" :classType="uploadType"></upload>
|
|
|
<template v-slot:delete="scope">
|
|
|
- <delete1 :data="scope.data"></delete1>
|
|
|
+ <delete1 @deleteFile="deleteFile" :obj="scope.data"></delete1>
|
|
|
</template>
|
|
|
<template v-slot:download="scope">
|
|
|
<download :data="scope.data"></download>
|
|
@@ -28,7 +28,8 @@
|
|
|
</el-col>
|
|
|
<!-- 授权范围 -->
|
|
|
<el-col :span="10">
|
|
|
- <scopeOfauth style="margin-left:10px;" :defaultData="defaultData" appid="sat_sharematerialid" @onChecked="onChecked" />
|
|
|
+ <scopeOfauth style="margin-left:10px;" :defaultData="defaultData" appid="sat_sharematerialid"
|
|
|
+ @onChecked="onChecked" />
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
@@ -113,17 +114,24 @@ export default {
|
|
|
this.cacheInfo.content.sat_sharematerial_classid = data.sat_sharematerial_classid;
|
|
|
this.cacheInfo.content.content = data.content;
|
|
|
this.uploadType = data.type;
|
|
|
- console.log("type", this.uploadType)
|
|
|
this.$refs.set.ruleForm.title = data.title;
|
|
|
this.$refs.set.ruleForm.category = data.sat_sharematerial_classid;
|
|
|
this.uploadCacheData.sat_sharematerialid = data.sat_sharematerialid;
|
|
|
this.uploadCacheData.attinfos = data.attinfos;
|
|
|
- this.uploadCacheData.status = "完成";
|
|
|
+ setTimeout(this.randerData, 100);
|
|
|
+ if (data.title != '') this.uploadCacheData.status = "完成";
|
|
|
this.query_auth();
|
|
|
},
|
|
|
+ /* 更新附件列表数据 */
|
|
|
+ randerData() {
|
|
|
+ this.$refs.attFileList.randerData(this.uploadCacheData.attinfos)
|
|
|
+ },
|
|
|
+ deleteFile(id) {
|
|
|
+ this.uploadCacheData.attinfos = this.uploadCacheData.attinfos.filter(v => v.linksid != id);
|
|
|
+ this.randerData();
|
|
|
+ },
|
|
|
//保存
|
|
|
save() {
|
|
|
- console.log('保存')
|
|
|
this.$refs.set.$refs.form.validate((val) => {
|
|
|
var that = this
|
|
|
if (val) {
|
|
@@ -202,9 +210,7 @@ export default {
|
|
|
"ownertable": "SAT_SHAREMATERIAL",
|
|
|
"ownerid": this.uploadCacheData.sat_sharematerialid,
|
|
|
"usetype": "default",
|
|
|
- "attachmentids": [
|
|
|
- id
|
|
|
- ]
|
|
|
+ "attachmentids": [id]
|
|
|
}
|
|
|
}
|
|
|
this.$api.requested(param).then(res => {
|
|
@@ -213,10 +219,9 @@ export default {
|
|
|
message: '上传失败',
|
|
|
type: 'error'
|
|
|
})
|
|
|
-
|
|
|
this.uploadCacheData.attinfos = this.uploadCacheData.attinfos.concat(res.data);
|
|
|
+ this.randerData();
|
|
|
})
|
|
|
-
|
|
|
},
|
|
|
//退出后对数据进行销毁
|
|
|
async removeAllData() {
|