dev_2022-05-11
yujialong 3 years ago
parent ce92192f0b
commit 4bf36a5912
  1. 7
      src/views/parner/index.vue
  2. 38
      src/views/parner/staff.vue
  3. 1
      src/views/system/addLog.vue
  4. 11
      src/views/system/manageLog.vue

@ -36,6 +36,13 @@ export default {
methods: { methods: {
tabChange(index) { tabChange(index) {
this.active = index this.active = index
this.$router.push({
path: 'parner',
query: {
...this.$route.query,
type: index
}
})
}, },
initTabs() { initTabs() {
const btns = this.$store.state.btns const btns = this.$store.state.btns

@ -100,6 +100,13 @@
<el-table-column prop="phone" label="手机号" align="center" width="120"></el-table-column> <el-table-column prop="phone" label="手机号" align="center" width="120"></el-table-column>
<el-table-column prop="partnerClassificationName" label="团队名称" align="center" min-width="200" show-overflow-tooltip></el-table-column> <el-table-column prop="partnerClassificationName" label="团队名称" align="center" min-width="200" show-overflow-tooltip></el-table-column>
<el-table-column prop="roleName" label="授权角色" align="center" min-width="200" show-overflow-tooltip></el-table-column> <el-table-column prop="roleName" label="授权角色" align="center" min-width="200" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" align="center" width="300">
<template slot-scope="scope">
<el-button type="text" v-auth="'/system:后台账号:重置密码'" @click="resetPassword(scope.row)">重置密码</el-button>
<el-button type="text" v-auth="'/system:后台账号:删除'" @click="delStaff(scope.row)">删除</el-button>
<el-button type="text" v-auth="'/system:后台账号:删除'" @click="remove(scope.row)">移除</el-button>
</template>
</el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next" :total="total"></el-pagination> <el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next" :total="total"></el-pagination>
@ -419,6 +426,37 @@ export default {
this.page = 1 this.page = 1
this.getList() this.getList()
}, },
//
del(row) {
this.$confirm("确定要删除吗?", "提示", {
type: "warning"
}).then(() => {
this.$post(`${this.api.delPartnerAccount}?accountIds=${row.accountId}`).then(res => {
util.successMsg("删除成功")
this.getList()
}).catch(res => {})
}).catch(() => {})
},
//
remove(row) {
this.$confirm("确定要移除吗?", "提示", {
type: "warning"
}).then(() => {
this.$post(`${this.api.delPartnerAccount}?accountIds=${row.accountId}`).then(res => {
util.successMsg("移除成功")
this.getList()
}).catch(res => {})
}).catch(() => {})
},
//
resetPassword(row) {
const newPwd = Setting.initialPassword
this.$confirm(`重置后的密码为:${newPwd},确定重置?`, "提示", { type: "warning" }).then(() => {
this.$get(`${this.api.resetPwd}?userId=${row.userId}&newPwd=${newPwd}`).then(res => {
util.successMsg("重置成功")
}).catch(res => {})
}).catch(() => {})
},
// //
add() { add() {
const curNode = this.$refs.orgTree.getCurrentNode() const curNode = this.$refs.orgTree.getCurrentNode()

@ -182,6 +182,7 @@ export default {
versionName, versionName,
coverUrl: this.form.coverUrl, coverUrl: this.form.coverUrl,
logContents, logContents,
withdraw: 0,
open: draft, // 0:1: open: draft, // 0:1:
draft // 0:1:稿 draft // 0:1:稿
} }

@ -43,12 +43,11 @@
</div> </div>
<div> <div>
<template v-if="!i"> <template v-if="!i">
<span class="withdraw" v-if="item.withdraw && !item.revoke">已撤回</span> <span class="withdraw" v-if="item.withdraw">已撤回</span>
<el-button v-if="item.revoke" style="margin-right: 10px" type="primary" size="small" @click="revoke(item)">撤销</el-button> <el-button v-else style="margin-right: 10px" type="primary" size="small" @click="revoke(item)">撤销</el-button>
</template> </template>
<el-switch v-model="item.open" :active-value="0" :inactive-value="1" @change="switchOff($event, item)" v-auth="'/system:日志更新:管理:开启日志'"></el-switch> <el-switch v-model="item.open" :active-value="0" :inactive-value="1" @change="switchOff($event, item)" v-auth="'/system:日志更新:管理:开启日志'"></el-switch>
</div> </div>
</div> </div>
<ul class="detail"> <ul class="detail">
<li v-for="(item, i) in item.logContents" :key="i"> <li v-for="(item, i) in item.logContents" :key="i">
@ -107,13 +106,7 @@ export default {
const vers = [] const vers = []
const platformName = Setting.platformList.find(e => e.id === logList[0].platformId).name const platformName = Setting.platformList.find(e => e.id === logList[0].platformId).name
this.platformName = platformName this.platformName = platformName
let isRevoke = 0
logList.map((e, i) => { logList.map((e, i) => {
//
if (!e.open && !isRevoke) {
e.revoke = 1
isRevoke = 1
}
e.logContents.map(n => { e.logContents.map(n => {
n.content = n.content.split('\n') n.content = n.content.split('\n')
}) })

Loading…
Cancel
Save