vue2-client 1.12.98 → 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 (36) hide show
  1. package/package.json +107 -107
  2. package/src/base-client/components/common/XCollapse/XCollapse.vue +251 -251
  3. package/src/base-client/components/common/XDatePicker/index.vue +3 -0
  4. package/src/base-client/components/common/XReport/index.js +3 -3
  5. package/src/base-client/components/common/XReportGrid/XReportDemo.vue +44 -44
  6. package/src/base-client/components/common/XTimeline/XTimeline.vue +19 -18
  7. package/src/base-client/components/his/XList/XList.vue +131 -131
  8. package/src/base-client/components/his/XRadio/XRadio.vue +1 -0
  9. package/src/base-client/components/his/XSidebar/XSidebar.vue +0 -1
  10. package/src/base-client/plugins/AppData.js +126 -126
  11. package/src/expression/ExpressionRunner.js +26 -26
  12. package/src/expression/TestExpression.js +509 -509
  13. package/src/expression/core/Delegate.js +115 -115
  14. package/src/expression/core/Expression.js +1358 -1358
  15. package/src/expression/core/Program.js +932 -932
  16. package/src/expression/core/Token.js +27 -27
  17. package/src/expression/enums/ExpressionType.js +81 -81
  18. package/src/expression/enums/TokenType.js +11 -11
  19. package/src/expression/exception/BreakWayException.js +2 -2
  20. package/src/expression/exception/ContinueWayException.js +2 -2
  21. package/src/expression/exception/ExpressionException.js +28 -28
  22. package/src/expression/exception/ReturnWayException.js +14 -14
  23. package/src/expression/exception/ServiceException.js +22 -22
  24. package/src/expression/instances/LogicConsole.js +44 -44
  25. package/src/logic/LogicRunner.js +62 -62
  26. package/src/logic/TestLogic.js +13 -13
  27. package/src/logic/plugins/common/VueTools.js +30 -30
  28. package/src/logic/ts/LogicRunner.ts +67 -67
  29. package/src/logic/ts/TestLogic.ts +13 -13
  30. package/src/pages/DynamicStatistics/FavoriteList.vue +50 -50
  31. package/src/pages/ReportGrid/index.vue +76 -76
  32. package/src/pages/userInfoDetailManage/uploadFilesHistory/index.vue +1 -1
  33. package/src/router/async/router.map.js +119 -124
  34. package/src/services/api/entity.js +18 -18
  35. package/src/utils/waterMark.js +31 -31
  36. package/src/base-client/components/common/XCollapse/XCollapseDemo.vue +0 -15
@@ -1,39 +1,40 @@
1
1
  <template>
2
2
  <!-- 时间轴主容器 -->
3
- <div class='x-timeline'>
3
+ <div class="x-timeline">
4
4
  <!-- 时间轴导航栏 -->
5
- <div class='x-timeline-nav'>
5
+ <div class="x-timeline-nav">
6
6
  <!-- 导航按钮:前一周、前一天 -->
7
- <a-button type="link" @click='goToPrevWeek'>
7
+ <a-button type="link" @click="goToPrevWeek">
8
8
  <a-icon type="double-left" />
9
9
  {{ config?.prevWeekText || '前一周' }}
10
10
  </a-button>
11
- <a-button type="link" @click='goToPrevDay'>
11
+ <a-button type="link" @click="goToPrevDay">
12
12
  <a-icon type="left" />
13
13
  {{ config?.prevDayText || '前一天' }}
14
14
  </a-button>
15
15
  <!-- 日期显示区域 -->
16
- <div class='timeline-dates'>
17
- <div v-for='(date, index) in displayDates'
18
- :key='index'
19
- class='date-item'
20
- :class='{
21
- "ant-btn-primary": isCurrentDate(date),
22
- "date-weekend": isWeekend(date),
23
- "ant-btn-disabled": isDisabled(date)
24
- }'
25
- @click='selectDate(date)'
16
+ <div class="timeline-dates">
17
+ <div
18
+ v-for="(date, index) in displayDates"
19
+ :key="index"
20
+ class="date-item"
21
+ :class="{
22
+ &quot;ant-btn-primary&quot;: isCurrentDate(date),
23
+ &quot;date-weekend&quot;: isWeekend(date),
24
+ &quot;ant-btn-disabled&quot;: isDisabled(date)
25
+ }"
26
+ @click="selectDate(date)"
26
27
  >
27
- <div class='weekday'>{{ getWeekDay(date) }}</div>
28
- <div class='date'>{{ formatDate(date) }}</div>
28
+ <div class="weekday">{{ getWeekDay(date) }}</div>
29
+ <div class="date">{{ formatDate(date) }}</div>
29
30
  </div>
30
31
  </div>
31
32
  <!-- 导航按钮:后一天、后一周 -->
32
- <a-button type="link" @click='goToNextDay'>
33
+ <a-button type="link" @click="goToNextDay">
33
34
  {{ config?.nextDayText || '后一天' }}
34
35
  <a-icon type="right" />
35
36
  </a-button>
36
- <a-button type="link" @click='goToNextWeek'>
37
+ <a-button type="link" @click="goToNextWeek">
37
38
  {{ config?.nextWeekText || '后一周' }}
38
39
  <a-icon type="double-right" />
39
40
  </a-button>
@@ -1,131 +1,131 @@
1
- <template>
2
- <div class="list-wrapper">
3
- <a-list size="large" :data-source="data" itemLayout="horizontal" class="list-container" ref="listRef">
4
- <a-list-item slot="renderItem" slot-scope="item, index" class="list-item" @click="handleClick(index)">
5
- <i
6
- v-if="icon"
7
- class="icon-menu"
8
- :style="getIconStyle(item)"
9
- ></i>
10
- <span
11
- class="item-text">
12
- {{ item.number }} {{ item.name }}
13
- </span>
14
- <a-button v-if="button" type="link" class="confirm-btn" @click.stop="click(index)">{{ buttonName }}</a-button>
15
- </a-list-item>
16
- </a-list>
17
- </div>
18
- </template>
19
-
20
- <script>
21
-
22
- import { runLogic } from '@vue2-client/services/api/common'
23
-
24
- export default {
25
- name: 'XList',
26
- props: {
27
- queryParamsName: {
28
- type: Object,
29
- default: null
30
- }
31
- },
32
- inject: ['getComponentByName'],
33
- data () {
34
- return {
35
- data: [],
36
- button: false,
37
- icon: false,
38
- buttonName: ''
39
- }
40
- },
41
- created () {
42
- this.getData(this.queryParamsName)
43
- },
44
- methods: {
45
- async getData (config) {
46
- runLogic(config, {}, 'af-his').then(res => {
47
- this.button = res.button
48
- this.icon = res.icon
49
- this.buttonName = res.buttonName
50
- this.data = res.data
51
- })
52
- },
53
- handleClick (index) {
54
- this.$emit('listClick', this.data[index])
55
- },
56
- refreshList () {
57
- this.getData(this.queryParamsName)
58
- },
59
- click (index) {
60
- this.$emit('click', this.data[index])
61
- },
62
- getIconStyle (item) {
63
- return item.picture
64
- ? { backgroundImage: `url(${item.picture})` }
65
- : {}
66
- },
67
- filterData (par) {
68
- runLogic(this.queryParamsName, par, 'af-his').then(res => {
69
- this.data = res.data
70
- })
71
- }
72
- }
73
- }
74
- </script>
75
-
76
- <style scoped>
77
- .list-wrapper {
78
- max-height: 240px;
79
- overflow-y: auto;
80
- padding-right: 2px;
81
- }
82
-
83
- .list-container {
84
- width: 100%;
85
- }
86
-
87
- .list-item {
88
- height: 35px;
89
- border-radius: 6px;
90
- background-color: #F4F4F4;
91
- padding: 8px 15px;
92
- font-size: 16px;
93
- display: flex;
94
- align-items: center;
95
- width: 100%;
96
- border: 1px solid #D9D9D9;
97
- box-sizing: border-box;
98
- margin-bottom: 8px !important;
99
- }
100
-
101
- .icon-menu {
102
- display: inline-block;
103
- width: 20px;
104
- height: 20px;
105
- background-color: #ccc;
106
- margin-right: 8px;
107
- }
108
-
109
- .item-text {
110
- flex: 1;
111
- }
112
-
113
- .confirm-btn {
114
- margin-left: auto;
115
- padding: 0 8px;
116
- }
117
-
118
- /* 自定义滚动条样式 */
119
- .list-wrapper::-webkit-scrollbar {
120
- width: 6px;
121
- }
122
-
123
- .list-wrapper::-webkit-scrollbar-thumb {
124
- background-color: #d9d9d9;
125
- border-radius: 3px;
126
- }
127
-
128
- .list-wrapper::-webkit-scrollbar-track {
129
- background-color: #f0f0f0;
130
- }
131
- </style>
1
+ <template>
2
+ <div class="list-wrapper">
3
+ <a-list size="large" :data-source="data" itemLayout="horizontal" class="list-container" ref="listRef">
4
+ <a-list-item slot="renderItem" slot-scope="item, index" class="list-item" @click="handleClick(index)">
5
+ <i
6
+ v-if="icon"
7
+ class="icon-menu"
8
+ :style="getIconStyle(item)"
9
+ ></i>
10
+ <span
11
+ class="item-text">
12
+ {{ item.number }} {{ item.name }}
13
+ </span>
14
+ <a-button v-if="button" type="link" class="confirm-btn" @click.stop="click(index)">{{ buttonName }}</a-button>
15
+ </a-list-item>
16
+ </a-list>
17
+ </div>
18
+ </template>
19
+
20
+ <script>
21
+
22
+ import { runLogic } from '@vue2-client/services/api/common'
23
+
24
+ export default {
25
+ name: 'XList',
26
+ props: {
27
+ queryParamsName: {
28
+ type: Object,
29
+ default: null
30
+ }
31
+ },
32
+ inject: ['getComponentByName'],
33
+ data () {
34
+ return {
35
+ data: [],
36
+ button: false,
37
+ icon: false,
38
+ buttonName: ''
39
+ }
40
+ },
41
+ created () {
42
+ this.getData(this.queryParamsName)
43
+ },
44
+ methods: {
45
+ async getData (config) {
46
+ runLogic(config, {}, 'af-his').then(res => {
47
+ this.button = res.button
48
+ this.icon = res.icon
49
+ this.buttonName = res.buttonName
50
+ this.data = res.data
51
+ })
52
+ },
53
+ handleClick (index) {
54
+ this.$emit('listClick', this.data[index])
55
+ },
56
+ refreshList () {
57
+ this.getData(this.queryParamsName)
58
+ },
59
+ click (index) {
60
+ this.$emit('click', this.data[index])
61
+ },
62
+ getIconStyle (item) {
63
+ return item.picture
64
+ ? { backgroundImage: `url(${item.picture})` }
65
+ : {}
66
+ },
67
+ filterData (par) {
68
+ runLogic(this.queryParamsName, par, 'af-his').then(res => {
69
+ this.data = res.data
70
+ })
71
+ }
72
+ }
73
+ }
74
+ </script>
75
+
76
+ <style scoped>
77
+ .list-wrapper {
78
+ max-height: 240px;
79
+ overflow-y: auto;
80
+ padding-right: 2px;
81
+ }
82
+
83
+ .list-container {
84
+ width: 100%;
85
+ }
86
+
87
+ .list-item {
88
+ height: 35px;
89
+ border-radius: 6px;
90
+ background-color: #F4F4F4;
91
+ padding: 8px 15px;
92
+ font-size: 16px;
93
+ display: flex;
94
+ align-items: center;
95
+ width: 100%;
96
+ border: 1px solid #D9D9D9;
97
+ box-sizing: border-box;
98
+ margin-bottom: 8px !important;
99
+ }
100
+
101
+ .icon-menu {
102
+ display: inline-block;
103
+ width: 20px;
104
+ height: 20px;
105
+ background-color: #ccc;
106
+ margin-right: 8px;
107
+ }
108
+
109
+ .item-text {
110
+ flex: 1;
111
+ }
112
+
113
+ .confirm-btn {
114
+ margin-left: auto;
115
+ padding: 0 8px;
116
+ }
117
+
118
+ /* 自定义滚动条样式 */
119
+ .list-wrapper::-webkit-scrollbar {
120
+ width: 6px;
121
+ }
122
+
123
+ .list-wrapper::-webkit-scrollbar-thumb {
124
+ background-color: #d9d9d9;
125
+ border-radius: 3px;
126
+ }
127
+
128
+ .list-wrapper::-webkit-scrollbar-track {
129
+ background-color: #f0f0f0;
130
+ }
131
+ </style>
@@ -30,6 +30,7 @@ export default {
30
30
  type: Object,
31
31
  default: null
32
32
  },
33
+ // eslint-disable-next-line vue/require-default-prop
33
34
  value: [String, Number]
34
35
  },
35
36
  data () {
@@ -138,7 +138,6 @@ export default {
138
138
  configData: {
139
139
  handler (newValue) {
140
140
  console.log('configData changed:', newValue)
141
- this.renderingComponent(newValue)
142
141
  },
143
142
  immediate: true
144
143
  }
@@ -1,126 +1,126 @@
1
- import { manageApi, post } from '@vue2-client/services/api'
2
- import { handleTree } from '@vue2-client/utils/util'
3
- import { indexedDB } from '@vue2-client/utils/indexedDB'
4
- import { getConfigByName } from '@vue2-client/services/api/common'
5
-
6
- const GetAppDataService = {
7
- install (Vue) {
8
- // 给vue增添对话框显示方法
9
- Vue.$appdata = Vue.prototype.$appdata = GetAppDataService
10
- },
11
- async load () {
12
- const params = {}
13
- await post(manageApi.getDictionaryValue, {}).then((res) => {
14
- Object.assign(params, res)
15
- const badgeItemArray = {}
16
- for (const key of Object.keys(params)) {
17
- badgeItemArray[key] = {}
18
- for (const item of params[key]) {
19
- let status
20
- if (!item.status) {
21
- status = 'none'
22
- } else {
23
- status = item.status
24
- }
25
- badgeItemArray[key][item.value] = {
26
- status: status,
27
- text: item.text
28
- }
29
- }
30
- }
31
- // 追加参数
32
- localStorage.setItem(process.env.VUE_APP_DICTIONARY_KEY, JSON.stringify(params))
33
- localStorage.setItem(process.env.VUE_APP_BADGE_KEY, JSON.stringify(badgeItemArray))
34
- })
35
- },
36
- // 返回树形省市区
37
- async getDivisionsOhChinaForTree () {
38
- // 获取省市区数据
39
- return new Promise((resolve, reject) => {
40
- try {
41
- indexedDB.getByWeb('divisionsOhChina', manageApi.getDivisionsOhChina, {}, res => {
42
- resolve(res)
43
- }, processRes => {
44
- return handleTree(processRes, 'code', 'parentcode')
45
- })
46
- } catch (e) {
47
- reject(e)
48
- }
49
- })
50
- },
51
- // 旧版获取配置中心字典
52
- getDictionaryList (key) {
53
- const str = localStorage.getItem(process.env.VUE_APP_DICTIONARY_KEY)
54
- const object = JSON.parse(str)
55
- return object[key]
56
- },
57
- async getDictValue (dictKey, value, func, isDev = false, serviceName = process.env.VUE_APP_SYSTEM_NAME) {
58
- const processResult = (result) => {
59
- if (!result.value) {
60
- return {
61
- status: 'none',
62
- text: value
63
- }
64
- }
65
- const item = result.value.find(item => item.value == value)
66
- if (item) {
67
- return {
68
- status: item.status || 'none',
69
- text: item.label
70
- }
71
- }
72
- return {
73
- status: 'none',
74
- text: value
75
- }
76
- }
77
- if (func) {
78
- getConfigByName(dictKey, serviceName, result => {
79
- func(processResult(result))
80
- }, isDev)
81
- } else {
82
- const result = await new Promise((resolve) => {
83
- getConfigByName(dictKey, serviceName, resolve, isDev)
84
- })
85
- return processResult(result)
86
- }
87
- },
88
- // 新版获取配置中心字典推荐使用 服务名默认为当前服务
89
- getDictByKey (dictKey, serviceName = process.env.VUE_APP_SYSTEM_NAME, callback, isDev) {
90
- getConfigByName(dictKey, undefined, result => {
91
- callback(result.value)
92
- }, isDev)
93
- },
94
- getParam (key, value, callback) {
95
- const str = localStorage.getItem(process.env.VUE_APP_BADGE_KEY)
96
- const object = JSON.parse(str)
97
- if (object && object[key]) {
98
- const result = object[key]
99
- if (Object.prototype.hasOwnProperty.call(result, value)) {
100
- return result[value]
101
- } else {
102
- return { status: 'none', text: value }
103
- }
104
- }
105
- return null
106
- },
107
- getParams () {
108
- const str = localStorage.getItem(process.env.VUE_APP_DICTIONARY_KEY)
109
- return JSON.parse(str)
110
- },
111
- getSingleValues () {
112
- const str = localStorage.getItem(process.env.VUE_APP_BADGE_KEY)
113
- return JSON.parse(str)
114
- },
115
- getWebConfigByKey (key) {
116
- const str = localStorage.getItem(process.env.VUE_APP_WEB_CONFIG_KEY)
117
- const object = JSON.parse(str)
118
- return object[key]
119
- },
120
- getStylesByKey (key) {
121
- const str = localStorage.getItem(process.env.VUE_APP_WEB_STYLES_KEY)
122
- const object = JSON.parse(str)
123
- return object[key]
124
- },
125
- }
126
- export default GetAppDataService
1
+ import { manageApi, post } from '@vue2-client/services/api'
2
+ import { handleTree } from '@vue2-client/utils/util'
3
+ import { indexedDB } from '@vue2-client/utils/indexedDB'
4
+ import { getConfigByName } from '@vue2-client/services/api/common'
5
+
6
+ const GetAppDataService = {
7
+ install (Vue) {
8
+ // 给vue增添对话框显示方法
9
+ Vue.$appdata = Vue.prototype.$appdata = GetAppDataService
10
+ },
11
+ async load () {
12
+ const params = {}
13
+ await post(manageApi.getDictionaryValue, {}).then((res) => {
14
+ Object.assign(params, res)
15
+ const badgeItemArray = {}
16
+ for (const key of Object.keys(params)) {
17
+ badgeItemArray[key] = {}
18
+ for (const item of params[key]) {
19
+ let status
20
+ if (!item.status) {
21
+ status = 'none'
22
+ } else {
23
+ status = item.status
24
+ }
25
+ badgeItemArray[key][item.value] = {
26
+ status: status,
27
+ text: item.text
28
+ }
29
+ }
30
+ }
31
+ // 追加参数
32
+ localStorage.setItem(process.env.VUE_APP_DICTIONARY_KEY, JSON.stringify(params))
33
+ localStorage.setItem(process.env.VUE_APP_BADGE_KEY, JSON.stringify(badgeItemArray))
34
+ })
35
+ },
36
+ // 返回树形省市区
37
+ async getDivisionsOhChinaForTree () {
38
+ // 获取省市区数据
39
+ return new Promise((resolve, reject) => {
40
+ try {
41
+ indexedDB.getByWeb('divisionsOhChina', manageApi.getDivisionsOhChina, {}, res => {
42
+ resolve(res)
43
+ }, processRes => {
44
+ return handleTree(processRes, 'code', 'parentcode')
45
+ })
46
+ } catch (e) {
47
+ reject(e)
48
+ }
49
+ })
50
+ },
51
+ // 旧版获取配置中心字典
52
+ getDictionaryList (key) {
53
+ const str = localStorage.getItem(process.env.VUE_APP_DICTIONARY_KEY)
54
+ const object = JSON.parse(str)
55
+ return object[key]
56
+ },
57
+ async getDictValue (dictKey, value, func, isDev = false, serviceName = process.env.VUE_APP_SYSTEM_NAME) {
58
+ const processResult = (result) => {
59
+ if (!result.value) {
60
+ return {
61
+ status: 'none',
62
+ text: value
63
+ }
64
+ }
65
+ const item = result.value.find(item => item.value == value)
66
+ if (item) {
67
+ return {
68
+ status: item.status || 'none',
69
+ text: item.label
70
+ }
71
+ }
72
+ return {
73
+ status: 'none',
74
+ text: value
75
+ }
76
+ }
77
+ if (func) {
78
+ getConfigByName(dictKey, serviceName, result => {
79
+ func(processResult(result))
80
+ }, isDev)
81
+ } else {
82
+ const result = await new Promise((resolve) => {
83
+ getConfigByName(dictKey, serviceName, resolve, isDev)
84
+ })
85
+ return processResult(result)
86
+ }
87
+ },
88
+ // 新版获取配置中心字典推荐使用 服务名默认为当前服务
89
+ getDictByKey (dictKey, serviceName = process.env.VUE_APP_SYSTEM_NAME, callback, isDev) {
90
+ getConfigByName(dictKey, undefined, result => {
91
+ callback(result.value)
92
+ }, isDev)
93
+ },
94
+ getParam (key, value, callback) {
95
+ const str = localStorage.getItem(process.env.VUE_APP_BADGE_KEY)
96
+ const object = JSON.parse(str)
97
+ if (object && object[key]) {
98
+ const result = object[key]
99
+ if (Object.prototype.hasOwnProperty.call(result, value)) {
100
+ return result[value]
101
+ } else {
102
+ return { status: 'none', text: value }
103
+ }
104
+ }
105
+ return null
106
+ },
107
+ getParams () {
108
+ const str = localStorage.getItem(process.env.VUE_APP_DICTIONARY_KEY)
109
+ return JSON.parse(str)
110
+ },
111
+ getSingleValues () {
112
+ const str = localStorage.getItem(process.env.VUE_APP_BADGE_KEY)
113
+ return JSON.parse(str)
114
+ },
115
+ getWebConfigByKey (key) {
116
+ const str = localStorage.getItem(process.env.VUE_APP_WEB_CONFIG_KEY)
117
+ const object = JSON.parse(str)
118
+ return object[key]
119
+ },
120
+ getStylesByKey (key) {
121
+ const str = localStorage.getItem(process.env.VUE_APP_WEB_STYLES_KEY)
122
+ const object = JSON.parse(str)
123
+ return object[key]
124
+ },
125
+ }
126
+ export default GetAppDataService
@@ -1,26 +1,26 @@
1
- import Program from './core/Program'
2
-
3
- export default class ExpressionRunner {
4
- /**
5
- * Runs an expression with parameters
6
- *
7
- * @param source Expression source
8
- * @param params Expression parameters
9
- * @returns The result of the expression
10
- */
11
- static async run (source, params) {
12
- const delegate = this.getDelegate(source)
13
- return await delegate.invoke(params)
14
- }
15
-
16
- /**
17
- * Gets the delegate for the expression
18
- *
19
- * @param source Expression source
20
- * @returns A delegate to invoke
21
- */
22
- static getDelegate (source) {
23
- // Parse the source and return a delegate
24
- return new Program(source).parse()
25
- }
26
- }
1
+ import Program from './core/Program'
2
+
3
+ export default class ExpressionRunner {
4
+ /**
5
+ * Runs an expression with parameters
6
+ *
7
+ * @param source Expression source
8
+ * @param params Expression parameters
9
+ * @returns The result of the expression
10
+ */
11
+ static async run (source, params) {
12
+ const delegate = this.getDelegate(source)
13
+ return await delegate.invoke(params)
14
+ }
15
+
16
+ /**
17
+ * Gets the delegate for the expression
18
+ *
19
+ * @param source Expression source
20
+ * @returns A delegate to invoke
21
+ */
22
+ static getDelegate (source) {
23
+ // Parse the source and return a delegate
24
+ return new Program(source).parse()
25
+ }
26
+ }