Commit aa846b4b by 无尘

fix: 修改原有组件

parent 60784d87
<!--
<store-auth-detail @closeLog="closeLog"></store-auth-detail>
import storeAuthDetail from '@/components/company/store-auth-detail.vue';
-->
<template>
<el-dialog title="绑定详情" :visible.sync="dialogVisible" width="995px" :before-close="handleClose">
<div class="">
<el-table class="select-table" ref="multipleTable" height="450" :data="tableData" tooltip-effect="dark" :style="{ width: '100%', minHeight: tableH }">
<el-table-column label="操作" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.dataName }}</template>
</el-table-column>
<el-table-column prop="" label="变更前" >
<template slot-scope="scope">
{{ scope.row.dataCode }}
</template>
</el-table-column>
<el-table-column prop="" label="变更后">
<template slot-scope="scope">
{{ scope.row.chainName }}
</template>
</el-table-column>
</el-table>
</div>
</el-dialog>
</template>
<script>
import { getRequest } from '@/api/api';
import errMsg from '@/common/js/error';
// import { _debounce } from '@/common/js/public';
export default {
name: 'store-auth-detail',
props: {
taskId: {
type: String,
default() {
return '';
}
}
},
data() {
return {
dialogVisible: true,
tableData: []
};
},
computed: {},
methods: {
handleClose() {
const that = this;
that.tableData = [];
that.$emit('closeLog');
},
/**
* 路由跳转
*/
changeRoute(path) {
this.$router.push(path);
},
/**
* 获取列表数据
*/
getTableList(val) {
const that = this;
let para = {
taskId: that.taskId,
};
getRequest('/haoban-manage3-web/sync-task-detail', para)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
that.tableData = resData.result || [];
return false;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
}
},
watch: {
taskId(newData, oldData) {
const that = this;
if (newData) {
that.getTableList();
}
}
},
mounted() {
const that = this;
if (that.taskId) {
that.getTableList();
}
document.documentElement.style.backgroundColor = '#f0f2f5';
},
destroyed() {
document.documentElement.style.backgroundColor = '#fff';
},
components: {}
};
</script>
<style type="text/less" lang="less" scoped>
.line-h-18 {
line-height: 18px;
}
</style>
<!--
* @Descripttion: 当前组件信息
* @version: 1.0.0
* @Author: 无尘
* @Date: 2020-04-14 09:50:16
* @LastEditors: 无尘
* @LastEditTime: 2020-07-22 14:59:25
-->
<!--
<add-self-app :editRow="editRow" @closeText="closeText" @submitText="submitText"></add-self-app>
import addSelfApp from '@/components/set/add-self-app.vue';
-->
<template>
<el-dialog :title="!!editRow.materialId ? '自建应用' : '自建应用'" :visible.sync="dialogVisible" width="600px" :before-close="handleClose">
<div class="">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="120px" class="demo-ruleForm">
<el-form-item label="应用名称" prop="secretName">
<limitInput :inputWidth="440" :inputValue.sync="ruleForm.secretName" :holder="''" :getByType="'word'" :maxLength="50"> </limitInput>
</el-form-item>
<el-form-item label="Agentld" prop="secretVal">
<limit-textarea :inputWidth="440" :inputValue.sync="ruleForm.secretVal" :holder="''" :getByType="'word'" :maxLength="200"></limit-textarea>
</el-form-item>
<el-form-item label="Secret" prop="enterpriseId">
<limit-textarea :inputWidth="440" :inputValue.sync="ruleForm.secretVal" :holder="''" :getByType="'word'" :maxLength="200"></limit-textarea>
</el-form-item>
</el-form>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="toCancel">取消</el-button>
<el-button type="primary" @click="submitForm('ruleForm')">确定</el-button>
</div>
</el-dialog>
</template>
<script>
import limitInput from '@/components/limit-input.vue';
import limitTextarea from '@/components/limit-textarea.vue';
import { _debounce } from '@/common/js/public';
import { postRequest } from '@/api/api';
import showMsg from '@/common/js/showmsg';
import errMsg from '@/common/js/error';
export default {
props: {
editRow: {
type: Object,
default() {
return {};
}
},
categoryId: {
type: Object,
default() {
return '';
}
}
},
components: {
limitInput,
limitTextarea
},
data() {
return {
dialogVisible: true,
ruleForm: {
secretName: '',
secretVal: '',
enterpriseId: '',
secretId: ''
},
rules: {
secretName: [{ required: true, message: '请输入应用名称', trigger: 'blur' }],
secretVal: [{ required: true, message: '请输入secret', trigger: 'blur' }],
enterpriseId: [{ required: true, message: '请输入Agentld', trigger: 'blur' }]
},
brandOptions: [] //品牌
};
},
methods: {
toCancel() {
const that = this;
that.$emit('closeText');
that.$refs['ruleForm'].resetFields();
},
handleClose(done) {
const that = this;
that.$emit('closeText');
that.$refs['ruleForm'].resetFields();
},
submitForm: _debounce(function(formName) {
const that = this;
that.$refs[formName].validate(valid => {
if (valid) {
that.postSave();
}
});
}, 300),
postSave() {
const that = this;
const data = {
secretId: that.ruleForm.secretId,
secretName: that.ruleForm.secretName,
enterpriseId: that.ruleForm.enterpriseId,
memberSecret: that.ruleForm.secretVal
};
postRequest('/haoban-manage3-web/wx-enterprise-member-secret-set', data)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
showMsg.showmsg('操作成功', 'success');
that.$refs['ruleForm'].resetFields();
that.$emit('submitText');
} else {
errMsg.errorMsg(resData);
}
})
.catch(error => {
that.$message.error({
duration: 1000,
message: error.message
});
});
}
},
watch: {
editRow(newData) {
const that = this;
if (Object.keys(newData).length) {
that.ruleForm = JSON.parse(JSON.stringify(newData));
}
}
},
mounted() {
const that = this;
if (Object.keys(that.editRow).length) {
that.ruleForm = JSON.parse(JSON.stringify(that.editRow));
}
}
};
</script>
<style lang="less" scoped>
.w-440 {
width: 440px;
}
.m-b-20 {
margin-bottom: 20px;
}
.p-l-18 {
padding-left: 18px;
}
.material-content {
position: relative;
.material-body {
/* resize: none;
width: 440px;
height: 273px;
border-radius: 2px;
border: 1px solid rgba(196, 198, 207, 1); */
.el-textarea {
/deep/ .el-textarea__inner {
height: 68px;
}
}
}
}
.el-textarea {
/deep/ .el-textarea__inner {
height: 68px;
}
}
</style>
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2020-04-14 09:50:16 * @Date: 2020-04-14 09:50:16
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2020-07-20 14:48:46 * @LastEditTime: 2020-07-22 15:01:23
--> -->
<!-- <!--
<secret-set :categoryId="categoryId" @closeText="closeText" @submitText="submitText"></secret-set> <secret-set :editRow="editRow" @closeText="closeText" @submitText="submitText"></secret-set>
import secretSet from '@/components/set/secret-set.vue'; import secretSet from '@/components/set/secret-set.vue';
--> -->
<template> <template>
......
<!--
* @Descripttion: 当前组件信息
* @version: 1.0.0
* @Author: 无尘
* @Date: 2019-03-20 14:36:37
* @LastEditors: 无尘
* @LastEditTime: 2020-07-22 14:22:21
-->
<template>
<div class="my-customer-wrap common-set-wrap">
<nav-crumb :navpath="navpath"> </nav-crumb>
<div class="right-content">
<div class="right-box" :style="{ 'min-height': bgHeight }">
<div class="apps-content flex" :style="{ 'min-height': bgHeight }">
<div class="apps-content-right">
<div class="flex flex-space-between">
<div class="flex ">
<div class="auth-merchant-img">
<img src="" alt="">
</div>
<div>
<div class="auth-merchant-name w-170">
<span class="font-14 color-606266"></span><el-tag class="m-l-10" size="small" type="danger">4.0</el-tag>
</div>
</div>
</div>
<div class="overstore-tip" style="width:643px;">
<div role="alert" class="el-alert el-alert--info flex flex-align-start">
<i class="el-alert__icon el-icon-info font-12 color-2f54eb"></i>
<div class="el-alert__content">
<span class="el-alert__title color-606266 font-14">仅保存近一年失败日志</span>
</div>
</div>
</div>
</div>
<div class="m-t-20">
<el-table class="select-table" ref="multipleTable" :data="tableData" tooltip-effect="dark" :style="{ width: '100%', minHeight: tableH }">
<el-table-column label="申请事项" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.userName }}</template>
</el-table-column>
<el-table-column prop="" label="申请理由" show-overflow-tooltip>
<template slot-scope="scope">
<div class="line-18">{{ scope.row.createTime | timeStampToYmd }}</div>
<div class="line-18">{{ scope.row.createTime | timeStampToHms }}</div>
</template>
</el-table-column>
<el-table-column prop="" label="门店绑定" show-overflow-tooltip>
<template slot-scope="scope">
<div class="line-18">{{ scope.row.updateTime | timeStampToYmd }}</div>
<div class="line-18">{{ scope.row.updateTime | timeStampToHms }}</div>
</template>
</el-table-column>
<el-table-column prop="" label="门店共享" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.taskDesc | '--' }}</template>
</el-table-column>
<el-table-column prop="" label="提交人" show-overflow-tooltip>
<template slot-scope="scope">
<span class="font-14 color-606266">{{ scope.row.statusFlag == 4 ? '成功' : scope.row.statusFlag == 5 ? '完成有错误' : scope.row.statusFlag == 6 ? '有错误关闭' : '' }}</span>
</template>
</el-table-column>
<el-table-column prop="" label="审核人" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.taskDesc | '--' }}</template>
</el-table-column>
<el-table-column prop="" label="审核结果" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.taskDesc | '--' }}</template>
</el-table-column>
<el-table-column prop="" label="审核时间" show-overflow-tooltip>
<template slot-scope="scope">
<div class="line-18">{{ scope.row.createTime | timeStampToYmd }}</div>
<div class="line-18">{{ scope.row.createTime | timeStampToHms }}</div>
</template>
</el-table-column>
<el-table-column prop="" label="操作" show-overflow-tooltip>
<template slot-scope="scope">
<el-button type="text" @click="toShowLog(scope.$index, scope.row)">绑定详情</el-button>
<el-button type="text" @click="toCancleAudit(scope.$index, scope.row)">取消审核</el-button>
</template>
</el-table-column>
</el-table>
<div class="block common-wrap__page text-right m-t-24" v-if="tableData.length != 0">
<dm-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage" :page-sizes="[20, 40, 60, 80]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"> </dm-pagination>
</div>
</div>
</div>
</div>
</div>
</div>
<store-auth-detail v-if="logShow" :taskId="taskId" @closeLog="closeLog"></store-auth-detail>
<!-- <vue-gic-footer></vue-gic-footer> -->
</div>
</template>
<script>
import navCrumb from '@/components/nav/nav.vue';
import storeAuthDetail from '@/components/company/store-auth-detail.vue';
import { getRequest, postRequest } from '@/api/api';
import errMsg from '@/common/js/error';
export default {
name: 'auditLog',
data() {
return {
bgHeight: window.screen.availHeight - 288 + 'px',
// 面包屑参数
navpath: [
{
name: '首页',
path: '/index'
},
{
name: '通讯录',
path: '/contactsList'
},
{
name: '授权商户',
path: '/authMerchant'
},
{
name: '审核日志',
path: ''
}
],
searchInput: '',
// 分页参数
currentPage: 1,
pageSize: 20,
total: 0,
tableData: [],
// 绑定详情
logShow: false,
taskId: ''
};
},
computed: {},
methods: {
/**
* 查看失败日志
*/
toShowLog(index, item) {
const that = this;
that.taskId = item.taskId;
that.logShow = true;
},
closeLog() {
const that = this;
that.taskId = '';
that.logShow = false;
},
/**
* 路由跳转
*/
changeRoute(path) {
this.$router.push(path);
},
/**
* 分页---页码变化
*/
handleSizeChange(val) {
const that = this;
that.currentPage = 1;
that.pageSize = val;
that.getTableList();
},
/**
* 分页---当前页变化
*/
handleCurrentChange(val) {
const that = this;
that.currentPage = val;
that.getTableList();
},
/**
* 获取品牌
*/
getBrandData() {
const that = this;
postRequest('/haoban-manage3-web/wx-enterprise-list', {})
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
if (!!resData.result && !!resData.result.length) {
that.brandOptions = resData.result;
}
return;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
},
/**
* 获取列表数据
*/
getTableList(val) {
const that = this;
let para = {
keyWord: that.searchInput || '', // 搜索字段
pageNum: that.currentPage, // 当前页
pageSize: that.pageSize // 一页显示个数
};
getRequest('/haoban-manage3-web/sync-task', para)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
that.tableData = resData.result.result || [];
that.total = resData.result.totalCount;
return false;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
}
},
watch: {
},
mounted() {
const that = this;
that.getTableList();
document.documentElement.style.backgroundColor = '#f0f2f5';
},
destroyed() {
document.documentElement.style.backgroundColor = '#fff';
},
components: {
navCrumb,
storeAuthDetail
}
};
</script>
<style type="text/less" lang="less" scoped>
.line-h-18 {
line-height: 18px;
}
.w-170 {
width: 170px;
}
.my-customer-wrap {
height: 100%;
}
.right-content {
/*width: 100%;*/
padding: 0 20px 20px 20px;
min-height: calc(100% - 160px);
.right-box {
background: #fff;
min-height: 500px;
padding: 0px;
.apps-content {
.apps-content-right {
width: 100%;
padding: 20px;
background: #fff;
.common-set-wrap {
height: 100%;
background: #fff;
}
}
}
}
}
</style>
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2019-03-20 14:36:37 * @Date: 2019-03-20 14:36:37
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2020-06-28 11:14:26 * @LastEditTime: 2020-07-22 14:30:42
--> -->
<template> <template>
<div class="my-customer-wrap common-set-wrap"> <div class="my-customer-wrap common-set-wrap">
...@@ -14,8 +14,15 @@ ...@@ -14,8 +14,15 @@
<div class="apps-content flex" style="min-height: calc(100vh - 104px);"> <div class="apps-content flex" style="min-height: calc(100vh - 104px);">
<div class="apps-content-right"> <div class="apps-content-right">
<div class="flex flex-space-between"> <div class="flex flex-space-between">
<div></div> <div class="" style="width:643px;">
<el-button type="primary" @click="showAddDialog">新建授权</el-button> <div role="alert" class="el-alert el-alert--info flex flex-align-start">
<i class="el-alert__icon el-icon-info font-12 color-2f54eb"></i>
<div class="el-alert__content">
<span class="el-alert__title color-606266 font-14">提示:授权的商户,需在同一个微信开放平台主体下;最多授权10个商户。 </span><el-button type="text" @click="openUrl">主体查询方法</el-button>
</div>
</div>
</div>
<el-button type="primary" @click="changeRoute('/newAuthMerchant')">新建GIC商户授权</el-button>
</div> </div>
<div class="m-t-20"> <div class="m-t-20">
<el-table class="select-table" ref="multipleTable" :data="tableData" tooltip-effect="dark" :style="{ width: '100%', minHeight: tableH }"> <el-table class="select-table" ref="multipleTable" :data="tableData" tooltip-effect="dark" :style="{ width: '100%', minHeight: tableH }">
...@@ -53,11 +60,9 @@ ...@@ -53,11 +60,9 @@
</div> </div>
</div> </div>
<!-- <vue-gic-footer></vue-gic-footer> --> <!-- <vue-gic-footer></vue-gic-footer> -->
<add-enterprise v-if="addShow" @refreshData="refreshData"></add-enterprise>
</div> </div>
</template> </template>
<script> <script>
import addEnterprise from '@/components/company/add-enterprise.vue';
import navCrumb from '@/components/nav/nav.vue'; import navCrumb from '@/components/nav/nav.vue';
import { getRequest } from '@/api/api'; import { getRequest } from '@/api/api';
import errMsg from '@/common/js/error'; import errMsg from '@/common/js/error';
...@@ -66,7 +71,6 @@ export default { ...@@ -66,7 +71,6 @@ export default {
name: 'authMerchant', name: 'authMerchant',
data() { data() {
return { return {
bgHeight: window.screen.availHeight - 104 + 'px',
// 面包屑参数 // 面包屑参数
navpath: [ navpath: [
{ {
...@@ -82,31 +86,20 @@ export default { ...@@ -82,31 +86,20 @@ export default {
path: '' path: ''
} }
], ],
// 分页参数 // 分页参数
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
total: 0, total: 0,
tableData: [], tableData: [],
addShow: false
}; };
}, },
computed: {}, computed: {},
methods: { methods: {
/** /**
* 新增企业 * url 跳转
*/ */
showAddDialog() { openUrl() {
const that = this; window.open('https://developers.weixin.qq.com/community/develop/doc/00046610a9cbb0fd80f9a7dd354c09');
that.addShow = true;
},
refreshData(res) {
const that = this;
that.addShow = false;
if (res == 'close') {
return false;
}
that.getTableList();
}, },
/** /**
* 路由跳转 * 路由跳转
...@@ -157,14 +150,7 @@ export default { ...@@ -157,14 +150,7 @@ export default {
} }
}, },
watch: { watch: {
activeBrand: function(newData, oldData) {
const that = this;
that.activeBrand = newData;
},
activeGroup: function(newData, oldData) {
const that = this;
that.activeGroup = newData;
}
}, },
mounted() { mounted() {
const that = this; const that = this;
...@@ -175,8 +161,7 @@ export default { ...@@ -175,8 +161,7 @@ export default {
document.documentElement.style.backgroundColor = '#fff'; document.documentElement.style.backgroundColor = '#fff';
}, },
components: { components: {
navCrumb, navCrumb
addEnterprise
} }
}; };
</script> </script>
......
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