9419d82f by 任超

style:申请查询记录

1 parent 39fdb16e
import request from '@/utils/request'
// 根据条件进行列表查询
export function getJtfcPage (data) {
return request({
url: '/sqcx/getJtfcPage',
method: 'post',
data
})
}
// 新增申请查询家庭房产信息
export function addJtfcCxjgXx (data) {
return request({
url: '/sqcx/addJtfcCxjgXx',
method: 'post',
data
})
}
\ No newline at end of file
......@@ -23,6 +23,11 @@ export default {
handleCurrentChange (val) {
this.pageData.currentPage = val
this.fetchData()
},
handleDel () {
let deleteAfterPage = Math.ceil((this.tableData.total - 1) / this.pageData.pageSize)
let currentPage = this.pageData.currentPage > deleteAfterPage ? deleteAfterPage : this.pageData.currentPage
this.pageData.currentPage = currentPage < 1 ? 1 : currentPage
}
}
}
......
......@@ -113,7 +113,7 @@ export default {
},
dataList: {
handler (newValue, oldName) {
this.tableData.data = newValue
this.tableData.data = _.cloneDeep(newValue)
},
deep: true,
immediate: true
......
......@@ -49,8 +49,9 @@
</div>
</template>
<script>
import table from "@/utils/mixin/table";
import { datas, sendThis } from "./jtfcdata";
import table from "@/utils/mixin/table"
import { datas, sendThis } from "./jtfcdata"
import { getJtfcPage } from '@/api/sqcx'
export default {
name: "jtfc",
components: {},
......@@ -88,7 +89,13 @@ export default {
},
methods: {
// 初始化数据
fetchData () { },
fetchData () {
getJtfcPage({ ...this.queryForm, ...this.pageData }).then(res => {
let { records, total } = res.result
// this.tableData.data = records
this.tableData.total = total
})
},
handleSort (name, sort) {
console.log(name, sort);
}
......
......@@ -23,9 +23,9 @@
</el-row>
</el-form>
<b class="title">权利人</b>
<personInfoTable :dataList="qldataList" />
<personInfoTable :dataList="qldataList" @getInfoList="handleGetQlList" />
<div class="submit-button">
<el-button type="primary" icon="el-icon-search">查询</el-button>
<el-button type="primary" icon="el-icon-search" @click="handleSearch">查询</el-button>
<el-button icon="el-icon-refresh-left" @click="handleReset">重置</el-button>
</div>
<b class="title">查询结果</b>
......@@ -45,6 +45,7 @@
<script>
import personInfoTable from '@/views/components/personInfoTable'
import { addJtfcCxjgXx } from '@/api/sqcx'
export default {
components: {
personInfoTable
......@@ -61,8 +62,8 @@ export default {
sqrzjhm: '',
lxdh: ''
}],
qldataList: [],
sqdataList: [],
qldataList: [],
options: [{
name: '1',
value: 1
......@@ -137,6 +138,10 @@ export default {
ruleForm: {
name: '',
radio: 1
},
addJtfc: {
sqxx: [],
qlrxx: [],
}
}
},
......@@ -145,10 +150,16 @@ export default {
this.myValue = val
this.qldataList = _.cloneDeep(this.dataList)
this.sqdataList = _.cloneDeep(this.dataList)
this.addJtfc.sqxx = _.cloneDeep(this.dataList)
this.addJtfc.qlrxx = _.cloneDeep(this.dataList)
},
'ruleForm.radio' (val) {
if (val != 1) {
this.qldataList = _.cloneDeep(this.dataList)
this.addJtfc.qlrxx = _.cloneDeep(this.dataList)
} else {
this.qldataList = this.addJtfc.sqxx
this.addJtfc.qlrxx = this.addJtfc.sqxx
}
}
},
......@@ -159,8 +170,20 @@ export default {
handleGetSqList (val) {
if (!_.isEqual(val, this.dataList) && this.ruleForm.radio == 1) {
this.qldataList = val
this.addJtfc.qlrxx = val
} else
this.addJtfc.sqxx = val
},
handleGetQlList (val) {
if (this.ruleForm.radio != 1) {
this.addJtfc.qlrxx = val
}
},
handleSearch () {
addJtfcCxjgXx(this.addJtfc).then(res => {
// console.log(res);
})
},
handleReset () {
this.qldataList = _.cloneDeep(this.dataList)
this.sqdataList = _.cloneDeep(this.dataList)
......
......@@ -52,8 +52,9 @@
</template>
<script>
import editDialog from "./components/editDialog.vue"
import table from "@/utils/mixin/table";
import { datas, sendThis } from "./sqcxjldata";
import table from "@/utils/mixin/table"
import { datas, sendThis } from "./sqcxjldata"
import { getJtfcPage } from '@/api/sqcx'
export default {
name: "sqcxjl",
components: { editDialog },
......@@ -93,7 +94,13 @@ export default {
},
methods: {
// 初始化数据
fetchData () { },
fetchData () {
getJtfcPage({ ...this.queryForm, ...this.pageData }).then(res => {
let { records, total } = res.result
// this.tableData.data = records
this.tableData.total = total
})
},
handleSort (name, sort) {
console.log(name, sort);
},
......
......@@ -57,7 +57,7 @@
<script>
import table from "@/utils/mixin/table";
import { datas, sendThis } from "./dbxdata";
import { searchTaskToDo,deleteFlow } from "@/api/ywbl.js"
import { searchTaskToDo, deleteFlow } from "@/api/ywbl.js"
import { mapGetters } from 'vuex'
export default {
name: "dbx",
......@@ -132,6 +132,7 @@ export default {
}).then(() => {
deleteFlow(formdata).then(res => {
if (res.code === 200) {
this.handleDel()
this.$message({
type: 'success',
message: '删除成功!'
......