@web-utils/component 2.40.0 → 2.50.0
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/fy-form-design/index.mjs +33 -33
- package/package.json +1 -1
- package/web-types.json +1 -1
package/fy-form-design/index.mjs
CHANGED
|
@@ -5899,44 +5899,44 @@ const Ya = {
|
|
|
5899
5899
|
let { props: d } = this.data;
|
|
5900
5900
|
d || (d = { label: "label", value: "value" });
|
|
5901
5901
|
const { value: f } = d, te = `(res, cb) => {
|
|
5902
|
-
|
|
5903
|
-
|
|
5904
|
-
|
|
5905
|
-
|
|
5902
|
+
let { page, value, data } = res
|
|
5903
|
+
if (!page) page = { currentPage: 1, pageSize: 10 }
|
|
5904
|
+
const { currentPage, pageSize } = page
|
|
5905
|
+
let params = { ...data, ${i || "current"}: currentPage, ${s || "page"}: pageSize }
|
|
5906
5906
|
|
|
5907
|
-
|
|
5907
|
+
if (value) params['${f}'] = value
|
|
5908
5908
|
|
|
5909
|
-
|
|
5909
|
+
if ('${t || "get"}' == 'get') params = { params: { ...params } }
|
|
5910
5910
|
|
|
5911
|
-
|
|
5912
|
-
|
|
5913
|
-
|
|
5911
|
+
this.$axios['${t}']('${l}', params).then(res => {
|
|
5912
|
+
const response = this.getAsVal(res, '${n || "data.data"}')
|
|
5913
|
+
if (!response) this.$message.error('未查询到数据或者返回层级配置错误')
|
|
5914
5914
|
|
|
5915
|
-
|
|
5916
|
-
|
|
5917
|
-
|
|
5918
|
-
|
|
5919
|
-
|
|
5920
|
-
|
|
5921
|
-
|
|
5922
|
-
|
|
5923
|
-
|
|
5924
|
-
|
|
5925
|
-
|
|
5926
|
-
|
|
5927
|
-
|
|
5928
|
-
|
|
5929
|
-
|
|
5930
|
-
|
|
5931
|
-
|
|
5915
|
+
let result = {}
|
|
5916
|
+
if (${a}) {
|
|
5917
|
+
const total = this.getAsVal(response, '${o || "total"}')
|
|
5918
|
+
if (total || total == 0) {
|
|
5919
|
+
result.total = total
|
|
5920
|
+
} else {
|
|
5921
|
+
this.$message.error('总条数配置错误')
|
|
5922
|
+
return
|
|
5923
|
+
}
|
|
5924
|
+
const records = this.getAsVal(response, '${r || "records"}')
|
|
5925
|
+
if (records) {
|
|
5926
|
+
result.data = records
|
|
5927
|
+
} else {
|
|
5928
|
+
this.$message.error('列表配置错误')
|
|
5929
|
+
return
|
|
5930
|
+
}
|
|
5931
|
+
} else result = { total: response.length, data: response }
|
|
5932
5932
|
|
|
5933
|
-
|
|
5934
|
-
|
|
5935
|
-
|
|
5936
|
-
|
|
5937
|
-
|
|
5938
|
-
|
|
5939
|
-
|
|
5933
|
+
if (value) {
|
|
5934
|
+
const records = result.data
|
|
5935
|
+
if (records && records.length > 0) cb(records[0])
|
|
5936
|
+
else this.$message.error('根据${f}: ' + value + ' 查询不到结果')
|
|
5937
|
+
} else cb(result)
|
|
5938
|
+
})
|
|
5939
|
+
}`;
|
|
5940
5940
|
this.onLoad = te;
|
|
5941
5941
|
}
|
|
5942
5942
|
}
|
package/package.json
CHANGED