@steedos-labs/content-compliance 0.8.28 → 0.8.30

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.
@@ -0,0 +1,10 @@
1
+ name: sub_product_name
2
+ amis:
3
+ id: 'u:38651d7fca29'
4
+ filterable: true
5
+ group: 通用
6
+ index: true
7
+ label: 子产品名称
8
+ searchable: true
9
+ sort_no: 45
10
+ type: text
@@ -2,6 +2,7 @@ name: all
2
2
  columns:
3
3
  - field: name
4
4
  wrap: false
5
+ - field: sub_product_name
5
6
  - field: brand
6
7
  - field: taste
7
8
  - field: package_type
@@ -0,0 +1,10 @@
1
+ name: sub_product_name
2
+ amis:
3
+ id: 'u:a1b2c3d40012'
4
+ filterable: true
5
+ group: 通用
6
+ index: true
7
+ label: 子产品名称
8
+ searchable: true
9
+ sort_no: 75
10
+ type: text
@@ -6,6 +6,9 @@ columns:
6
6
  - field: product_name
7
7
  width: '260'
8
8
  wrap: true
9
+ - field: sub_product_name
10
+ width: '260'
11
+ wrap: true
9
12
  - field: brand
10
13
  width: '100'
11
14
  - field: issue_date
@@ -5,31 +5,68 @@ columns:
5
5
  wrap: true
6
6
  # 覆盖平台默认的 file 列渲染。必须写在"列"上而不是字段上:
7
7
  # 平台构列时是 Object.assign({}, uiSchema.fields[column.field], {width, wrap, amis: column.amis}),
8
- # 即列上的 amis 会直接覆盖字段上的 amis(没配就覆盖成 undefined), 普通列表视图与 lookup 弹窗都如此。
8
+ # 列上的 amis 会直接覆盖字段上的 amis(没配就覆盖成 undefined), 普通列表视图与 lookup 弹窗都如此。
9
9
  #
10
- # 平台默认取 ${pls_file|asArray} 的 value/name, 该值只有普通列表视图的响应适配器
11
- # (getTableApi)会重写成 [{value,name,url}]; lookup 弹窗(lookupToAmisPicker)的适配器没有
12
- # 这段重写, 字段值仍是裸文件 id 字符串, each 遍历基础类型时作用域只有 {item,index} ->
13
- # value 取空, 点击打开 cfs_files_filerecord 记录抽屉时报"无法找到记录"。
10
+ # 平台默认的 items 取 ${value} 作为 cfs_files_filerecord 的 recordId, 而该值只有普通列表视图的
11
+ # 响应适配器(getTableApi)会把字段值重写成 [{value,name,url}]; lookup 弹窗(lookupToAmisPicker)的
12
+ # 适配器没有这段重写, 字段值仍是裸文件 id 字符串, each 遍历基础类型时作用域只有 {item,index} ->
13
+ # ${value} 取空, 抽屉里查不到记录报"无法找到记录", ${name} 还会沿作用域链落到行记录自己的 name。
14
14
  #
15
- # 这里改为从 _display 取值(列表、lookup 弹窗、记录详情三处都有 _display), 并用 split 去掉
16
- # url 上的 download 参数 —— /api/files/:collection/:id 的判断是 typeof download !== "undefined",
17
- # 任何值都会返回 Content-Disposition: attachment, 去掉整个参数才是 inline, PDF 才能内联预览。
15
+ # 所以这里保留平台原本的"右侧抽屉预览附件"交互, 只把取值换成 picker 里能拿到的:
16
+ # recordId 用 ${item}(each 对字符串成员会把原值放进 item), 链接文字用 ${_display.pls_file.name}。
17
+ # 抽屉内容用 steedos-page-record-detail 加载 cfs_files_filerecord 的记录页
18
+ # (cfs_files_record_preview/附件历史版本详细, 即"预览/详细/相关"三个页签 + 内嵌 PDF 阅读器)。
19
+ # 注意该组件不认 recordId 这个 prop(源码里解构了但没用), recordId 必须从数据域传。
18
20
  amis:
19
21
  body:
20
22
  type: each
21
- source: '${_display.pls_file|asArray}'
23
+ source: '${pls_file|asArray}'
22
24
  className: flex flex-col
23
25
  items:
24
- type: tpl
26
+ type: static
27
+ label: false
28
+ labelClassName: hidden
29
+ className: m-0
25
30
  tpl: >-
26
- <% if(data && data.url){ %><a href="<%= data.url.split('?')[0] %>"
27
- target="_blank"><%= data.name %></a><% } %>
31
+ <a href="/app/-/cfs_files_filerecord/view/${item}"
32
+ onclick="return false;">${_display.pls_file.name}</a>
33
+ onEvent:
34
+ click:
35
+ actions:
36
+ - actionType: drawer
37
+ preventDefault: true
38
+ drawer:
39
+ type: drawer
40
+ title: '&nbsp;'
41
+ headerClassName: hidden
42
+ size: lg
43
+ width: 70%
44
+ bodyClassName: p-0 m-0 bg-gray-100
45
+ className: steedos-record-detail-drawer app-popover
46
+ closeOnEsc: true
47
+ closeOnOutside: true
48
+ resizable: true
49
+ actions: []
50
+ data:
51
+ recordId: '${item}'
52
+ objectName: cfs_files_filerecord
53
+ _inDrawer: true
54
+ recordLoaded: false
55
+ body:
56
+ - type: steedos-page-record-detail
57
+ objectApiName: cfs_files_filerecord
28
58
  - field: product_name
59
+ width: '260'
60
+ wrap: true
61
+ - field: sub_product_name
62
+ width: '260'
63
+ wrap: true
29
64
  - field: brand
30
65
  - field: issue_date
31
66
  - field: version
32
67
  - field: sku
68
+ width: '500'
69
+ wrap: true
33
70
  - field: is_active
34
71
  crud_mode: table
35
72
  filter_scope: space
@@ -152,12 +152,12 @@ amis:
152
152
  componentId: 'u:qc_reviewer'
153
153
  args:
154
154
  value: '${event.data.responseResult.qc_reviewer}'
155
- - ignoreError: false
155
+ - ignoreError: true
156
156
  actionType: setValue
157
157
  componentId: 'u:qc_assistance'
158
158
  args:
159
159
  value: '${event.data.responseResult.qc_assistance}'
160
- - ignoreError: false
160
+ - ignoreError: true
161
161
  actionType: setValue
162
162
  componentId: 'u:can_pass_users'
163
163
  args:
@@ -130,12 +130,12 @@ amis:
130
130
  componentId: 'u:qc_reviewer'
131
131
  args:
132
132
  value: '${event.data.responseResult.qc_reviewer}'
133
- - ignoreError: false
133
+ - ignoreError: true
134
134
  actionType: setValue
135
135
  componentId: 'u:qc_assistance'
136
136
  args:
137
137
  value: '${event.data.responseResult.qc_assistance}'
138
- - ignoreError: false
138
+ - ignoreError: true
139
139
  actionType: setValue
140
140
  componentId: 'u:can_pass_users'
141
141
  args:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steedos-labs/content-compliance",
3
- "version": "0.8.28",
3
+ "version": "0.8.30",
4
4
  "description": "内容审核系统",
5
5
  "main": "package.service.js",
6
6
  "scripts": {