bri-components 1.2.25 → 1.2.27

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bri-components",
3
- "version": "1.2.25",
3
+ "version": "1.2.27",
4
4
  "author": "dengshanghui",
5
5
  "description": "a component lib for vue project",
6
6
  "main": "src/index.js",
@@ -1,137 +0,0 @@
1
- <template>
2
- <div class="DshFileShow">
3
- <!-- image类型 -->
4
- <img
5
- v-for="item in list"
6
- :key="item._id"
7
- class="DshFileShow-img"
8
- :style="{
9
- cursor: isClick ? 'pointer' : 'auto'
10
- }"
11
- :src="getFileImage(item)"
12
- :title="item.name"
13
- :alt="item.name"
14
- :width="width"
15
- :height="height"
16
- @click.stop="clickFile(item)"
17
- >
18
-
19
- <!-- 预览 -->
20
- <div
21
- :class="{
22
- 'DshFileShow-wrap': true,
23
- 'DshFileShow-wrap-show': showModal
24
- }"
25
- @click.stop="closeModal()"
26
- >
27
- <div
28
- class="DshFileShow-wrap-preview"
29
- :style="{
30
- backgroundImage: `url(${curFile.url})`
31
- }"
32
- ></div>
33
- </div>
34
- </div>
35
- </template>
36
-
37
- <script>
38
- export default {
39
- name: "DshFileShow",
40
- props: {
41
- list: {
42
- type: Array,
43
- default () {
44
- return [];
45
- }
46
- },
47
-
48
- width: {
49
- type: Number,
50
- default: 24
51
- },
52
- height: {
53
- type: Number,
54
- default: 28
55
- },
56
- isClick: {
57
- type: Boolean,
58
- default: true
59
- }
60
- },
61
- data () {
62
- return {
63
- showModal: false,
64
- curFile: {}
65
- };
66
- },
67
- created () {},
68
- methods: {
69
- closeModal () {
70
- this.showModal = false;
71
- },
72
-
73
- // 获取不同类型文件的图片
74
- getFileImage (item) {
75
- const imageMap = this.$imageSrcMap.fileType;
76
-
77
- if (!item.mimetype) {
78
- return imageMap.other;
79
- } else if (item.mimetype.indexOf("image") > -1) {
80
- return item.url; // 压缩图片:将图片最长的边限制在100像素,短边按比例处理
81
- } else if (item.mimetype.indexOf("text/plain") > -1) {
82
- return imageMap.text;
83
- } else if (item.mimetype.indexOf("application/pdf") > -1) {
84
- return imageMap.pdf;
85
- } else if (item.mimetype.indexOf("wordprocessingml.document") > -1 || item.mimetype.indexOf("application/msword") > -1) {
86
- return imageMap.doc;
87
- } else if (item.mimetype.indexOf("presentationml.presentation") > -1 || item.mimetype.indexOf("application/vnd.ms-powerpoint") > -1) {
88
- return imageMap.ppt;
89
- } else if (item.mimetype.indexOf("spreadsheetml.sheet") > -1) {
90
- return imageMap.excel;
91
- } else if (item.mimetype.indexOf("application/x-zip-compressed") > -1) {
92
- return imageMap.zip;
93
- } else if (item.mimetype.indexOf("application/x-rar-compressed") > -1) {
94
- return imageMap.rar;
95
- } else {
96
- return imageMap.other;
97
- }
98
- },
99
- // 点击文件,跳转对应地址
100
- clickFile (item) {
101
- if (this.isClick) {
102
- if (item.mimetype.indexOf("image/") > -1) {
103
- this.showModal = true;
104
- this.curFile = item;
105
- } else if (item.mimetype === "application/pdf") {
106
- window.open(item.url);
107
- // window.open(item.url + "?response-content-type=application/octet-stream");
108
- } else {
109
- window.open(item.url);
110
- // this.downloadFile(item);
111
- }
112
- }
113
- }
114
- // downloadFile (file) {
115
- // axios
116
- // .get(file.url, {
117
- // responseType: "blob"
118
- // })
119
- // .then((res) => {
120
- // if (window.navigator.msSaveOrOpenBlob) {
121
- // // 兼容IE10
122
- // navigator.msSaveBlob(res, file.name);
123
- // } else {
124
- // const href = URL.createObjectURL(res.data); // 创建新的URL表示指定的blob对象
125
- // const a = document.createElement("a");
126
- // a.style.display = "none";
127
- // a.href = href; // 指定下载链接
128
- // a.download = file.name; // 指定下载文件名
129
- // a.click();
130
- // URL.revokeObjectURL(a.href); // 释放URL对象
131
- // a.remove();
132
- // }
133
- // });
134
- // }
135
- }
136
- };
137
- </script>
@@ -326,7 +326,7 @@
326
326
  : []
327
327
  ),
328
328
 
329
- ...this.columns.filter(colItem => colItem._displayType !== "hide" && this.$isAdvRelyShow(colItem, this.outObj)),
329
+ ...this.columns.filter(colItem => this.$isAdvRelyShow(colItem, this.outObj)),
330
330
 
331
331
  ...(
332
332
  this.canEdit && operationList.length
@@ -4,7 +4,9 @@
4
4
  <Card class="error-body-card">
5
5
  <div class="error-body-title">
6
6
  <span>4</span><!--
7
- --><span class="span-403-0"><Icon type="md-lock" /></span><!--
7
+ --><span class="span-403-0">
8
+ <Icon type="md-lock" />
9
+ </span><!--
8
10
  --><span class="span-403-3">3</span>
9
11
  </div>
10
12
  <p class="error-body-message">很抱歉,您没有该页面的访问权限!</p>
@@ -25,6 +27,12 @@
25
27
  components: {
26
28
  errorBack
27
29
  },
30
+ props: {},
31
+ data () {
32
+ return {};
33
+ },
34
+ computed: {},
35
+ created () {},
28
36
  methods: {}
29
37
  };
30
38
  </script>
@@ -25,6 +25,12 @@
25
25
  components: {
26
26
  errorBack
27
27
  },
28
+ props: {},
29
+ data () {
30
+ return {};
31
+ },
32
+ computed: {},
33
+ created () {},
28
34
  methods: {}
29
35
  };
30
36
  </script>
@@ -4,11 +4,15 @@
4
4
  <Card class="error-body-card">
5
5
  <div class="error-body-title">
6
6
  <span>5</span><!--
7
- --><span class="span-500-0"><Icon type="logo-freebsd-devil" /></span><!--
8
- --><span class="span-500-0"><Icon type="logo-freebsd-devil" /></span>
7
+ --><span class="span-500-0">
8
+ <Icon type="logo-freebsd-devil" />
9
+ </span><!--
10
+ --><span class="span-500-0">
11
+ <Icon type="logo-freebsd-devil" />
12
+ </span>
9
13
  </div>
10
- <p class="error-body-message">抱歉,服务器发生错误!</p>
11
- <p class="error-body-message">I'm sorry, the server is wrong!</p>
14
+ <p class="error-body-message">{{ msg }}</p>
15
+ <p class="error-body-message">The server is wrong!</p>
12
16
 
13
17
  <!-- 返回按钮组件 -->
14
18
  <error-back></error-back>
@@ -25,6 +29,19 @@
25
29
  components: {
26
30
  errorBack
27
31
  },
32
+ props: {},
33
+ data () {
34
+ return {};
35
+ },
36
+ computed: {
37
+ queryMsg () {
38
+ return this.$route.query.msg;
39
+ },
40
+ msg () {
41
+ return `${this.queryMsg ? `服务器错误:${this.queryMsg}` : "抱歉,服务器错误"}!`;
42
+ }
43
+ },
44
+ created () {},
28
45
  methods: {}
29
46
  };
30
47
  </script>
@@ -17,10 +17,12 @@
17
17
  data () {
18
18
  return {};
19
19
  },
20
+ computed: {},
21
+ created () {},
20
22
  methods: {
21
23
  goHome () {
22
24
  this.$router.push({
23
- name: "home"
25
+ path: "/"
24
26
  });
25
27
  },
26
28
  backPage () {
@@ -151,7 +151,7 @@
151
151
  return !!this.oldListData.length;
152
152
  },
153
153
  filterColumns () {
154
- return this.columns.filter(colItem => colItem._displayType !== "hide" && this.$isAdvRelyShow(colItem, this.outObj));
154
+ return this.columns.filter(colItem => this.$isAdvRelyShow(colItem, this.outObj));
155
155
  },
156
156
  showColumns () {
157
157
  const operationList = this.$getOperationList(["delete"]);
@@ -5,6 +5,7 @@
5
5
  'DshFormUnit': true,
6
6
  'DshFormUnit-required': canEdit && formItem._required,
7
7
  'DshFormUnit-line': formItem._line,
8
+ 'DshFormUnit-readOnly': !canEdit
8
9
  },
9
10
  formControlClass,
10
11
  formItem.formControlClass
@@ -45,9 +45,11 @@
45
45
  &-edit {
46
46
  color: @textColor;
47
47
  }
48
+
48
49
  &-show {
49
50
  color: @contentColor;
50
51
  }
52
+
51
53
  &-sign {
52
54
  #dsh-sign-change();
53
55
  }
@@ -100,4 +102,8 @@
100
102
  align-items: center;
101
103
  }
102
104
  }
105
+
106
+ &-readOnly {
107
+ border-bottom: 1px solid #E5E5E5;
108
+ }
103
109
  }