vue2-client 1.7.5 → 1.7.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.
- package/.env +1 -0
- package/package.json +1 -1
- package/src/base-client/components/common/CreateQuery/CreateQueryItem.vue +18 -21
- package/src/base-client/plugins/AppData.js +5 -0
- package/src/pages/CreateQueryPage.vue +6 -3
- package/src/pages/login/Login.vue +9 -0
- package/src/store/modules/setting.js +5 -0
package/.env
CHANGED
package/package.json
CHANGED
|
@@ -255,25 +255,25 @@
|
|
|
255
255
|
</a-radio-button>
|
|
256
256
|
</a-radio-group>
|
|
257
257
|
</a-form-model-item>
|
|
258
|
+
<a-form-model-item label="关联外键字段" prop="selectKeyName">
|
|
259
|
+
<a-input v-model="item.selectKeyName" placeholder="该列关联的外键字段">
|
|
260
|
+
<a-popover slot="suffix" placement="bottom" title="关于关联外键字段">
|
|
261
|
+
<template slot="content">
|
|
262
|
+
<p><span style="font-weight: bold;"><span style="color: #FF0036">非必需的实验性功能:</span>设置该参数需开发岗指导</span></p>
|
|
263
|
+
<p>当字段与主子表外键有关系时,你可以指定<span style="font-weight: bold">该列所关联的外键字段名</span>
|
|
264
|
+
</p>
|
|
265
|
+
<p>设置该参数是为了该字段用作表单查询时,系统可以通过设置的关联外键字段,而非字面值作为查询条件</p>
|
|
266
|
+
<p>示例:</p>
|
|
267
|
+
<p>主表为t_userfiles(表档案)表,别名为u,与t_gasbrand(气表品牌表)有关联关系,别名为g,为了显示表档案对应的气表品牌数据,我们将数据字段名设置为g.f_gasbrand</p>
|
|
268
|
+
<p>这样我们就可以在table中看到气表品牌了,但是用户如果通过气表品牌下拉框进行筛选,我们指定的g.f_gasbrand只是气表品牌的值,而实际关联字段是u.f_gasbrand_id</p>
|
|
269
|
+
<p>所以如果我们指定了关联外键字段u.f_gasbrand_id,系统则会使用u.f_gasbrand_id筛选数据,而不是g.f_gasbrand,从而优化了查询效率
|
|
270
|
+
</p>
|
|
271
|
+
</template>
|
|
272
|
+
<a-icon style="color: rgba(0,0,0,.45)" type="info-circle"/>
|
|
273
|
+
</a-popover>
|
|
274
|
+
</a-input>
|
|
275
|
+
</a-form-model-item>
|
|
258
276
|
</template>
|
|
259
|
-
<a-form-model-item v-if="selectDataShow || item.groupIndexView" label="关联外键字段" prop="selectKeyName">
|
|
260
|
-
<a-input v-model="item.selectKeyName" placeholder="该列关联的外键字段">
|
|
261
|
-
<a-popover slot="suffix" placement="bottom" title="关于关联外键字段">
|
|
262
|
-
<template slot="content">
|
|
263
|
-
<p><span style="font-weight: bold;"><span style="color: #FF0036">非必需的实验性功能:</span>设置该参数需开发岗指导</span></p>
|
|
264
|
-
<p>当字段与主子表外键有关系时,你可以指定<span style="font-weight: bold">该列所关联的外键字段名</span>
|
|
265
|
-
</p>
|
|
266
|
-
<p>设置该参数是为了该字段用作表单查询时,系统可以通过设置的关联外键字段,而非字面值作为查询条件</p>
|
|
267
|
-
<p>示例:</p>
|
|
268
|
-
<p>主表为t_userfiles(表档案)表,别名为u,与t_gasbrand(气表品牌表)有关联关系,别名为g,为了显示表档案对应的气表品牌数据,我们将数据字段名设置为g.f_gasbrand</p>
|
|
269
|
-
<p>这样我们就可以在table中看到气表品牌了,但是用户如果通过气表品牌下拉框进行筛选,我们指定的g.f_gasbrand只是气表品牌的值,而实际关联字段是u.f_gasbrand_id</p>
|
|
270
|
-
<p>所以如果我们指定了关联外键字段u.f_gasbrand_id,系统则会使用u.f_gasbrand_id筛选数据,而不是g.f_gasbrand,从而优化了查询效率
|
|
271
|
-
</p>
|
|
272
|
-
</template>
|
|
273
|
-
<a-icon style="color: rgba(0,0,0,.45)" type="info-circle"/>
|
|
274
|
-
</a-popover>
|
|
275
|
-
</a-input>
|
|
276
|
-
</a-form-model-item>
|
|
277
277
|
<template v-if="item.formType === 'file' || item.formType === 'image'">
|
|
278
278
|
<a-divider style="font-size: 14px;margin-top: 0">文件上传相关</a-divider>
|
|
279
279
|
<a-form-model-item label="允许上传文件数量" prop="accept" style="margin-bottom: 5px;">
|
|
@@ -456,7 +456,6 @@ export default {
|
|
|
456
456
|
accept: undefined,
|
|
457
457
|
acceptCount: 3,
|
|
458
458
|
pathKey: undefined,
|
|
459
|
-
groupIndexView: undefined,
|
|
460
459
|
selectType: undefined,
|
|
461
460
|
selectKey: undefined,
|
|
462
461
|
addOrEdit: 'all',
|
|
@@ -511,8 +510,6 @@ export default {
|
|
|
511
510
|
pathKey: undefined,
|
|
512
511
|
accept: undefined,
|
|
513
512
|
selectType: undefined,
|
|
514
|
-
groupIndex: undefined,
|
|
515
|
-
groupIndexView: undefined,
|
|
516
513
|
addOrEdit: 'all',
|
|
517
514
|
selectKeyName: undefined,
|
|
518
515
|
resUploadStock: undefined,
|
|
@@ -71,6 +71,11 @@ const GetAppDataService = {
|
|
|
71
71
|
getSingleValues () {
|
|
72
72
|
const str = localStorage.getItem(process.env.VUE_APP_BADGE_KEY)
|
|
73
73
|
return JSON.parse(str)
|
|
74
|
+
},
|
|
75
|
+
getWebConfigByKey (key) {
|
|
76
|
+
const str = localStorage.getItem(process.env.VUE_APP_WEB_CONFIG_KEY)
|
|
77
|
+
const object = JSON.parse(str)
|
|
78
|
+
return object[key]
|
|
74
79
|
}
|
|
75
80
|
}
|
|
76
81
|
export default GetAppDataService
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
import CreateQuery from '@vue2-client/base-client/components/common/CreateQuery'
|
|
60
60
|
import CreateSimpleFormQuery from '@vue2-client/base-client/components/common/CreateSimpleFormQuery'
|
|
61
61
|
import { mapState } from 'vuex'
|
|
62
|
-
import { getNativeConfig } from 'vue2-client/
|
|
62
|
+
import { getNativeConfig } from '@vue2-client/services/api/common'
|
|
63
63
|
|
|
64
64
|
export default {
|
|
65
65
|
name: 'CreateQueryPage',
|
|
@@ -69,6 +69,7 @@ export default {
|
|
|
69
69
|
},
|
|
70
70
|
data () {
|
|
71
71
|
return {
|
|
72
|
+
isLoaded: false,
|
|
72
73
|
visible: false,
|
|
73
74
|
createSimpleFormVisible: false,
|
|
74
75
|
toEditJson: undefined,
|
|
@@ -115,8 +116,9 @@ export default {
|
|
|
115
116
|
}
|
|
116
117
|
} catch (e) {
|
|
117
118
|
this.$message.warn('操作失败,输入配置不是JSON格式')
|
|
119
|
+
} finally {
|
|
120
|
+
this.importJsonVisible = false
|
|
118
121
|
}
|
|
119
|
-
this.importJsonVisible = false
|
|
120
122
|
},
|
|
121
123
|
getLiuLiConfigHandleOk () {
|
|
122
124
|
try {
|
|
@@ -139,8 +141,9 @@ export default {
|
|
|
139
141
|
} catch (e) {
|
|
140
142
|
this.$message.error('操作失败:' + e)
|
|
141
143
|
throw e
|
|
144
|
+
} finally {
|
|
145
|
+
this.liuliModalVisible = false
|
|
142
146
|
}
|
|
143
|
-
this.liuliModalVisible = false
|
|
144
147
|
},
|
|
145
148
|
}
|
|
146
149
|
}
|
|
@@ -64,6 +64,7 @@ import { positions } from '@vue2-client/mock/common'
|
|
|
64
64
|
import { timeFix } from '@vue2-client/utils/util'
|
|
65
65
|
import { loginStart } from '@vue2-client/base-client/plugins/compatible/LoginServiceOA'
|
|
66
66
|
import { indexedDB } from '@vue2-client/utils/indexedDB'
|
|
67
|
+
import { getConfig } from '@vue2-client/services/api'
|
|
67
68
|
|
|
68
69
|
export default {
|
|
69
70
|
name: 'Login',
|
|
@@ -75,6 +76,14 @@ export default {
|
|
|
75
76
|
form: this.$form.createForm(this)
|
|
76
77
|
}
|
|
77
78
|
},
|
|
79
|
+
async created () {
|
|
80
|
+
await getConfig('webConfig', undefined, res => {
|
|
81
|
+
localStorage.setItem(process.env.VUE_APP_WEB_CONFIG_KEY, JSON.stringify(res))
|
|
82
|
+
if (res.setting) {
|
|
83
|
+
this.$store.commit('setting/setSetting', res.setting)
|
|
84
|
+
}
|
|
85
|
+
})
|
|
86
|
+
},
|
|
78
87
|
computed: {
|
|
79
88
|
...mapState('setting', ['systemName', 'systemDesc', 'homePage', 'ticketPage', 'compatible', 'routeName', 'defaultAvatarUrl'])
|
|
80
89
|
},
|
|
@@ -109,6 +109,11 @@ export default {
|
|
|
109
109
|
}
|
|
110
110
|
sessionStorage.setItem(process.env.VUE_APP_TBAS_TITLES_KEY, JSON.stringify(state.customTitles))
|
|
111
111
|
}
|
|
112
|
+
},
|
|
113
|
+
setSetting (state, setting) {
|
|
114
|
+
for (const key in setting) {
|
|
115
|
+
state[key] = setting[key]
|
|
116
|
+
}
|
|
112
117
|
}
|
|
113
118
|
}
|
|
114
119
|
}
|