|
@@ -73,6 +73,8 @@
|
|
|
import { Query } from "@/api/webApi"
|
|
|
import uploadItem from './upload.vue'
|
|
|
import JSEncrypt from "jsencrypt"
|
|
|
+import { mapGetters } from 'vuex'
|
|
|
+
|
|
|
export default {
|
|
|
name: 'PublicPageForm',
|
|
|
components: { uploadItem },
|
|
@@ -114,6 +116,9 @@ export default {
|
|
|
loading: false
|
|
|
}
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ ...mapGetters(['authMsg']),
|
|
|
+ },
|
|
|
watch: {
|
|
|
formItem: {
|
|
|
handler (array) {
|
|
@@ -227,7 +232,18 @@ export default {
|
|
|
return typeof returnData == 'string' ? JSON.parse(returnData) : returnData
|
|
|
},
|
|
|
//获取表单下拉数据
|
|
|
- changeSelect (code, item) { },
|
|
|
+ changeSelect (code) {
|
|
|
+ const ndata = this.authMsg.filter(item => item.labelcode && item.pagecode == code)
|
|
|
+ if (ndata?.length) {
|
|
|
+ const nitem = ndata[0]
|
|
|
+ const nval = this.tableForm[code]
|
|
|
+ const { dropdownlistlabel, labelcode, dropdownlistid } = nitem
|
|
|
+ const wdata = this.tableOptions[code].filter(item => item[dropdownlistid] == nval)
|
|
|
+ if (!wdata.length) return
|
|
|
+ const witem = wdata[0]
|
|
|
+ this.tableForm[labelcode] = witem[dropdownlistlabel]
|
|
|
+ }
|
|
|
+ },
|
|
|
inputChangeHandler (data) {
|
|
|
if (!this.tableForm[data]) this.tableForm[data] = null
|
|
|
},
|