Commit 234ff2b6 by xinla

修改bug

1 parent 410831fc
...@@ -8,16 +8,16 @@ export default { ...@@ -8,16 +8,16 @@ export default {
// 添加标签显隐 // 添加标签显隐
visible: { visible: {
type: Boolean, type: Boolean,
default: false, default: false
}, },
// 表单参数 // 表单参数
form: { form: {
type: Object, type: Object,
default: () => ({ default: () => ({
gourpName: '', gourpName: '',
weTags: [], weTags: []
}), })
}, }
}, },
data() { data() {
return { return {
...@@ -26,10 +26,10 @@ export default { ...@@ -26,10 +26,10 @@ export default {
// 表单验证规则 // 表单验证规则
rules: Object.freeze({ rules: Object.freeze({
gourpName: [{ required: true, message: '必填项', trigger: 'blur' }], gourpName: [{ required: true, message: '必填项', trigger: 'blur' }],
weTags: [{ required: true, message: '必填项', trigger: 'blur' }], weTags: [{ required: true, message: '必填项', trigger: 'blur' }]
}), }),
// 添加便签按钮显隐 // 添加便签按钮显隐
visibleAdd: false, visibleAdd: false
} }
}, },
watch: {}, watch: {},
...@@ -45,8 +45,8 @@ export default { ...@@ -45,8 +45,8 @@ export default {
}, },
set(val) { set(val) {
this.$emit('update:visible', val) this.$emit('update:visible', val)
}, }
}, }
}, },
created() {}, created() {},
mounted() {}, mounted() {},
...@@ -94,8 +94,8 @@ export default { ...@@ -94,8 +94,8 @@ export default {
this.$emit('success') this.$emit('success')
}) })
}) })
}, }
}, }
} }
</script> </script>
...@@ -162,7 +162,7 @@ export default { ...@@ -162,7 +162,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.input-new-tag { .input-new-tag {
width: 90px; width: auto;
margin-left: 10px; margin-left: 10px;
vertical-align: bottom; vertical-align: bottom;
} }
......
...@@ -5,8 +5,8 @@ export default { ...@@ -5,8 +5,8 @@ export default {
props: { props: {
type: { type: {
type: String, type: String,
default: '4', default: '4'
}, }
}, },
data() { data() {
return { return {
...@@ -17,7 +17,7 @@ export default { ...@@ -17,7 +17,7 @@ export default {
pageSize: 10, pageSize: 10,
categoryId: '', categoryId: '',
search: '', search: '',
mediaType: '4', mediaType: '4'
}, },
list: [], // 列表 list: [], // 列表
total: 0, // 总条数 total: 0, // 总条数
...@@ -25,7 +25,7 @@ export default { ...@@ -25,7 +25,7 @@ export default {
// 树props // 树props
treeProps: { treeProps: {
children: 'children', children: 'children',
label: 'name', label: 'name'
}, },
// 分组props // 分组props
groupProps: { groupProps: {
...@@ -34,15 +34,15 @@ export default { ...@@ -34,15 +34,15 @@ export default {
children: 'children', children: 'children',
label: 'name', label: 'name',
value: 'id', value: 'id',
emitPath: false, emitPath: false
}, },
radio: '', radio: ''
} }
}, },
watch: { watch: {
radio(val) { radio(val) {
this.$emit('change', val) this.$emit('change', val)
}, }
}, },
computed: {}, computed: {},
created() { created() {
...@@ -72,8 +72,8 @@ export default { ...@@ -72,8 +72,8 @@ export default {
.catch(() => { .catch(() => {
this.loading = false this.loading = false
}) })
}, }
}, }
} }
</script> </script>
...@@ -134,8 +134,17 @@ export default { ...@@ -134,8 +134,17 @@ export default {
v-model="radio" v-model="radio"
> >
<el-radio v-for="(item, index) in list" :label="item" :key="index"> <el-radio v-for="(item, index) in list" :label="item" :key="index">
<img crossorigin="anonymous" class="img-li" :src="item.materialUrl" alt /> <div class="ma-img ac mb20">
<div class="ac mt5">{{ item.materialName }}</div> <el-card shadow="hover" body-style="padding: 0px;">
<img
crossorigin="anonymous"
class="img-li"
:src="item.materialUrl"
alt
/>
</el-card>
<div class="mt10 toe">{{ item.materialName }}</div>
</div>
</el-radio> </el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
...@@ -150,8 +159,11 @@ export default { ...@@ -150,8 +159,11 @@ export default {
// transform: translate(-50%, -50%); // transform: translate(-50%, -50%);
// } // }
// } // }
.img-li { .ma-img {
width: 160px; width: 160px;
}
.img-li {
max-width: 100%;
height: 160px; height: 160px;
border-radius: 8px; border-radius: 8px;
border: 1px solid #e6ebf5; border: 1px solid #e6ebf5;
......
...@@ -7,17 +7,17 @@ export default { ...@@ -7,17 +7,17 @@ export default {
props: { props: {
fileUrl: { fileUrl: {
type: String, type: String,
default: '', default: ''
}, },
fileName: { fileName: {
type: String, type: String,
default: '', default: ''
}, },
// 0 图片(image)、1 语音(voice)、2 视频(video),3 普通文件(file) // 0 图片(image)、1 语音(voice)、2 视频(video),3 普通文件(file)
type: { type: {
type: String, type: String,
default: '0', default: '0'
}, }
// beforeUpload: { // beforeUpload: {
// type: Function, // type: Function,
// default: function() { // default: function() {
...@@ -33,14 +33,14 @@ export default { ...@@ -33,14 +33,14 @@ export default {
// ? '/wecom/material/uploadimg' // ? '/wecom/material/uploadimg'
// : '/common/uploadFile2Cos'), // : '/common/uploadFile2Cos'),
headers: window.CONFIG.headers, headers: window.CONFIG.headers,
domain: process.env.VUE_APP_BASE_API, domain: process.env.VUE_APP_BASE_API
} }
}, },
watch: {}, watch: {},
computed: { computed: {
accept() { accept() {
return ['image/*', 'amr/*', 'video/*', '*'][this.type] return ['image/*', 'amr/*', 'video/*', '*'][this.type]
}, }
}, },
created() {}, created() {},
mounted() {}, mounted() {},
...@@ -104,12 +104,13 @@ export default { ...@@ -104,12 +104,13 @@ export default {
this.loading = false this.loading = false
// this.$emit('update:fileUrl', res.data.materialUrl) // this.$emit('update:fileUrl', res.data.materialUrl)
// this.$emit('update:fileName', res.data.materialName) // this.$emit('update:fileName', res.data.materialName)
if (this.type == 0) {
res.url = res.data.url // if (this.type == 0) {
res.fileName = res.data.url // res.url = res.data.url
} // res.fileName = res.data.url
this.$emit('update:fileUrl', res.url) // }
this.$emit('update:fileName', res.fileName) this.$emit('update:fileUrl', res.data.url)
this.$emit('update:fileName', res.data.fileName)
this.$emit('update:file', file) this.$emit('update:file', file)
// this.fileUrl = URL.createObjectURL(file.raw) // this.fileUrl = URL.createObjectURL(file.raw)
} }
...@@ -117,8 +118,8 @@ export default { ...@@ -117,8 +118,8 @@ export default {
onError(err, file, fileList) { onError(err, file, fileList) {
this.loading = false this.loading = false
this.$message.error('上传文件失败') this.$message.error('上传文件失败')
}, }
}, }
} }
</script> </script>
......
...@@ -54,12 +54,12 @@ export default { ...@@ -54,12 +54,12 @@ export default {
this.getListTag() this.getListTag()
this.getListOrganization() this.getListOrganization()
// this.$store.dispatch( this.$store.dispatch(
// 'app/setBusininessDesc', 'app/setBusininessDesc',
// ` `
// <div>用于查看当前企业所有的客户列表及详细信息,支持对客户进行打标签。</div> <div>用于查看当前企业所有的客户列表及详细信息,支持对客户进行打标签。</div>
// ` `
// ) )
}, },
mounted() {}, mounted() {},
methods: { methods: {
...@@ -251,6 +251,12 @@ export default { ...@@ -251,6 +251,12 @@ export default {
this.$refs.table.clearSelection() this.$refs.table.clearSelection()
this.$refs.table.toggleRowSelection(row, true) this.$refs.table.toggleRowSelection(row, true)
}) })
},
goRoute(row) {
this.$router.push({
path: 'customerDetail',
query: { id: row.externalUserid }
})
} }
} }
} }
...@@ -330,10 +336,25 @@ export default { ...@@ -330,10 +336,25 @@ export default {
</el-form> </el-form>
<div class="mid-action"> <div class="mid-action">
<div class="total"> <div>
共 <!-- 共
<span class="num">{{ total }}</span> 位客户,实际客户 <span class="num">{{ total }}</span> 位客户,实际客户
<span class="num">{{ total }}</span> 位。 <span class="num">{{ total }}</span> 位。 -->
<el-button
v-hasPermi="['customerManage:customer:sync']"
v-preventReClick
type="primary"
@click="sync"
>同步客户</el-button
>
<el-button
v-hasPermi="['customerManage:customer:checkRepeat']"
type="primary"
>查看重复客户</el-button
>
<!-- <div>
最近同步:2021-05-17 15:05:43
</div> -->
</div> </div>
<div> <div>
<el-button <el-button
...@@ -350,17 +371,6 @@ export default { ...@@ -350,17 +371,6 @@ export default {
:disabled="multipleSelection.length !== 1" :disabled="multipleSelection.length !== 1"
>移除标签</el-button >移除标签</el-button
> >
<el-button
v-hasPermi="['customerManage:customer:sync']"
type="primary"
@click="sync"
>同步客户</el-button
>
<el-button
v-hasPermi="['customerManage:customer:checkRepeat']"
type="primary"
>查看重复客户</el-button
>
</div> </div>
</div> </div>
...@@ -378,18 +388,19 @@ export default { ...@@ -378,18 +388,19 @@ export default {
width="55" width="55"
></el-table-column> ></el-table-column>
<el-table-column label="客户" prop="name" align="center"> <el-table-column label="客户" prop="name" align="center">
<template slot-scope="scope"> <template slot-scope="{ row }">
{{ scope.row.name }} <div class="cp" @click="goRoute(row)">
<span {{ row.name }}
:style="{ color: scope.row.type === 1 ? '#4bde03' : '#f9a90b' }" <span :style="{ color: row.type === 1 ? '#4bde03' : '#f9a90b' }">{{
>{{ { 1: '@微信', 2: '@企业微信' }[scope.row.type] }}</span { 1: '@微信', 2: '@企业微信' }[row.type]
> }}</span>
<i <i
:class="[ :class="[
'el-icon-s-custom', 'el-icon-s-custom',
{ 1: 'man', 2: 'woman' }[scope.row.gender] { 1: 'man', 2: 'woman' }[row.gender]
]" ]"
></i> ></i>
</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -398,25 +409,22 @@ export default { ...@@ -398,25 +409,22 @@ export default {
align="center" align="center"
></el-table-column> ></el-table-column>
<el-table-column prop="userName" label="添加人(首位)" align="center"> <el-table-column prop="userName" label="添加人(首位)" align="center">
<template slot-scope="scope">{{ <template slot-scope="{ row }">{{
scope.row.weFlowerCustomerRels[0] row.weFlowerCustomerRels[0]
? scope.row.weFlowerCustomerRels[0].userName ? row.weFlowerCustomerRels[0].userName
: '' : ''
}}</template> }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="createTime" label="添加时间" align="center"> <el-table-column prop="createTime" label="添加时间" align="center">
<template slot-scope="scope">{{ <template slot-scope="{ row }">{{
scope.row.weFlowerCustomerRels[0] row.weFlowerCustomerRels[0]
? scope.row.weFlowerCustomerRels[0].createTime ? row.weFlowerCustomerRels[0].createTime
: '' : ''
}}</template> }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="address" label="标签" align="center"> <el-table-column prop="address" label="标签" align="center">
<template slot-scope="scope"> <template slot-scope="{ row }">
<div <div v-for="(item, index) in row.weFlowerCustomerRels" :key="index">
v-for="(item, index) in scope.row.weFlowerCustomerRels"
:key="index"
>
<el-tag <el-tag
type="info" type="info"
v-for="(unit, unique) in item.weFlowerCustomerTagRels" v-for="(unit, unique) in item.weFlowerCustomerTagRels"
...@@ -427,15 +435,10 @@ export default { ...@@ -427,15 +435,10 @@ export default {
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="100"> <el-table-column label="操作" width="100">
<template slot-scope="scope"> <template slot-scope="{ row }">
<el-button <el-button
v-hasPermi="['customerManage:customer:view']" v-hasPermi="['customerManage:customer:view']"
@click=" @click="goRoute(row)"
$router.push({
path: 'customerDetail',
query: { id: scope.row.externalUserid }
})
"
type="text" type="text"
size="small" size="small"
>查看</el-button >查看</el-button
......
...@@ -67,7 +67,6 @@ export default { ...@@ -67,7 +67,6 @@ export default {
'app/setBusininessDesc', 'app/setBusininessDesc',
` `
<div>群活码原理为把多个群二维码统一为固定的活码,群满自动切换新群,无需手动更新二维码,并未改变微信原有入群规则。</div> <div>群活码原理为把多个群二维码统一为固定的活码,群满自动切换新群,无需手动更新二维码,并未改变微信原有入群规则。</div>
<div>本质上相当于一个中间跳转页面,当一个群快满时,会自动在跳转页面中显示另一个群的二维码,从而突破客户加群的限制。</div>
` `
) )
}, },
......
...@@ -249,12 +249,12 @@ export default { ...@@ -249,12 +249,12 @@ export default {
</el-form> </el-form>
<div class="mid-action"> <div class="mid-action">
<div class="total"> <!-- <div class="total">
己选 己选
<span class="num">{{ total }}</span> 条,当前已经配置 <span class="num">{{ total }}</span> 条,当前已经配置
<span class="num">{{ total }}</span> 个 最多配置 <span class="num">{{ total }}</span> 个 最多配置
<span class="num">{{ total }}</span> 个 <span class="num">{{ total }}</span> 个
</div> </div> -->
<div> <div>
<el-button <el-button
v-hasPermi="['wecom:code:add']" v-hasPermi="['wecom:code:add']"
...@@ -263,13 +263,13 @@ export default { ...@@ -263,13 +263,13 @@ export default {
@click="goRoute('staffAdd')" @click="goRoute('staffAdd')"
>新建员工活码</el-button >新建员工活码</el-button
> >
<el-button <!-- <el-button
v-hasPermi="['wecom:code:batchAdd']" v-hasPermi="['wecom:code:batchAdd']"
type="primary" type="primary"
size="mini" size="mini"
@click="dialogVisible = true" @click="dialogVisible = true"
>批量新建</el-button >批量新建</el-button
> > -->
<el-button <el-button
v-hasPermi="['wecom:code:remove']" v-hasPermi="['wecom:code:remove']"
type="primary" type="primary"
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!