vue2-client 1.12.99 → 1.12.100

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.
Files changed (29) hide show
  1. package/package.json +1 -1
  2. package/src/base-client/components/common/XDatePicker/index.vue +3 -0
  3. package/src/base-client/components/common/XReport/index.js +3 -3
  4. package/src/base-client/components/common/XTimeline/XTimeline.vue +19 -18
  5. package/src/base-client/components/his/XRadio/XRadio.vue +1 -0
  6. package/src/base-client/components/his/XSidebar/XSidebar.vue +0 -1
  7. package/src/expression/ExpressionRunner.js +26 -26
  8. package/src/expression/TestExpression.js +509 -509
  9. package/src/expression/core/Delegate.js +115 -115
  10. package/src/expression/core/Expression.js +1358 -1358
  11. package/src/expression/core/Program.js +932 -932
  12. package/src/expression/core/Token.js +27 -27
  13. package/src/expression/enums/ExpressionType.js +81 -81
  14. package/src/expression/enums/TokenType.js +11 -11
  15. package/src/expression/exception/BreakWayException.js +2 -2
  16. package/src/expression/exception/ContinueWayException.js +2 -2
  17. package/src/expression/exception/ExpressionException.js +28 -28
  18. package/src/expression/exception/ReturnWayException.js +14 -14
  19. package/src/expression/exception/ServiceException.js +22 -22
  20. package/src/expression/instances/LogicConsole.js +44 -44
  21. package/src/logic/LogicRunner.js +62 -62
  22. package/src/logic/TestLogic.js +13 -13
  23. package/src/logic/plugins/common/VueTools.js +30 -30
  24. package/src/logic/ts/LogicRunner.ts +67 -67
  25. package/src/logic/ts/TestLogic.ts +13 -13
  26. package/src/pages/DynamicStatistics/FavoriteList.vue +50 -50
  27. package/src/pages/userInfoDetailManage/uploadFilesHistory/index.vue +130 -130
  28. package/src/services/api/entity.js +18 -18
  29. package/src/utils/waterMark.js +31 -31
@@ -1,30 +1,30 @@
1
- /**
2
- * Vue工具类
3
- */
4
- export default class VueTools {
5
- static instance = new VueTools()
6
-
7
- constructor () {
8
- if (VueTools.instance) {
9
- return VueTools.instance
10
- }
11
- VueTools.instance = this
12
- }
13
-
14
- static getInstance () {
15
- if (!VueTools.instance) {
16
- VueTools.instance = new VueTools()
17
- }
18
- return VueTools.instance
19
- }
20
-
21
- /**
22
- * 获取组件实例
23
- * @param vueRef vue实例
24
- * @param componentName 组件实例名(refName)
25
- * @returns {VueComponent}
26
- */
27
- getComponent (vueRef, componentName) {
28
- return vueRef.$refs[componentName]
29
- }
30
- }
1
+ /**
2
+ * Vue工具类
3
+ */
4
+ export default class VueTools {
5
+ static instance = new VueTools()
6
+
7
+ constructor () {
8
+ if (VueTools.instance) {
9
+ return VueTools.instance
10
+ }
11
+ VueTools.instance = this
12
+ }
13
+
14
+ static getInstance () {
15
+ if (!VueTools.instance) {
16
+ VueTools.instance = new VueTools()
17
+ }
18
+ return VueTools.instance
19
+ }
20
+
21
+ /**
22
+ * 获取组件实例
23
+ * @param vueRef vue实例
24
+ * @param componentName 组件实例名(refName)
25
+ * @returns {VueComponent}
26
+ */
27
+ getComponent (vueRef, componentName) {
28
+ return vueRef.$refs[componentName]
29
+ }
30
+ }
@@ -1,67 +1,67 @@
1
- import JSONObject from "../../expression/instances/JSONObject";
2
- import ServiceException from "../../expression/exception/ServiceException";
3
- import LogicConsole from "../../expression/instances/LogicConsole";
4
- import ExpressionRunner from "../../expression/ExpressionRunner";
5
- import { indexedDB } from '../../utils/indexedDB'
6
-
7
- export default class LogicRunner {
8
-
9
- private static logicConsoleInstance: LogicConsole = new LogicConsole();
10
-
11
- /**
12
- * 是否存在指定名称的Logic资源
13
- *
14
- * @param logicName Logic名称
15
- * @return 是否存在
16
- */
17
- public static has(logicName: string): boolean {
18
- return LogicRunner.getLogic(logicName, false, (result: any) => {
19
- return result != null;
20
- });
21
- }
22
-
23
- /**
24
- * 执行Logic
25
- *
26
- * @param logicName Logic名称
27
- * @param param 参数
28
- * @return 执行结果
29
- */
30
- public static run(logicName: string, param: JSONObject | Object) : any {
31
- // 获取Logic资源
32
- const source = LogicRunner.getLogic(logicName, false, (result: any) => {
33
- return result;
34
- });
35
- if (source == null) {
36
- throw new ServiceException("Logic资源" + logicName + "未找到", 400)
37
- }
38
- LogicRunner.logicConsoleInstance.info("执行Logic[{}],params: {}", logicName, param)
39
- // 附加用户注册的对象到业务逻辑中
40
- const plugins = new JSONObject();
41
- plugins.put("data", param);
42
- plugins.put("log", LogicRunner.logicConsoleInstance);
43
- plugins.put("logic", LogicRunner.prototype);
44
- return LogicRunner.runExpression(source, plugins);
45
- }
46
-
47
- /**
48
- * 执行原生表达式
49
- *
50
- * @param source 表达式内容
51
- * @param params 参数
52
- * @return 执行结果
53
- */
54
- private static runExpression(source: string, params: JSONObject) : any {
55
- return ExpressionRunner.run(source, params)
56
- }
57
-
58
- private static getLogic(logicName: string, isDev: boolean, callback: Function) : any {
59
- let apiPre = '/api/'
60
- if (isDev) {
61
- apiPre = '/devApi/'
62
- }
63
- const serviceName = process.env.VUE_APP_SYSTEM_NAME
64
- const getConfigUrl = apiPre + serviceName + '/logic/openapi/getLiuliConfiguration'
65
- indexedDB.getByWeb(logicName, getConfigUrl, {configName: logicName}, callback)
66
- }
67
- }
1
+ import JSONObject from "../../expression/instances/JSONObject";
2
+ import ServiceException from "../../expression/exception/ServiceException";
3
+ import LogicConsole from "../../expression/instances/LogicConsole";
4
+ import ExpressionRunner from "../../expression/ExpressionRunner";
5
+ import { indexedDB } from '../../utils/indexedDB'
6
+
7
+ export default class LogicRunner {
8
+
9
+ private static logicConsoleInstance: LogicConsole = new LogicConsole();
10
+
11
+ /**
12
+ * 是否存在指定名称的Logic资源
13
+ *
14
+ * @param logicName Logic名称
15
+ * @return 是否存在
16
+ */
17
+ public static has(logicName: string): boolean {
18
+ return LogicRunner.getLogic(logicName, false, (result: any) => {
19
+ return result != null;
20
+ });
21
+ }
22
+
23
+ /**
24
+ * 执行Logic
25
+ *
26
+ * @param logicName Logic名称
27
+ * @param param 参数
28
+ * @return 执行结果
29
+ */
30
+ public static run(logicName: string, param: JSONObject | Object) : any {
31
+ // 获取Logic资源
32
+ const source = LogicRunner.getLogic(logicName, false, (result: any) => {
33
+ return result;
34
+ });
35
+ if (source == null) {
36
+ throw new ServiceException("Logic资源" + logicName + "未找到", 400)
37
+ }
38
+ LogicRunner.logicConsoleInstance.info("执行Logic[{}],params: {}", logicName, param)
39
+ // 附加用户注册的对象到业务逻辑中
40
+ const plugins = new JSONObject();
41
+ plugins.put("data", param);
42
+ plugins.put("log", LogicRunner.logicConsoleInstance);
43
+ plugins.put("logic", LogicRunner.prototype);
44
+ return LogicRunner.runExpression(source, plugins);
45
+ }
46
+
47
+ /**
48
+ * 执行原生表达式
49
+ *
50
+ * @param source 表达式内容
51
+ * @param params 参数
52
+ * @return 执行结果
53
+ */
54
+ private static runExpression(source: string, params: JSONObject) : any {
55
+ return ExpressionRunner.run(source, params)
56
+ }
57
+
58
+ private static getLogic(logicName: string, isDev: boolean, callback: Function) : any {
59
+ let apiPre = '/api/'
60
+ if (isDev) {
61
+ apiPre = '/devApi/'
62
+ }
63
+ const serviceName = process.env.VUE_APP_SYSTEM_NAME
64
+ const getConfigUrl = apiPre + serviceName + '/logic/openapi/getLiuliConfiguration'
65
+ indexedDB.getByWeb(logicName, getConfigUrl, {configName: logicName}, callback)
66
+ }
67
+ }
@@ -1,13 +1,13 @@
1
- import LogicRunner from './LogicRunner'
2
-
3
- testLogicCall()
4
-
5
- /**
6
- * testLogicCall
7
- */
8
- function testLogicCall () {
9
- const result = LogicRunner.run('testVueLogic', {
10
- test: '1'
11
- })
12
- console.info(result)
13
- }
1
+ import LogicRunner from './LogicRunner'
2
+
3
+ testLogicCall()
4
+
5
+ /**
6
+ * testLogicCall
7
+ */
8
+ function testLogicCall () {
9
+ const result = LogicRunner.run('testVueLogic', {
10
+ test: '1'
11
+ })
12
+ console.info(result)
13
+ }
@@ -1,50 +1,50 @@
1
- <template>
2
- <div>
3
- <a-list v-show="!loading" size="small" :data-source="data">
4
- <a-list-item slot="renderItem" slot-scope="item">
5
- <div>
6
- <p><a @click="$emit('openFavorites', item.uuid)">{{ item.question }} </a></p>
7
- <p>{{ item.date }}</p>
8
- </div>
9
- <a class="delete_item">
10
- <a-icon type="close" @click="$emit('saveToFavorites', item.uuid)"/>
11
- </a>
12
- </a-list-item>
13
- </a-list>
14
- </div>
15
- </template>
16
-
17
- <script>
18
- import { indexedDB } from '@vue2-client/utils/indexedDB'
19
-
20
- export default {
21
- name: 'FavoriteList',
22
- data () {
23
- return {
24
- data: [],
25
- loading: false
26
- }
27
- },
28
- mounted () {
29
- this.loadData()
30
- },
31
- methods: {
32
- loadData () {
33
- indexedDB.getAll((data) => {
34
- const realData = data.filter(item => item.data && item.data.uuid)
35
- .map(item => item.data)
36
- this.data = realData
37
- })
38
- }
39
- }
40
- }
41
- </script>
42
- <style lang="less" scoped>
43
- .delete_item {
44
- margin-left: 8px;
45
- color: #333;
46
- }
47
- p {
48
- margin: 0
49
- }
50
- </style>
1
+ <template>
2
+ <div>
3
+ <a-list v-show="!loading" size="small" :data-source="data">
4
+ <a-list-item slot="renderItem" slot-scope="item">
5
+ <div>
6
+ <p><a @click="$emit('openFavorites', item.uuid)">{{ item.question }} </a></p>
7
+ <p>{{ item.date }}</p>
8
+ </div>
9
+ <a class="delete_item">
10
+ <a-icon type="close" @click="$emit('saveToFavorites', item.uuid)"/>
11
+ </a>
12
+ </a-list-item>
13
+ </a-list>
14
+ </div>
15
+ </template>
16
+
17
+ <script>
18
+ import { indexedDB } from '@vue2-client/utils/indexedDB'
19
+
20
+ export default {
21
+ name: 'FavoriteList',
22
+ data () {
23
+ return {
24
+ data: [],
25
+ loading: false
26
+ }
27
+ },
28
+ mounted () {
29
+ this.loadData()
30
+ },
31
+ methods: {
32
+ loadData () {
33
+ indexedDB.getAll((data) => {
34
+ const realData = data.filter(item => item.data && item.data.uuid)
35
+ .map(item => item.data)
36
+ this.data = realData
37
+ })
38
+ }
39
+ }
40
+ }
41
+ </script>
42
+ <style lang="less" scoped>
43
+ .delete_item {
44
+ margin-left: 8px;
45
+ color: #333;
46
+ }
47
+ p {
48
+ margin: 0
49
+ }
50
+ </style>
@@ -1,130 +1,130 @@
1
- <template>
2
- <div>
3
- <div class="filter-bar">
4
- <a-date-picker v-model="upload_date" placeholder="上传日期" @change="selfSearch" />
5
- <a-select
6
- style="width: 200px;"
7
- v-model="fusetype"
8
- :options="fusetypes"
9
- placeholder="分类"
10
- @change="selfSearch"
11
- allow-clear />
12
- <a-button type="primary" @click="selfSearch">查询</a-button>
13
- </div>
14
- <a-list bordered>
15
- <a-list-item v-for="item in files" :key="item.days">
16
- <div class="file-group">
17
- <h4>{{ item.days }}</h4>
18
- <div class="file-items">
19
- <div v-for="file in item.arrays" :key="file.id" class="file-card">
20
- <img :src="file.f_downloadpath" class="file-image" v-if="file.f_filetype.includes('jpg') || file.f_filetype.includes('png')" />
21
- <p>上传时间: {{ file.f_uploaddate }}</p>
22
- <p>操作员: {{ file.f_username }}</p>
23
- <p>分类: {{ file.fusetype }}</p>
24
- <p>说明: {{ file.fremarks }}</p>
25
- <a :href="file.f_downloadpath" target="_blank">预览</a>
26
- <a-button v-if="isDelete === '1'" @click="delet(file.id)">删除</a-button>
27
- </div>
28
- </div>
29
- </div>
30
- </a-list-item>
31
- </a-list>
32
- </div>
33
- </template>
34
-
35
- <script>
36
- import { post } from '@vue2-client/services/api'
37
- export default {
38
- props: {
39
- currUserInfo: {
40
- type: Object,
41
- default: () => undefined
42
- }
43
- },
44
- data () {
45
- return {
46
- upload_date: null,
47
- fusetype: null,
48
- files: [],
49
- fusetypes: [],
50
- isDelete: '0'
51
- }
52
- },
53
- methods: {
54
- async getfusetypes () {
55
- this.fusetypes = [{ label: '全部', value: '' }]
56
- const res = await post('/api/af-revenue/sql/singleTable_OrderBy', {
57
- data: {
58
- items: 'fusetype',
59
- tablename: 't_files',
60
- condition: `fusetype is not null GROUP BY fusetype`,
61
- orderitem: 'fusetype'
62
- }
63
- })
64
- this.fusetypes.push(...res.map(item => ({ label: item.fusetype, value: item.fusetype })))
65
- console.log('123456', this.fusetypes)
66
- },
67
- async getFiles () {
68
- console.log('999', this.currUserInfo)
69
- if (!this.currUserInfo) return
70
- this.files = []
71
- let condition = `CONVERT(varchar(200),f_blobid) = '${this.currUserInfo.f_userinfo_id}'`
72
- if (this.upload_date) {
73
- condition += ` and CONVERT(VARCHAR(100), f_uploaddate, 23) = '${this.upload_date}'`
74
- }
75
- if (this.fusetype) {
76
- condition += ` and fusetype = '${this.fusetype}'`
77
- }
78
- const res = await post('/api/af-revenue/logic/getAllFiles', { data: { condition } })
79
- console.log('7777', res)
80
- console.log('7777', res.days)
81
- this.files = res.days.map(day => ({
82
- days: day.uploadday,
83
- arrays: res.array.filter(file => file.uploadday === day.uploadday)
84
- }))
85
- },
86
- async delet (fileId) {
87
- await this.$resetdelete('rs/entity/t_files', { id: fileId }, { resolveMsg: '删除成功', rejectMsg: '删除失败' })
88
- this.getFiles()
89
- },
90
- selfSearch () {
91
- this.getFiles()
92
- }
93
- },
94
- mounted () {
95
- if (this.$login.r.includes('上传附件删除')) {
96
- this.isDelete = '1'
97
- }
98
- this.getFiles()
99
- this.getfusetypes()
100
- }
101
- }
102
- </script>
103
-
104
- <style scoped>
105
- .filter-bar {
106
- display: flex;
107
- gap: 10px;
108
- margin-bottom: 15px;
109
- }
110
- .file-group {
111
- margin-bottom: 15px;
112
- }
113
- .file-items {
114
- display: flex;
115
- flex-wrap: wrap;
116
- gap: 10px;
117
- }
118
- .file-card {
119
- border: 1px solid #ddd;
120
- padding: 10px;
121
- border-radius: 5px;
122
- width: 200px;
123
- }
124
- .file-image {
125
- width: 100%; /* 让图片填充整个容器 */
126
- height: 150px; /* 调整高度 */
127
- object-fit: cover; /* 保持图片比例,填充整个区域 */
128
- border-radius: 5px; /* 圆角边框 */
129
- }
130
- </style>
1
+ <template>
2
+ <div>
3
+ <div class="filter-bar">
4
+ <a-date-picker v-model="upload_date" placeholder="上传日期" @change="selfSearch" />
5
+ <a-select
6
+ style="width: 200px;"
7
+ v-model="fusetype"
8
+ :options="fusetypes"
9
+ placeholder="分类"
10
+ @change="selfSearch"
11
+ allow-clear />
12
+ <a-button type="primary" @click="selfSearch">查询</a-button>
13
+ </div>
14
+ <a-list bordered>
15
+ <a-list-item v-for="item in files" :key="item.days">
16
+ <div class="file-group">
17
+ <h4>{{ item.days }}</h4>
18
+ <div class="file-items">
19
+ <div v-for="file in item.arrays" :key="file.id" class="file-card">
20
+ <img :src="file.f_downloadpath" class="file-image" v-if="file.f_filetype.includes('jpg') || file.f_filetype.includes('png')" />
21
+ <p>上传时间: {{ file.f_uploaddate }}</p>
22
+ <p>操作员: {{ file.f_username }}</p>
23
+ <p>分类: {{ file.fusetype }}</p>
24
+ <p>说明: {{ file.fremarks }}</p>
25
+ <a :href="file.f_downloadpath" target="_blank">预览</a>
26
+ <a-button v-if="isDelete === '1'" @click="delet(file.id)">删除</a-button>
27
+ </div>
28
+ </div>
29
+ </div>
30
+ </a-list-item>
31
+ </a-list>
32
+ </div>
33
+ </template>
34
+
35
+ <script>
36
+ import { post } from '@vue2-client/services/api'
37
+ export default {
38
+ props: {
39
+ currUserInfo: {
40
+ type: Object,
41
+ default: () => undefined
42
+ }
43
+ },
44
+ data () {
45
+ return {
46
+ upload_date: null,
47
+ fusetype: null,
48
+ files: [],
49
+ fusetypes: [],
50
+ isDelete: '0'
51
+ }
52
+ },
53
+ methods: {
54
+ async getfusetypes () {
55
+ this.fusetypes = [{ label: '全部', value: '' }]
56
+ const res = await post('/api/af-revenue/sql/singleTable_OrderBy', {
57
+ data: {
58
+ items: 'fusetype',
59
+ tablename: 't_files',
60
+ condition: `fusetype is not null GROUP BY fusetype`,
61
+ orderitem: 'fusetype'
62
+ }
63
+ })
64
+ this.fusetypes.push(...res.map(item => ({ label: item.fusetype, value: item.fusetype })))
65
+ console.log('123456', this.fusetypes)
66
+ },
67
+ async getFiles () {
68
+ console.log('999', this.currUserInfo)
69
+ if (!this.currUserInfo) return
70
+ this.files = []
71
+ let condition = `CONVERT(varchar(200),f_blobid) = '${this.currUserInfo.f_userinfo_id}'`
72
+ if (this.upload_date) {
73
+ condition += ` and CONVERT(VARCHAR(100), f_uploaddate, 23) = '${this.upload_date}'`
74
+ }
75
+ if (this.fusetype) {
76
+ condition += ` and fusetype = '${this.fusetype}'`
77
+ }
78
+ const res = await post('/api/af-revenue/logic/getAllFiles', { data: { condition } })
79
+ console.log('7777', res)
80
+ console.log('7777', res.days)
81
+ this.files = res.days.map(day => ({
82
+ days: day.uploadday,
83
+ arrays: res.array.filter(file => file.uploadday === day.uploadday)
84
+ }))
85
+ },
86
+ async delet (fileId) {
87
+ await this.$resetdelete('rs/entity/t_files', { id: fileId }, { resolveMsg: '删除成功', rejectMsg: '删除失败' })
88
+ this.getFiles()
89
+ },
90
+ selfSearch () {
91
+ this.getFiles()
92
+ }
93
+ },
94
+ mounted () {
95
+ if (this.$login.r.includes('上传附件删除')) {
96
+ this.isDelete = '1'
97
+ }
98
+ this.getFiles()
99
+ this.getfusetypes()
100
+ }
101
+ }
102
+ </script>
103
+
104
+ <style scoped>
105
+ .filter-bar {
106
+ display: flex;
107
+ gap: 10px;
108
+ margin-bottom: 15px;
109
+ }
110
+ .file-group {
111
+ margin-bottom: 15px;
112
+ }
113
+ .file-items {
114
+ display: flex;
115
+ flex-wrap: wrap;
116
+ gap: 10px;
117
+ }
118
+ .file-card {
119
+ border: 1px solid #ddd;
120
+ padding: 10px;
121
+ border-radius: 5px;
122
+ width: 200px;
123
+ }
124
+ .file-image {
125
+ width: 100%; /* 让图片填充整个容器 */
126
+ height: 150px; /* 调整高度 */
127
+ object-fit: cover; /* 保持图片比例,填充整个区域 */
128
+ border-radius: 5px; /* 圆角边框 */
129
+ }
130
+ </style>
@@ -1,18 +1,18 @@
1
- import { post } from '@vue2-client/services/api/restTools'
2
-
3
- const entityApi = {
4
- // 根据ID查询数据
5
- getById: (entityName, id, data = {}, serviceName = process.env.VUE_APP_SYSTEM_NAME) => {
6
- return post(`/api/${serviceName}/entity/query/${entityName}/${id}`, data)
7
- },
8
- // 根据ID集合查询所有数据
9
- findAllByIds: (entityName, data, serviceName = process.env.VUE_APP_SYSTEM_NAME) => {
10
- return post(`/api/${serviceName}/entity/query/${entityName}`, data)
11
- },
12
- // 查询实体的总数量
13
- getCount: (entityName, serviceName = process.env.VUE_APP_SYSTEM_NAME) => {
14
- return post(`/api/${serviceName}/entity/queryCount/${entityName}`, {})
15
- }
16
- }
17
-
18
- export { entityApi }
1
+ import { post } from '@vue2-client/services/api/restTools'
2
+
3
+ const entityApi = {
4
+ // 根据ID查询数据
5
+ getById: (entityName, id, data = {}, serviceName = process.env.VUE_APP_SYSTEM_NAME) => {
6
+ return post(`/api/${serviceName}/entity/query/${entityName}/${id}`, data)
7
+ },
8
+ // 根据ID集合查询所有数据
9
+ findAllByIds: (entityName, data, serviceName = process.env.VUE_APP_SYSTEM_NAME) => {
10
+ return post(`/api/${serviceName}/entity/query/${entityName}`, data)
11
+ },
12
+ // 查询实体的总数量
13
+ getCount: (entityName, serviceName = process.env.VUE_APP_SYSTEM_NAME) => {
14
+ return post(`/api/${serviceName}/entity/queryCount/${entityName}`, {})
15
+ }
16
+ }
17
+
18
+ export { entityApi }