|
|
@@ -7,11 +7,10 @@ Page({
|
|
|
radio: false, //是否为单选
|
|
|
idname: "userid", //idkey
|
|
|
showName: "name", //表单用 显示名称
|
|
|
+ area:''
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
- console.log(options.params,'options')
|
|
|
if (options.params && options.params != '{}') {
|
|
|
- console.log('执行了这个?')
|
|
|
this.setData({
|
|
|
params: JSON.parse(options.params)
|
|
|
})
|
|
|
@@ -39,7 +38,7 @@ Page({
|
|
|
},
|
|
|
}
|
|
|
});
|
|
|
- console.log(this.data.params,'params11111')
|
|
|
+
|
|
|
this.getList()
|
|
|
}
|
|
|
})
|
|
|
@@ -54,7 +53,6 @@ Page({
|
|
|
//init 用于初始化分页
|
|
|
if (init.detail != undefined) init = init.detail;
|
|
|
let params = this.data.params;
|
|
|
- console.log(this.data.params,'params')
|
|
|
if (init) params.content.pageNumber = 1;
|
|
|
if (params.content.pageNumber > params.content.pageTotal) return;
|
|
|
//init 用于初始化分页
|
|
|
@@ -75,6 +73,11 @@ Page({
|
|
|
},
|
|
|
/* 选中 */
|
|
|
changeResult(e) {
|
|
|
+ console.log(e)
|
|
|
+ let area = e.currentTarget.dataset.area
|
|
|
+ this.setData({
|
|
|
+ area
|
|
|
+ })
|
|
|
let {
|
|
|
id
|
|
|
} = e.currentTarget.dataset, result = this.data.result;
|
|
|
@@ -90,14 +93,11 @@ Page({
|
|
|
},
|
|
|
/* 提交 */
|
|
|
submit() {
|
|
|
- console.log(this.data.radio,'radio11')
|
|
|
- // console.log(this.data.list.find(value => value[this.data.idname] == result)[this.data.showName])
|
|
|
- console.log(this.data.list,'list2222')
|
|
|
- console.log(this.data.idname)
|
|
|
let result = this.data.result,
|
|
|
obj = this.data.radio ? {
|
|
|
id: result,
|
|
|
item: this.data.list.find(value => value[this.data.idname] == result),
|
|
|
+ area:this.data.area,
|
|
|
value: [this.data.list.find(value => value[this.data.idname] == result)[this.data.showName], result]
|
|
|
} : {
|
|
|
result,
|