Commit 3b2f27b6 by xinla

--no commit message

1 parent dc18055f
<script> <script>
import * as api from '@/api/enterpriseId' import * as api from '@/api/enterpriseId'
// import clipboard from "clipboard"; // import clipboard from "clipboard";
export default { export default {
components: {}, components: {},
props: {}, props: {},
data () { data() {
return { return {
// query: { // query: {
// pageNum: 1, // pageNum: 1,
// pageSize: 10, // pageSize: 10,
// companyName: '' // companyName: ''
// },
// total: 0,
form: {},
// list: [],
// dialogVisible: false,
disabled: false,
loading: false,
rules: Object.freeze({
companyName: [{ required: true, message: '必填项', trigger: 'blur' }],
corpId: [{ required: true, message: '必填项', trigger: 'blur' }],
corpSecret: [{ required: true, message: '必填项', trigger: 'blur' }],
agentId: [{ required: true, message: '必填项', trigger: 'blur' }],
agentSecret: [{ required: true, message: '必填项', trigger: 'blur' }],
contactSecret: [{ required: true, message: '必填项', trigger: 'blur' }],
seasRedirectUrl: [{ required: true, message: '必填项', trigger: 'blur' }],
sopTagRedirectUrl: [{ required: true, message: '必填项', trigger: 'blur' }]
})
// status: ['正常', '停用']
}
},
watch: {},
computed: {},
created () {
this.getDetail()
},
mounted () {
// new clipboard(".copy-btn");
},
methods: {
// getList(page) {
// page && (this.query.pageNum = page)
// this.loading = true
// api
// .getList(this.query)
// .then(({ rows, total }) => {
// this.list = rows
// this.total = +total
// this.loading = false
// })
// .catch(() => {
// this.loading = false
// })
// },
// edit(data, type) {
// this.form = Object.assign({}, data || {})
// this.dialogVisible = true
// type || !data ? (this.disabled = false) : (this.disabled = true)
// }, // },
// total: 0,
form: {},
// list: [],
// dialogVisible: false,
disabled: false,
loading: false,
rules: Object.freeze({
// companyName: [{ required: true, message: '必填项', trigger: 'blur' }],
corpId: [{ required: true, message: '必填项', trigger: 'blur' }],
corpSecret: [{ required: true, message: '必填项', trigger: 'blur' }],
agentId: [{ required: true, message: '必填项', trigger: 'blur' }],
agentSecret: [{ required: true, message: '必填项', trigger: 'blur' }],
contactSecret: [{ required: true, message: '必填项', trigger: 'blur' }],
seasRedirectUrl: [{ required: true, message: '必填项', trigger: 'blur' }],
sopTagRedirectUrl: [{ required: true, message: '必填项', trigger: 'blur' }]
})
// status: ['正常', '停用']
}
},
watch: {},
computed: {},
created() {
this.getDetail()
},
mounted() {
// new clipboard(".copy-btn");
},
methods: {
// getList(page) {
// page && (this.query.pageNum = page)
// this.loading = true
// api
// .getList(this.query)
// .then(({ rows, total }) => {
// this.list = rows
// this.total = +total
// this.loading = false
// })
// .catch(() => {
// this.loading = false
// })
// },
// edit(data, type) {
// this.form = Object.assign({}, data || {})
// this.dialogVisible = true
// type || !data ? (this.disabled = false) : (this.disabled = true)
// },
getDetail () { getDetail() {
this.loading = true this.loading = true
api api
.getDetail() .getDetail()
.then(({ data }) => { .then(({ data }) => {
this.form = data this.form = data
this.loading = false this.loading = false
})
.catch(() => {
this.loading = false
})
},
submit () {
this.$refs['form'].validate((valid) => {
if (valid) {
api
.addOrUpdate(this.form)
.then(() => {
this.msgSuccess('操作成功')
// this.dialogVisible = false
this.getDetail()
})
.catch(() => {
// this.dialogVisible = false
})
}
}) })
}, .catch(() => {
start (corpId) { this.loading = false
api.start(corpId).then(({ rows, total }) => {
this.msgSuccess('操作成功')
this.getList()
}) })
} },
submit() {
this.$refs['form'].validate((valid) => {
if (valid) {
api
.addOrUpdate(this.form)
.then(() => {
this.msgSuccess('操作成功')
// this.dialogVisible = false
this.getDetail()
})
.catch(() => {
// this.dialogVisible = false
})
}
})
},
start(corpId) {
api.start(corpId).then(({ rows, total }) => {
this.msgSuccess('操作成功')
this.getList()
})
} }
} }
}
</script> </script>
<template> <template>
...@@ -144,7 +144,7 @@ ...@@ -144,7 +144,7 @@
> >
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="total > 0" v-show="total > 0"
...@@ -155,12 +155,21 @@ ...@@ -155,12 +155,21 @@
/> --> /> -->
<el-card shadow="never" :body-style="{ padding: '10px 0 0 10px' }"> <el-card shadow="never" :body-style="{ padding: '10px 0 0 10px' }">
<el-form ref="form" label-suffix=":" label-position="right" :model="form" :rules="rules" size="small" label-width="160px" :disabled="disabled"> <el-form
ref="form"
label-suffix=":"
label-position="right"
:model="form"
:rules="rules"
size="small"
label-width="160px"
:disabled="disabled"
>
<el-form-item label="企业ID" prop="corpId"> <el-form-item label="企业ID" prop="corpId">
<el-input :disabled="form.id" v-model="form.corpId" placeholder=""></el-input> <el-input :disabled="form.id" v-model="form.corpId" placeholder=""></el-input>
<div class="tips">企业ID即CorpID,在企微后台->我的企业中获取</div> <div class="tips">企业ID即CorpID,在企微后台->我的企业中获取</div>
</el-form-item> </el-form-item>
<el-form-item label="企业名称" prop="companyName"> <el-form-item label="企业名称">
<el-input v-model="form.companyName" disabled placeholder="企业名称"></el-input> <el-input v-model="form.companyName" disabled placeholder="企业名称"></el-input>
<div class="tips">根据企业 ID 配置后回显,不可编辑</div> <div class="tips">根据企业 ID 配置后回显,不可编辑</div>
</el-form-item> </el-form-item>
...@@ -280,8 +289,8 @@ ...@@ -280,8 +289,8 @@
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
.tips { .tips {
color: #aaa; color: #aaa;
font-size: 12px; font-size: 12px;
} }
</style> </style>
...@@ -166,6 +166,15 @@ export default { ...@@ -166,6 +166,15 @@ export default {
this.getCode() this.getCode()
this.getCookie() this.getCookie()
this.$confirm(
'LinkWeChat V2.0 正式发布公测,遇到使用上的问题欢迎提交 Issue,我们将光速修复。',
'提示',
{
confirmButtonText: '确定',
cancelButtonText: '取消'
}
)
}, },
methods: { methods: {
getCode() { getCode() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!