cloud-web-corejs 1.0.54-dev.4 → 1.0.54-dev.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -192,7 +192,7 @@
192
192
  href="javascript:void(0);"
193
193
  class="a-link ico"
194
194
  v-if="!attachment.dirs && fileObjAuth.downloadAuth"
195
- @click="$commonFileUtil.downloadFile(attachment.domain + attachment.url, attachment.fileName)"
195
+ @click="downloadSingerFile(attachment)"
196
196
  >
197
197
  <el-tooltip effect="dark" content="下载" placement="top"
198
198
  popper-class="tooltip-skin">
@@ -353,7 +353,7 @@
353
353
  href="javascript:void(0);"
354
354
  class="a-link"
355
355
  v-if="fileObjAuth.downloadAuth == 1"
356
- @click="$commonFileUtil.downloadFile(row.domain + row.url,row.fileName)"
356
+ @click="downloadSingerFile(row)"
357
357
  >
358
358
  <el-tooltip :enterable="false" effect="dark" :content="$t2('下载','components.fileLibrary.download')"
359
359
  placement="top"
@@ -284,6 +284,19 @@ modules = {
284
284
  }
285
285
  }
286
286
  },
287
+ {
288
+ title: this.$t1('下载打水印 '),
289
+ field: 'downWatermarkAuth',
290
+ width: 150,
291
+ slots: {
292
+ default: ({row}) => {
293
+ return [
294
+ <el-switch v-model={row.downWatermarkAuth} active-value={1} inactive-value={0}
295
+ disabled={row._isParent}></el-switch>
296
+ ];
297
+ }
298
+ }
299
+ },
287
300
  {title: this.$t2('创建人', 'system.label.createBy'), field: 'createBy', width: 150},
288
301
  {title: this.$t2('创建时间', 'system.label.createDate'), field: 'createDate', width: 150},
289
302
  {title: this.$t2('更新人', 'system.label.modifyBy'), field: 'modifyBy', width: 150},
@@ -7,6 +7,7 @@ import shareDialog from "../shareDialog";
7
7
  import recycleBinDialog from "../recycleBinDialog";
8
8
  import videoDialog from "../../../components/video/dialog";
9
9
  import userDialog from "../../../views/user/user/dialog";
10
+ import {encode} from "js-base64";
10
11
 
11
12
  let modules;
12
13
  modules = {
@@ -1746,6 +1747,16 @@ modules = {
1746
1747
  } else {
1747
1748
  return customFileButton.visable;
1748
1749
  }
1750
+ },
1751
+ downloadSingerFile(attachment) {
1752
+ let fileObjAuth = this.fileObjAuth;
1753
+ if (attachment.dirs || !fileObjAuth.downloadAuth) return
1754
+ let url = attachment.domain + attachment.url;
1755
+ let loginAccount = this.$store.getters.loginAccount;
1756
+ if (fileObjAuth.downWatermarkAuth) {
1757
+ url += '?_w=' + encode(loginAccount)
1758
+ }
1759
+ this.$commonFileUtil.downloadFile(url, attachment.fileName)
1749
1760
  }
1750
1761
  },
1751
1762
  };
@@ -118,6 +118,8 @@ export default {
118
118
  },
119
119
  initSystemNoticeInfoDialog() {
120
120
  if (!settingConfig.systemNoticeAutoTip) return
121
+ let userFlag = this.$store.getters.userFlag
122
+ if (userFlag == 6 || userFlag == 7 || userFlag == 8) return;
121
123
  this.$http({
122
124
  url: USER_PREFIX + '/system_notice/listPage',
123
125
  data: {publish: true, important: true, readed: 0, size: 1},