Commit 1e631ec1 by xue_wengang

Merge branch 'dev_xzxt_xizang' of http://39.99.224.27:9022/changchao/founder_vue…

Merge branch 'dev_xzxt_xizang' of http://39.99.224.27:9022/changchao/founder_vue into dev_xzxt_xizang
parents 40cfe6f1 da7ad76d
...@@ -54,7 +54,6 @@ ...@@ -54,7 +54,6 @@
:loading="fjdcLoading" :loading="fjdcLoading"
:totalLength="fjdcPage.total" :totalLength="fjdcPage.total"
:limit="fjdcPage.limit" :limit="fjdcPage.limit"
:czShow="true"
:page="fjdcPage.page" :page="fjdcPage.page"
@toZcdy="(e) => toZcdy('fjdc', e)" @toZcdy="(e) => toZcdy('fjdc', e)"
@handleCurrentChange="(e) => handleCurrentChange('fjdc', e)" @handleCurrentChange="(e) => handleCurrentChange('fjdc', e)"
......
...@@ -113,10 +113,10 @@ ...@@ -113,10 +113,10 @@
<div class="color2" v-html="scope.row[columnTitle.prop]"></div> <div class="color2" v-html="scope.row[columnTitle.prop]"></div>
</template> </template>
</el-table-column> </el-table-column>
<!-- cxType == 'lsjsr' || -->
<el-table-column <el-table-column
v-if=" v-if="
zdygxPage == 'zdygx' || zdygxPage == 'zdygx' ||
cxType == 'lsjsr' ||
zdygxPage == 'daypbg' || zdygxPage == 'daypbg' ||
zdygxPage == 'wPdsw' zdygxPage == 'wPdsw'
" "
...@@ -212,16 +212,17 @@ export default { ...@@ -212,16 +212,17 @@ export default {
dataLength: 0, dataLength: 0,
formThead: this.DefaultAjFormThead, formThead: this.DefaultAjFormThead,
currentPage1: 1, currentPage1: 1,
page_size: 5, page_size: 2,
queryData: this.propQueryData, queryData: this.propQueryData,
tableLoading: false, tableLoading: false,
tableDataTl: [],
tableData: [], tableData: [],
key: 1, key: 1,
phoneInfo: {}, phoneInfo: {},
}; };
}, },
created() { created() {
// this.doQuery(this.doYes); this.doQuery("yes");
}, },
methods: { methods: {
addCenter() { addCenter() {
...@@ -341,6 +342,9 @@ export default { ...@@ -341,6 +342,9 @@ export default {
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.currentPage1 = val; this.currentPage1 = val;
self.tableData = self.getNeedArr(self.tableDataTl, self.page_size)[
self.currentPage1 - 1
];
this.doQuery("yes"); this.doQuery("yes");
}, },
doQueryRequest(form) { doQueryRequest(form) {
...@@ -387,7 +391,7 @@ export default { ...@@ -387,7 +391,7 @@ export default {
: parseInt(res.data.result.total); : parseInt(res.data.result.total);
self.phoneInfo = res.data.phoneInfo; self.phoneInfo = res.data.phoneInfo;
} }
console.log('11111',self.tableData); console.log("11111", self.tableData);
} else { } else {
/*self.$message({ /*self.$message({
type: "error", type: "error",
...@@ -454,9 +458,16 @@ export default { ...@@ -454,9 +458,16 @@ export default {
.doQueryRequest(JSON.stringify(json)) .doQueryRequest(JSON.stringify(json))
.then((res) => { .then((res) => {
if (res.code === 200) { if (res.code === 200) {
self.tableData = res.data.rows // self.tableData = res.data.rows
// ? res.data.rows
// : res.data.result.rows;
self.tableDataTl = res.data.rows
? res.data.rows ? res.data.rows
: res.data.result.rows; : res.data.result.rows;
self.tableData = self.getNeedArr(
self.tableDataTl,
self.page_size
)[self.currentPage1 - 1];
self.dataLength = parseInt(res.data.total) self.dataLength = parseInt(res.data.total)
? parseInt(res.data.total) ? parseInt(res.data.total)
: parseInt(res.data.result.total); : parseInt(res.data.result.total);
...@@ -480,6 +491,24 @@ export default { ...@@ -480,6 +491,24 @@ export default {
} }
} }
}, },
getNeedArr(array, size) {
const length = array.length;
if (!length || !size || size < 1) {
return [];
}
let index = 0; //用来表示切割元素的范围start
let resIndex = 0; //用来递增表示输出数组的下标
//根据length和size算出输出数组的长度,并且创建它。
let result = new Array(Math.ceil(length / size));
//进行循环
while (index < length) {
//循环过程中设置result[0]和result[1]的值。该值根据array.slice切割得到。
result[resIndex++] = array.slice(index, (index += size));
}
//输出新数组
return result;
},
}, },
watch: { watch: {
cxSj() { cxSj() {
......
...@@ -1658,7 +1658,7 @@ export default { ...@@ -1658,7 +1658,7 @@ export default {
key.trim(), key.trim(),
vi.trim() vi.trim()
); );
let path = `http://xzxt-zhyy.dsj.xz/skdsj/#/jumplogin?idcard=${skjm}&toType=yrzc&objectValue=${this.$route.query.cphm}&objectType=sfzh&menuTop=yrzc`; let path = `http://xzxt-zhyy.dsj.xz/skdsj/#/jumplogin?idcard=${skjm}&toType=yrzc&objectValue=${this.$route.query.cphm}&objectType=sjh&menuTop=yrzc`;
window.open(path, "_blank"); window.open(path, "_blank");
} }
}, },
...@@ -1772,8 +1772,9 @@ export default { ...@@ -1772,8 +1772,9 @@ export default {
self.phoneOnwer.forEach((item) => { self.phoneOnwer.forEach((item) => {
if (item.prop == "jzhm") { if (item.prop == "jzhm") {
item.value = this.$route.query.cphm; item.value = this.$route.query.cphm;
} else {
item.value = res.data.rows[0][item.prop];
} }
item.value = res.data.rows[0][item.prop];
}); });
self.sfzp = res.data.rows[0].zp; self.sfzp = res.data.rows[0].zp;
self.djjzxxLoading = false; self.djjzxxLoading = false;
......
...@@ -106,7 +106,7 @@ export default { ...@@ -106,7 +106,7 @@ export default {
ypbgbt: "", ypbgbt: "",
ypbgnr: "", ypbgnr: "",
ypbglx: "01", ypbglx: "01",
glhm: '', glhm: sessionStorage.getItem("zjhm"),
}, },
rules: { rules: {
ypbgbt: [ ypbgbt: [
...@@ -204,6 +204,7 @@ export default { ...@@ -204,6 +204,7 @@ export default {
json[i] = self.ruleForm[i]; json[i] = self.ruleForm[i];
} }
json["xxzjbh"] = self.xxzjbh; json["xxzjbh"] = self.xxzjbh;
json["glhm"] = sessionStorage.getItem("zjhm");
self.postSaveYpbg(JSON.stringify(json)).then((res) => { self.postSaveYpbg(JSON.stringify(json)).then((res) => {
if (res.success == true) { if (res.success == true) {
self.$message({ self.$message({
...@@ -225,11 +226,13 @@ export default { ...@@ -225,11 +226,13 @@ export default {
}); });
}, },
addSubmit() { addSubmit() {
debugger
let self = this; let self = this;
let json = {}; let json = {};
for (let i in self.ruleForm) { for (let i in self.ruleForm) {
json[i] = self.ruleForm[i]; json[i] = self.ruleForm[i];
} }
json["glhm"] = sessionStorage.getItem("zjhm");
self.postSaveYpbg(JSON.stringify(json)).then((res) => { self.postSaveYpbg(JSON.stringify(json)).then((res) => {
if (res.success == true) { if (res.success == true) {
self.$message({ self.$message({
......
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