Commit 9660ff38 by 李长胜

修改

1 parent 28f5db39
...@@ -9,12 +9,15 @@ ...@@ -9,12 +9,15 @@
}, },
"dependencies": { "dependencies": {
"axios": "^0.21.1", "axios": "^0.21.1",
"cnpm": "^7.1.0",
"core-js": "^3.4.4", "core-js": "^3.4.4",
"glsx-common": "^1.4.6", "glsx-common": "^1.4.6",
"vue": "^2.6.11",
"glsx-components": "^1.1.2", "glsx-components": "^1.1.2",
"glsx-table": "^1.0.9", "glsx-table": "^1.0.9",
"vue-amap": "^0.5.10" "vue": "^2.6.11",
"vue-amap": "^0.5.10",
"vue-loader": "^15.9.8",
"vue-template-compiler": "^2.6.14"
}, },
"devDependencies": { "devDependencies": {
"@vue/cli-plugin-babel": "^4.1.0", "@vue/cli-plugin-babel": "^4.1.0",
...@@ -33,8 +36,7 @@ ...@@ -33,8 +36,7 @@
"node-sass": "^4.14.1", "node-sass": "^4.14.1",
"prettier": "^1.19.1", "prettier": "^1.19.1",
"sass-loader": "^8.0.0", "sass-loader": "^8.0.0",
"vue-cli-plugin-element": "^1.0.1", "vue-cli-plugin-element": "^1.0.1"
"vue-template-compiler": "^2.6.11"
}, },
"browserslist": [ "browserslist": [
"> 1%", "> 1%",
......
...@@ -82,7 +82,6 @@ export default { ...@@ -82,7 +82,6 @@ export default {
// 设置全选 // 设置全选
var arr = tabMenu.find(i => i.accounttypeId == tabName).products.find(j => j.productId == productTab).merchantProTreeResponses var arr = tabMenu.find(i => i.accounttypeId == tabName).products.find(j => j.productId == productTab).merchantProTreeResponses
this.$refs[`tree_${tabName}_${productTab}`][0].setCheckedKeys(this.getAllId(arr)) this.$refs[`tree_${tabName}_${productTab}`][0].setCheckedKeys(this.getAllId(arr))
console.log(tabMenu)
}, },
productClick(productId) { productClick(productId) {
this.productTab = productId this.productTab = productId
......
...@@ -11,21 +11,21 @@ ...@@ -11,21 +11,21 @@
<span class="content-title">账户信息</span> <span class="content-title">账户信息</span>
<div class="detail-content"> <div class="detail-content">
<el-row> <el-row>
<el-col :span="14"> <el-col :span="14" class="flexCol">
<span class="itemName">登录账户名:</span> <span class="itemName">登录账户名:</span>
<span class="itemValue">{{ firstPageObj.merchantLoginAccount || '-' }}</span> <span class="itemValue">{{ firstPageObj.merchantLoginAccount || '-' }}</span>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10" class="flexCol">
<span class="itemName itemNameCol2">账户等级:</span> <span class="itemName itemNameCol2">账户等级:</span>
<span class="itemValue">{{ firstPageObj.accountLevelName || '-' }}</span> <span class="itemValue">{{ firstPageObj.accountLevelName || '-' }}</span>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="14"> <el-col :span="14" class="flexCol">
<span class="itemName">开通模式:</span> <span class="itemName">开通模式:</span>
<span class="itemValue">{{ firstPageObj.merchantModelName || '-' }}</span> <span class="itemValue">{{ firstPageObj.merchantModelName || '-' }}</span>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10" class="flexCol">
<span class="itemName itemNameCol2">账户状态:</span> <span class="itemName itemNameCol2">账户状态:</span>
<span class="itemValue"> <span class="itemValue">
{{ firstPageObj.statusName || '-' }} {{ firstPageObj.statusName || '-' }}
...@@ -33,11 +33,11 @@ ...@@ -33,11 +33,11 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="14"> <el-col :span="14" class="flexCol">
<span class="itemName">关联企业微信名:</span> <span class="itemName">关联企业微信名:</span>
<span class="itemValue">{{ firstPageObj.entmicroName || '-' }}</span> <span class="itemValue">{{ firstPageObj.entmicroName || '-' }}</span>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10" class="flexCol">
<span class="itemName itemNameCol2">账户有效期:</span> <span class="itemName itemNameCol2">账户有效期:</span>
<span class="itemValue">{{ firstPageObj.effectiveTimeName }}</span> <span class="itemValue">{{ firstPageObj.effectiveTimeName }}</span>
</el-col> </el-col>
...@@ -82,13 +82,13 @@ ...@@ -82,13 +82,13 @@
<div class="MsgWrap companyMsg"> <div class="MsgWrap companyMsg">
<div class="grayLine"></div> <div class="grayLine"></div>
<span class="content-title">企业信息</span> <span class="content-title">企业信息</span>
<div class="detail-content"> <div class="detail-content" style="flex">
<el-row> <el-row>
<el-col :span="14"> <el-col :span="14" class="flexCol">
<span class="itemName">商户名称:</span> <span class="itemName">商户名称:</span>
<span class="itemValue">{{ firstPageObj.merchantName || '-' }}</span> <span class="itemValue">{{ firstPageObj.merchantName || '-' }}</span>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10" class="flexCol">
<span class="itemName itemNameCol2">简称:</span> <span class="itemName itemNameCol2">简称:</span>
<span class="itemValue"> <span class="itemValue">
{{ firstPageObj.merchantAbbreviation || '-' }} {{ firstPageObj.merchantAbbreviation || '-' }}
...@@ -96,40 +96,43 @@ ...@@ -96,40 +96,43 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="14"> <el-col :span="14" class="flexCol">
<span class="itemName">商户类型:</span> <span class="itemName">商户类型:</span>
<span class="itemValue">{{ firstPageObj.merchantTypeName || '-' }}</span> <span class="itemValue">{{ firstPageObj.merchantTypeName || '-' }}</span>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10" class="flexCol">
<span class="itemName itemNameCol2">身份证:</span> <span class="itemName itemNameCol2" v-if="firstPageObj.merchantType == 2">组织机构代码:</span>
<span class="itemName itemNameCol2" v-else>身份证:</span>
<span class="itemValue">{{ firstPageObj.merchantOrgcode || '-' }}</span> <span class="itemValue">{{ firstPageObj.merchantOrgcode || '-' }}</span>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="14"> <el-col :span="14" class="flexCol">
<span class="itemName">地址:</span> <span class="itemName">地址:</span>
<span class="itemValue"> <span class="itemValue">
{{ firstPageObj.merchantAddress || '-' }} {{ firstPageObj.merchantAddress || '-' }}
</span> </span>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10" class="flexCol">
<span class="itemName itemNameCol2">联系人:</span> <span class="itemName itemNameCol2">联系人:</span>
<span class="itemValue">{{ firstPageObj.merchantLegalPerson || '-' }}</span> <span class="itemValue">{{ firstPageObj.merchantLegalPerson || '-' }}</span>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="14"> <el-col :span="14" class="flexCol">
<span class="itemName">联系电话:</span> <span class="itemName">联系电话:</span>
<span class="itemValue">{{ firstPageObj.merchantLegalPersonPhone || '-' }}</span> <span class="itemValue">{{ firstPageObj.merchantLegalPersonPhone || '-' }}</span>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10" class="flexCol">
<span class="itemName itemNameCol2">营业范围:</span> <span class="itemName itemNameCol2">营业范围:</span>
<span class="itemValue">{{ firstPageObj.businessScopName || '-' }}</span> <!-- roleData.businessScopName = roleData.businessScopName ? roleData.businessScopName + ',' + roleData.businessScopeCustomize : roleData.businessScopeCustomize -->
<span class="itemValue">{{ firstPageObj.businessScopName ? firstPageObj.businessScopName + ',' + firstPageObj.businessScopeCustomize : firstPageObj.businessScopeCustomize ? firstPageObj.businessScopeCustomize : '-' }}</span>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="12" class="flexCol">
<span class="itemName">主营品牌:</span> <span class="itemName">主营品牌:</span>
<span class="itemValue">{{ firstPageObj.merchantBrandName || '-' }}</span> <span class="itemValue">{{ firstPageObj.merchantBrandName || '-' }}</span>
</el-col> </el-col>
...@@ -164,7 +167,8 @@ ...@@ -164,7 +167,8 @@
<el-button type="primary" size="small" @click="filterTreeListFun">查询</el-button> <el-button type="primary" size="small" @click="filterTreeListFun">查询</el-button>
</div> </div>
<div class="secondTreeWrap"> <div class="secondTreeWrap">
<el-tree ref="tree" :default-expanded-keys="expandedIds" :data="secondTreeList" node-key="id" :filter-node-method="filterNode"> <!-- :default-expanded-keys="expandedIds" -->
<el-tree ref="tree" default-expand-all :data="secondTreeList" node-key="id" :filter-node-method="filterNode">
<!--知识点过长处理,鼠标悬浮文字弹框显示全部内容--> <!--知识点过长处理,鼠标悬浮文字弹框显示全部内容-->
<span slot-scope="{ node }" class="custom-tree-node"> <span slot-scope="{ node }" class="custom-tree-node">
<el-tooltip class="item" effect="dark" :content="node.label" placement="top-start"> <el-tooltip class="item" effect="dark" :content="node.label" placement="top-start">
...@@ -173,15 +177,7 @@ ...@@ -173,15 +177,7 @@
</span> </span>
</el-tree> </el-tree>
</div> </div>
<!-- <form class="layui-form" action="">
<div class="layui-inline">
<div class="layui-input-inline" style="width: 232px">
<input class="layui-input" id="treeInput" placeholder="请输入" name="nameVal" />
</div>
<button type="button" id="merchantBtn" class="layui-btn">查询</button>
</div>
</form>
<ul id="merchantTree" class="ztree wrapper-tree"></ul> -->
</div> </div>
<div class="merchant-right"> <div class="merchant-right">
<div> <div>
...@@ -196,6 +192,7 @@ ...@@ -196,6 +192,7 @@
<el-button type="primary" id="tableSearch" size="small" @click="getSecondTable">查询</el-button> <el-button type="primary" id="tableSearch" size="small" @click="getSecondTable">查询</el-button>
</div> </div>
</div> </div>
<!-- :height="'350px'" -->
<GLTable ref="subMerchantTable" :tableTotal="subMerchantTableTotal" :hasPage="false" :tableData="subMerchantTableList" :hasNum="true" :pageConf="pageConf" :tableParams="secondtableParams" @refreshTable="getSecondTable"></GLTable> <GLTable ref="subMerchantTable" :tableTotal="subMerchantTableTotal" :hasPage="false" :tableData="subMerchantTableList" :hasNum="true" :pageConf="pageConf" :tableParams="secondtableParams" @refreshTable="getSecondTable"></GLTable>
</div> </div>
</div> </div>
...@@ -291,7 +288,7 @@ export default { ...@@ -291,7 +288,7 @@ export default {
}, },
{ {
label: '修改内容', label: '修改内容',
prop: 'modifyContent' prop: 'action'
}, },
{ {
label: '操作人', label: '操作人',
...@@ -336,6 +333,29 @@ export default { ...@@ -336,6 +333,29 @@ export default {
// }, // },
methods: { methods: {
//将后台返回数据中数值为空的字段全部替换为“-”
formateNullFieldData(initialData) {
const isEmpty = function(val) {
if (!String(val) || String(val) === 'null') {
return '-'
}
return val
}
var that = this
if (initialData instanceof Array) {
initialData.forEach(function(val, key, array) {
array[key] = that.formateNullFieldData(val)
})
} else if (initialData instanceof Object) {
for (let pro in initialData) {
initialData[pro] = that.formateNullFieldData(initialData[pro])
}
} else {
//数据为基本类型时
initialData = isEmpty(initialData)
}
return initialData
},
handleCancel() { handleCancel() {
this.$router.push('/account/index') this.$router.push('/account/index')
}, },
...@@ -386,7 +406,6 @@ export default { ...@@ -386,7 +406,6 @@ export default {
getSecondTree() { getSecondTree() {
this.$apis.merchant.getSecondTree({ id: this.merchantId }).then(res => { this.$apis.merchant.getSecondTree({ id: this.merchantId }).then(res => {
if (res) { if (res) {
console.log('二页的树', res)
this.secondTreeList = res this.secondTreeList = res
this.expandedIds = res.map(item => item.id) this.expandedIds = res.map(item => item.id)
} }
...@@ -403,12 +422,17 @@ export default { ...@@ -403,12 +422,17 @@ export default {
this.$apis.merchant.getSecondTable(param).then(res => { this.$apis.merchant.getSecondTable(param).then(res => {
if (res) { if (res) {
console.log('2', res) console.log('2', res)
this.subMerchantTableList = res
let data = this.formateNullFieldData(res)
this.subMerchantTableList = data
this.subMerchantTableTotal = res.length this.subMerchantTableTotal = res.length
} }
if (res && res.length == 0) { // total > 50?calc(100vh - '199px'): calc(100vh - '152px')
this.$refs.subMerchantTable.setTableHeightFun() this.$refs.subMerchantTable.tableHeightValues=`calc(100vh - 300px)`
} // if (res && res.length == 0) {
// this.$refs.subMerchantTable.setTableHeightFun()
// }
}) })
}, },
getThirdTable() { getThirdTable() {
...@@ -515,6 +539,9 @@ export default { ...@@ -515,6 +539,9 @@ export default {
// padding-bottom: 30px; // padding-bottom: 30px;
.el-row { .el-row {
margin-top: 20px; margin-top: 20px;
.flexCol {
display: flex;
}
.itemName { .itemName {
display: inline-block; display: inline-block;
margin-right: 10px; margin-right: 10px;
...@@ -527,14 +554,19 @@ export default { ...@@ -527,14 +554,19 @@ export default {
line-height: 20px; line-height: 20px;
} }
.itemNameCol2 { .itemNameCol2 {
width: 90px; width: 100px;
} }
.itemValue { .itemValue {
height: 20px; // height: 20px;
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
color: #666666; color: #666666;
line-height: 20px;
// line-height: 20px;
display: inline-block;
width: calc(100% - 200px);
word-wrap:break-word;
line-height:initial;
} }
.account-type-span { .account-type-span {
display: inline-block; display: inline-block;
...@@ -627,7 +659,9 @@ export default { ...@@ -627,7 +659,9 @@ export default {
.merchant-left { .merchant-left {
padding-top: 15px; padding-top: 15px;
padding-left: 20px; padding-left: 20px;
min-height: calc(100vh - 200px); // min-height: calc(100vh - 200px);
// max-height: 100vh;
background-color: #fff; background-color: #fff;
width: 360px; width: 360px;
margin-right: 20px; margin-right: 20px;
...@@ -679,6 +713,8 @@ export default { ...@@ -679,6 +713,8 @@ export default {
} }
.secondTreeWrap { .secondTreeWrap {
margin-top: 20px; margin-top: 20px;
height: calc(100vh - 350px);
overflow-y: auto;
} }
} }
// .ztree .wrapper-tree { // .ztree .wrapper-tree {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!