c2f1a553 by weimo934

feat(jzx):界址线

1 parent d4a61983
......@@ -6,48 +6,51 @@ import request from "@/plugin/axios";
* @constructor
*/
export function savemjft(data) {
return request({
url: "/zd/qjGygyzdmjft/insertQjGygyzdmjft",
method: "post",
data: data,
});
return request({
url: "/zd/qjGygyzdmjft/insertQjGygyzdmjft",
method: "post",
data: data,
});
}
/**
* 新增宗地基本信息
*/
export function insertQjZdjbxx(data) {
return request({
url: "zd/qjZdjbxx/insertQjZdjbxx",
method: "post",
data: data,
});
return request({
url: "zd/qjZdjbxx/insertQjZdjbxx",
method: "post",
data: data,
});
}
/**
* 新增宗地基本信息
*/
export function getBdcdyh (dpdm,dptype) {
export function getBdcdyh(dpdm, dptype) {
return request({
url: '/system/generator/getBdcdyh',
method: 'get',
params:{
dpdm:dpdm,
dptype:dptype
params: {
dpdm: dpdm,
dptype: dptype
}
})
}
/**
* 查询界址点
*/
export function queryjzd(glBsm) {
return request({
url: "/zd/qjJzd/getQjJzdListByGlBsm",
method: "get",
params: {
glBsm,
},
});
return request({
url: "/zd/qjJzd/getQjJzdListByGlBsm",
method: "get",
params: {
glBsm,
},
});
}
/**
* 查询界址线
*/
......@@ -61,3 +64,47 @@ export function queryjzx(glBsm) {
})
}
/**
* 界址点单一修改
*/
export function jzdsingleModify(data) {
return request({
url: '/zd/qjJzd/singleModify',
method: 'put',
data: data
})
}
/**
* 界址点批量修改
*/
export function jzdbatchModify(data) {
return request({
url: '/zd/qjJzd/batchModify',
method: 'put',
data: data
})
}
/**
* 界址线单一修改
*/
export function jzxsingleModify(data) {
return request({
url: '/zd/qjJzx/singleModify',
method: 'put',
data: data
})
}
/**
* 界址线批量修改
*/
export function jzxsbatchModify(data) {
return request({
url: '/zd/qjJzx/batchModify',
method: 'put',
data: data
})
}
......
......@@ -56,7 +56,7 @@
<div class="plxg">
<div>
<span class=""> 界标类型:</span>
<el-select>
<el-select v-model="batchJzd.jblx">
<el-option
v-for="i in jblx"
:key="i.key"
......@@ -67,7 +67,7 @@
</div>
<div>
<span>界址点类型:</span>
<el-select>
<el-select v-model="batchJzd.jzdlx">
<el-option
v-for="i in jzdlx"
:key="i.key"
......@@ -80,7 +80,7 @@
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="centerDialogVisible = false">取 消</el-button>
<el-button type="primary" @click="centerDialogVisible = false">确 定</el-button>
<el-button type="primary" @click="jzdbatchsave">确 定</el-button>
</span>
</el-dialog>
</div>
......@@ -88,7 +88,8 @@
</template>
<script>
import {queryjzx} from '../../../api/zd'
import {queryjzd, jzdsingleModify, jzdbatchModify} from '../../../api/zd'
import {Message} from 'element-ui'
export default {
name: "界址点",
......@@ -148,21 +149,12 @@
value: '4'
}
],
jzdlist: [
/* {
isCheck: false,
jzdh: 'JZDH001',
sxh: '1',
xzbz: '10.0',
yzbz: '11.0',
jblx: '1',
jzdlx: '1',
iszb: 'readonly',
jbisdisabled: true,
jzdisdisabled: true
}*/
]
jzdlist: [],
batchJzd: {
bsms: [],
jblx: '1',
jzdlx: '1'
}
}
},
created() {
......@@ -170,19 +162,24 @@
},
mounted() {
// 该标识码继承过来
let bsm = '044dc12648a1f41374679281da63e93b';
queryjzx(bsm).then(res => {
let bsm = '401044005bad0557d5e3787239d8e18e';
queryjzd(bsm).then(res => {
for (let i = 0; i < res.result.length; i++) {
res.result[i]['isCheck'] = false;
res.result[i]['iszb'] = 'readonly';
res.result[i]['jzdisdisabled'] = true;
}
this.jzdlist = res.result;
console.log("=====================================")
console.log(this.jzdlist)
})
},
methods: {
save() {
console.log("保存....");
jzdsingleModify(this.jzdlist).then(res => {
console.log(res)
})
for (let item of this.jzdlist) {
if (item.isCheck) {
item.iszb = 'readonly';
......@@ -195,10 +192,12 @@
e.target.value = (e.target.value.match(/^\d*(\.?\d{0,4})/g)[0]) || null
},
changeAll(e) {
console.log(e)
if (!e.target.checked) {
this.isCheckAll = false;
return
}
this.batch.bsms.length = 0;
for (let item of this.jzdlist) {
if (!item.isCheck) {
this.isCheckAll = false;
......@@ -223,7 +222,33 @@
},
batchExit() {
console.log("批量修改")
this.centerDialogVisible = true;
let flag=false;
for (let item of this.jzdlist){
if (item.isCheck){
flag=true;
}
}
if (flag){
this.centerDialogVisible = true;
} else {
Message.info("请勾选要修改的数据")
}
},
jzdbatchsave() {
this.batchJzd.bsms.length = 0;
for (let item of this.jzdlist) {
if (item.isCheck) {
this.batchJzd.bsms.push(item.bsm);
}
}
jzdbatchModify(this.batchJzd).then(res => {
console.log(res)
if (res.success) {
this.centerDialogVisible = false;
} else {
Message.error("修改失败")
}
})
}
},
computed: {},
......@@ -231,9 +256,10 @@
}
</script>
<style scoped lang="less">
/deep/.el-input.is-disabled .el-input__inner{
color: #cc1214;
}
/* /deep/ .el-input.is-disabled .el-input__inner {
color: #606764;
}*/
.main {
box-sizing: border-box;
padding: 18px;
......@@ -264,7 +290,7 @@
cursor: text;
}
table:hover{
table:hover {
cursor: pointer;
}
</style>
......
......@@ -19,11 +19,11 @@
</tr>
<tr v-for="(item,index) in jzxlist" :key="index">
<td><input type="checkbox" v-model="item.isCheck" @change="changeAll"/></td>
<td><input type="text" class="formInput" v-model="item.qsd" readonly="readonly"/></td>
<td><input type="text" class="formInput" v-model="item.zzd" readonly="readonly"/></td>
<td><input type="text" class="formInput" v-model="item.jzdj" :readonly="item.jjisdisabled"/></td>
<td><input type="text" class="formInput" v-model="item.qdh" readonly="readonly"/></td>
<td><input type="text" class="formInput" v-model="item.zdh" readonly="readonly"/></td>
<td><input type="text" class="formInput" v-model="item.jzjj" :readonly="item.jjisdisabled"/></td>
<td>
<el-select v-model="item.jzxlx" :disabled="item.jzxisdisabled">
<el-select v-model="item.jzxlb" :disabled="item.jzxisdisabled">
<el-option
v-for="i in jzxlx"
:key="i.key"
......@@ -67,7 +67,7 @@
<div class="plxg">
<div>
<span class=""> 界址线类型:</span>
<el-select>
<el-select v-model="batchJzx.jzxlx">
<el-option
v-for="i in jzxlx"
:key="i.key"
......@@ -78,7 +78,7 @@
</div>
<div>
<span>界址线位置:</span>
<el-select>
<el-select v-model="batchJzx.jzxwz">
<el-option
v-for="i in jzxwz"
:key="i.key"
......@@ -89,7 +89,7 @@
</div>
<div>
<span>界线性质:</span>
<el-select>
<el-select v-model="batchJzx.jxxz">
<el-option
v-for="i in jxxz"
:key="i.key"
......@@ -102,7 +102,7 @@
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="centerDialogVisible = false">取 消</el-button>
<el-button type="primary" @click="centerDialogVisible = false">确 定</el-button>
<el-button type="primary" @click="jzxbatchsave">确 定</el-button>
</span>
</el-dialog>
</div>
......@@ -110,10 +110,11 @@
</template>
<script>
import {queryjzd} from '../../../api/zd'
import {queryjzx, jzxsingleModify, jzxsbatchModify} from '../../../api/zd'
import {Message} from 'element-ui'
export default {
name: "",
name: "界址线",
components: {},
props: {},
data() {
......@@ -213,46 +214,13 @@
value: '670700'
},
],
jzxlist: [
{
isCheck: false,
qsd: '11',
zzd: '1',
jzdj: '10.0',
jzxlx: '670600',
jzxwz: '1',
jxxz: '600002',
sm: '32131',
iszb: 'readonly',
jjisdisabled: true,
jzxisdisabled: true
}, {
isCheck: false,
qsd: '12',
zzd: '1',
jzdj: '10.0',
jzxlx: '670500',
jzxwz: '1',
jxxz: '600002',
sm: '3123',
iszb: 'readonly',
jjisdisabled: true,
jzxisdisabled: true
}, {
isCheck: false,
qsd: '14',
zzd: '1',
jzdj: '10.0',
jzxlx: '670700',
jzxwz: '1',
jxxz: '600004',
sm: '212',
iszb: 'readonly',
jjisdisabled: true,
jzxisdisabled: true
},
]
jzxlist: [],
batchJzx: {
bsms: [],
jzxlx: '250200',
jzxwz: '1',
jxxz: '600001'
}
}
},
created() {
......@@ -260,20 +228,24 @@
},
mounted() {
// 该标识码继承过来
let bsm = '401044005bad0557d5e3787239d8e18e';
/* queryjzd(bsm).then(res => {
for (let i = 0; i < res.result.length; i++) {
res.result[i]['isCheck'] = false;
res.result[i]['iszb'] = 'readonly';
res.result[i]['jbisdisabled'] = true;
res.result[i]['jzdisdisabled'] = true;
}
this.jzdlist = res.result;
})*/
let bsm = '044dc12648a1f41374679281da63e93b';
queryjzx(bsm).then(res => {
for (let i = 0; i < res.result.length; i++) {
res.result[i]['isCheck'] = false;
res.result[i]['jjisdisabled'] = 'readonly';
res.result[i]['jzxisdisabled'] = true;
}
this.jzxlist = res.result;
console.log("================================")
console.log(this.jzxlist)
})
},
methods: {
save() {
console.log("保存....");
jzxsingleModify(this.jzxlist).then(res => {
console.log(res)
})
for (let item of this.jzxlist) {
if (item.isCheck) {
item.jjisdisabled = 'readonly';
......@@ -286,7 +258,6 @@
},
changeAll(e) {
if (!e.target.checked) {
console.log("11111")
this.isCheckAll = false;
return
}
......@@ -314,7 +285,33 @@
},
batchExit() {
console.log("批量修改")
this.centerDialogVisible = true;
let flag = false;
for (let item of this.jzxlist) {
if (item.isCheck) {
flag = true;
}
}
if (flag) {
this.centerDialogVisible = true;
} else {
Message.info("请勾选要修改的数据")
}
},
jzxbatchsave() {
this.batchJzx.bsms.length = 0;
for (let item of this.jzxlist) {
if (item.isCheck) {
this.batchJzx.bsms.push(item.bsm);
}
}
jzxsbatchModify(this.batchJzx).then(res => {
console.log(res)
if (res.success) {
this.centerDialogVisible = false;
} else {
Message.error("修改失败")
}
})
}
},
computed: {},
......@@ -322,6 +319,11 @@
}
</script>
<style scoped lang="less">
/* /deep/ .el-input.is-disabled .el-input__inner {
color: #606764;
}*/
.main {
box-sizing: border-box;
padding: 18px;
......