Commit 1128f67c authored by caimeng's avatar caimeng

弹框外面添加v-if 保证数据一定存在

parent 93d0ed80
...@@ -79,7 +79,8 @@ ...@@ -79,7 +79,8 @@
computed: { computed: {
...mapGetters(['searchData', 'user']) ...mapGetters(['searchData', 'user'])
}, },
mounted() { created() {
console.log(this.item,'nash ')
if (this.item !== null) { if (this.item !== null) {
this.form.preCreditNo = this.item.preCreditNo this.form.preCreditNo = this.item.preCreditNo
} }
......
...@@ -44,12 +44,14 @@ ...@@ -44,12 +44,14 @@
</div> </div>
<!--申述弹框--> <!--申述弹框-->
<template v-if='visible'>
<pre-plead <pre-plead
:dialog-visible='visible' :dialog-visible='visible'
:item='item' :item='item'
@handleClose='visible = false' @handleClose='visible = false'
@callback='init' @callback='init'
/> />
</template>
</div> </div>
</template> </template>
...@@ -85,7 +87,7 @@ ...@@ -85,7 +87,7 @@
// 申述 // 申述
handlePlead() { handlePlead() {
this.item = this.detail this.item = this.detail
this.item.preCreditNo = this.preCreditNo; this.item.preCreditNo = this.preCreditNo
this.visible = true this.visible = true
} }
} }
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
type='datetimerange' type='datetimerange'
:picker-options='pickerConfig' :picker-options='pickerConfig'
:default-time="['00:00:00', '23:59:59']" :default-time="['00:00:00', '23:59:59']"
value-format="yyyy-MM-dd HH:mm:ss" value-format='yyyy-MM-dd HH:mm:ss'
range-separator='至' range-separator='至'
start-placeholder='开始时间' start-placeholder='开始时间'
end-placeholder='结束时间' end-placeholder='结束时间'
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<el-form-item> <el-form-item>
<el-button icon='el-icon-search' type='primary' @click='onSubmit'>搜 索</el-button> <el-button icon='el-icon-search' type='primary' @click='onSubmit'>搜 索</el-button>
<el-button icon='el-icon-delete' type="default" @click="onReset('form')">重置</el-button> <el-button icon='el-icon-delete' type='default' @click="onReset('form')">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
> >
<template #default='{ row }'> <template #default='{ row }'>
<el-button type='text' @click='handleDetail(row)'>详情</el-button> <el-button type='text' @click='handleDetail(row)'>详情</el-button>
<template v-if='row.preStatusStr === "授信拒绝"' > <template v-if='row.preStatusStr === "授信拒绝"'>
<el-button type='text' @click='handlePlead(row)'>申述</el-button> <el-button type='text' @click='handlePlead(row)'>申述</el-button>
</template> </template>
...@@ -99,12 +99,14 @@ ...@@ -99,12 +99,14 @@
<!-- 申述 --> <!-- 申述 -->
<!--申述弹框--> <!--申述弹框-->
<template v-if='visible'>
<pre-plead <pre-plead
:dialog-visible='visible' :dialog-visible='visible'
:item='item' :item='item'
@handleClose='visible = false' @handleClose='visible = false'
@callback='fetchData' @callback='fetchData'
/> />
</template>
</div> </div>
</template> </template>
...@@ -154,7 +156,7 @@ ...@@ -154,7 +156,7 @@
order: 7, order: 7,
label: '申请时间', label: '申请时间',
prop: 'applyDate', prop: 'applyDate',
width:110, width: 110
}, },
{ {
order: 8, order: 8,
...@@ -164,7 +166,7 @@ ...@@ -164,7 +166,7 @@
], ],
list: [], list: [],
listLoading: true, listLoading: true,
pickerConfig:this.datePickerOptions, pickerConfig: this.datePickerOptions,
total: 1, total: 1,
queryForm: { queryForm: {
current: 1, current: 1,
...@@ -199,21 +201,22 @@ ...@@ -199,21 +201,22 @@
}, },
methods: { methods: {
// 申述弹框 // 申述弹框
handlePlead(row){ handlePlead(row) {
this.item = row; this.item = row
this.visible = true; console.log(row, '当前行信息')
this.visible = true
}, },
// 搜索 // 搜索
onSubmit() { onSubmit() {
const { time } = this.queryForm; const { time } = this.queryForm
this.queryForm.current = 1; this.queryForm.current = 1
if (time) { if (time) {
this.queryForm.startTime = time[0]; this.queryForm.startTime = time[0]
this.queryForm.endTime = time[1]; this.queryForm.endTime = time[1]
} else { } else {
this.queryForm.startTime = ""; this.queryForm.startTime = ''
this.queryForm.endTime = ""; this.queryForm.endTime = ''
} }
this.fetchData() this.fetchData()
}, },
...@@ -231,10 +234,10 @@ ...@@ -231,10 +234,10 @@
}, },
async fetchData() { async fetchData() {
this.listLoading = true this.listLoading = true
const form = this.queryForm; const form = this.queryForm
const params = Object.assign({}, form); const params = Object.assign({}, form)
delete params.time; delete params.time
const result = await API.preCreditList({...params}) const result = await API.preCreditList({ ...params })
const { records, total } = result.result const { records, total } = result.result
this.list = records this.list = records
this.total = total this.total = total
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment