Commit 36d923e2 by xinla

修改菜单结构,修改路由跳转为相对路径,便于后期路由扩展与变动,解决404问题,删除部分废弃文件等

1 parent 2340f0c8
...@@ -13,7 +13,7 @@ process.env.VUE_APP_TITLE = require('./package.json').description ...@@ -13,7 +13,7 @@ process.env.VUE_APP_TITLE = require('./package.json').description
// 如果您的应用程序部署在子路径中,则需要在这指定子路径 // 如果您的应用程序部署在子路径中,则需要在这指定子路径
// 例如:https://www.my-app.com/my-app/ // 例如:https://www.my-app.com/my-app/
// 需要将它改为'/my-app/' // 需要将它改为'/my-app/'
const BASE_URL = process.env.NODE_ENV === 'development' ? '/' : '/mobile' const BASE_URL = process.env.NODE_ENV === 'development' ? '/' : '/mobile/'
module.exports = { module.exports = {
publicPath: BASE_URL, publicPath: BASE_URL,
......
...@@ -16,16 +16,16 @@ export default { ...@@ -16,16 +16,16 @@ export default {
2: '视频', 2: '视频',
3: '普通文件', 3: '普通文件',
4: '文本', 4: '文本',
5: '海报', 5: '海报'
}), }),
metarialParams: { metarialParams: {
sideId: '', sideId: '',
materialIds: [], // '素材id列表', materialIds: [], // '素材id列表',
mediaType: '', // '素材类型 0 图片(image)、1 语音(voice)、2 视频(video),3 普通文件(file) 4 文本 5 海报', mediaType: '', // '素材类型 0 图片(image)、1 语音(voice)、2 视频(video),3 普通文件(file) 4 文本 5 海报',
checkAll: '1', // '是否全选 0 全选 1 非全选', checkAll: '1' // '是否全选 0 全选 1 非全选',
}, },
selectedMaterial: [], selectedMaterial: []
} }
}, },
watch: {}, watch: {},
...@@ -63,7 +63,7 @@ export default { ...@@ -63,7 +63,7 @@ export default {
lock: true, lock: true,
text: 'Loading', text: 'Loading',
spinner: 'el-icon-loading', spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)', background: 'rgba(0, 0, 0, 0.7)'
}) })
this.metarialParams.materialIds = this.selectedMaterial.map((d) => d.id) this.metarialParams.materialIds = this.selectedMaterial.map((d) => d.id)
if (this.metarialParams.checkAll == 0) { if (this.metarialParams.checkAll == 0) {
...@@ -92,8 +92,8 @@ export default { ...@@ -92,8 +92,8 @@ export default {
.catch(() => { .catch(() => {
this.loading = false this.loading = false
}) })
}, }
}, }
} }
</script> </script>
<template> <template>
...@@ -103,9 +103,9 @@ export default { ...@@ -103,9 +103,9 @@ export default {
<el-button type="text" @click="$router.push('explain')" <el-button type="text" @click="$router.push('explain')"
>图文详解</el-button >图文详解</el-button
> >
<el-button type="text" @click="$router.push({ path: 'config' })" <!-- <el-button type="text" @click="$router.push({ path: 'config' })"
>查看已配置信息</el-button >查看已配置信息</el-button
> > -->
</div> </div>
<el-table v-loading="loading" :data="list"> <el-table v-loading="loading" :data="list">
<el-table-column label="素材类型" align="center" prop="mediaType"> <el-table-column label="素材类型" align="center" prop="mediaType">
......
<script>
export default {
components: {},
props: {},
data() {
return {};
},
watch: {},
computed: {},
created() {},
mounted() {},
methods: {}
};
</script>
<template>
<div>
<img src="@/assets/example/groupFission.jpg" alt="" />
</div>
</template>
<style lang="less" scoped></style>
<script>
import * as api from '@/api/customer'
// import clipboard from "clipboard";
export default {
components: {},
props: {},
data() {
return {
query: {
pageNum: 1,
pageSize: 10,
name: '',
},
dateRange: [], // 添加日期
total: 0,
form: {},
list: [],
dialogVisible: false,
disabled: false,
loading: false,
rules: Object.freeze({
name: [{ required: true, message: '必填项', trigger: 'blur' }],
corpId: [{ required: true, message: '必填项', trigger: 'blur' }],
corpSecret: [{ required: true, message: '必填项', trigger: 'blur' }],
contactSecret: [{ required: true, message: '必填项', trigger: 'blur' }],
}),
status: ['正常', '停用'],
}
},
watch: {},
computed: {},
created() {
this.getList()
},
mounted() {
// new clipboard(".copy-btn");
},
methods: {
getList(page) {
if (this.dateRange) {
this.query.beginTime = this.dateRange[0]
this.query.endTime = this.dateRange[1]
} else {
this.query.beginTime = ''
this.query.endTime = ''
}
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)
},
submit() {
this.$refs['form'].validate((valid) => {
if (valid) {
api[this.form.id ? 'update' : 'add'](this.form)
.then(() => {
this.msgSuccess('操作成功')
this.dialogVisible = false
this.getList(!this.form.id && 1)
})
.catch(() => {
this.dialogVisible = false
})
}
})
},
goRoute(id, path) {
this.$router.push({
path: '/appTool/groupFissionAev',
query: { id },
})
},
},
}
</script>
<template>
<div>
<div class="top-search">
<el-form inline label-position="right" :model="form" label-width="80px">
<el-form-item label="裂变名">
<el-input v-model="query.name" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="活动日期">
<el-date-picker
v-model="dateRange"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item label>
<el-button type="primary" @click="getList(1)">查询</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</div>
<div class="ar mb10">
<el-button
v-hasPermi="['enterpriseWechat:add']"
type="primary"
icon="el-icon-plus"
@click="goRoute()"
>新建群裂变任务</el-button
>
</div>
<!-- <el-card shadow="never" :body-style="{padding: '20px 0 0'}">
</el-card>-->
<el-table v-loading="loading" :data="list">
<!-- <el-table-column type="selection" width="50" align="center" /> -->
<el-table-column
label="群裂变名称"
align="center"
prop="name"
:show-overflow-tooltip="true"
/>
<el-table-column prop="createTime" label="裂变客户数量" align="center">
<template slot-scope="scope">{{
Math.floor(Math.random() * 10000)
}}</template>
</el-table-column>
<el-table-column prop="createTime" label="活动状态" align="center">
已结束
</el-table-column>
<el-table-column
label="活动时间"
align="center"
prop="createTime"
width="160"
></el-table-column>
<el-table-column
label="操作"
align="center"
width="180"
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
<el-button
v-hasPermi="['enterpriseWechat:view']"
size="mini"
type="text"
icon="el-icon-view"
@click="edit(scope.row, 0)"
>查看</el-button
>
<el-button
v-hasPermi="['enterpriseWechat:edit']"
size="mini"
type="text"
icon="el-icon-edit"
@click="edit(scope.row, 1)"
>编辑</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="query.pageNum"
:limit.sync="query.pageSize"
@pagination="getList()"
/>
<el-dialog title="查看企业微信号" :visible.sync="dialogVisible">
<el-form
ref="form"
label-position="right"
:model="form"
:rules="rules"
label-width="160px"
:disabled="disabled"
>
<el-form-item label="企业名称" prop="name">
<el-input v-model="form.name" :disabled="form.id"></el-input>
</el-form-item>
<el-form-item label="企业ID(CorpID)" prop="corpId">
<el-input
:disabled="form.id"
v-model="form.corpId"
style="width: 80%"
placeholder="可在新闻公告应用的生日祝福等场景使用"
></el-input>
<el-link class="fr" type="primary">如何获取?</el-link>
</el-form-item>
<!-- <el-form-item label="Token">
<el-input disabled id="copy-input" v-model="form.name" placeholder="成员唯一标识,不支持更改,不支持中文"></el-input>
<el-button type="primary" class="copy-btn" data-clipboard-target="#copy-input">复制</el-button>
</el-form-item>
<el-form-item label="EncodingAESKey">
<el-input disabled id="copy-input1" v-model="form.name"></el-input>
<el-button type="primary" class="copy-btn" data-clipboard-target="#copy-input1">复制</el-button>
</el-form-item>-->
<el-form-item label="服务商secret" prop="providerSecret">
<el-input v-model="form.providerSecret" style="width: 80%"></el-input>
<el-link class="fr" type="primary">如何获取?</el-link>
</el-form-item>
<el-form-item label="通讯录管理secret" prop="corpSecret">
<el-input v-model="form.corpSecret" style="width: 80%"></el-input>
<el-link class="fr" type="primary">如何获取?</el-link>
</el-form-item>
<!-- <el-form-item label="通讯录事件服务">
<el-radio-group v-model="form.contactSecret">
<el-radio label="label">开启</el-radio>
<el-radio label="label">不开启</el-radio>
</el-radio-group>
<div>开启后,可以将成员、部门的增删改以及成员的标签变更实时的同步到仟微SCRM,无需手动更新同步。</div>
</el-form-item>-->
<el-form-item label="外部联系人管理secret" prop="contactSecret">
<el-input v-model="form.contactSecret"></el-input>
</el-form-item>
<!-- <el-form-item label="通讯录事件服务">
<el-radio-group v-model="form.model">
<el-radio label="label">开启</el-radio>
<el-radio label="label">不开启</el-radio>
</el-radio-group>
<div>开启后,可以将企业客户的添加、编辑以及主动删除客户和被动被客户删除实时的同步到仟微SCRM,无需手动更新同步。</div>
</el-form-item>-->
<el-form-item
label="企业微信扫码登陆回调地址"
prop="wxQrLoginRedirectUri"
>
<el-input v-model="form.wxQrLoginRedirectUri"></el-input>
</el-form-item>
</el-form>
<div slot="footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="submit" v-show="!disabled"
>确 定</el-button
>
</div>
</el-dialog>
</div>
</template>
...@@ -10,7 +10,7 @@ export default { ...@@ -10,7 +10,7 @@ export default {
query: { query: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
name: '', name: ''
}, },
dateRange: [], // 添加日期 dateRange: [], // 添加日期
total: 0, total: 0,
...@@ -23,10 +23,10 @@ export default { ...@@ -23,10 +23,10 @@ export default {
name: [{ required: true, message: '必填项', trigger: 'blur' }], name: [{ required: true, message: '必填项', trigger: 'blur' }],
corpId: [{ required: true, message: '必填项', trigger: 'blur' }], corpId: [{ required: true, message: '必填项', trigger: 'blur' }],
corpSecret: [{ required: true, message: '必填项', trigger: 'blur' }], corpSecret: [{ required: true, message: '必填项', trigger: 'blur' }],
contactSecret: [{ required: true, message: '必填项', trigger: 'blur' }], contactSecret: [{ required: true, message: '必填项', trigger: 'blur' }]
}), }),
status: ['正常', '停用'], status: ['正常', '停用'],
dialogVisibleSelectMaterial: false, dialogVisibleSelectMaterial: false
} }
}, },
watch: {}, watch: {},
...@@ -87,8 +87,8 @@ export default { ...@@ -87,8 +87,8 @@ export default {
}, },
goRoute(id, path) { goRoute(id, path) {
this.$router.push({ this.$router.push({
path: '/appTool/taskAev', path: 'taskAev',
query: { id }, query: { id }
}) })
}, },
...@@ -97,8 +97,8 @@ export default { ...@@ -97,8 +97,8 @@ export default {
this.form.logoMediaid = image.id this.form.logoMediaid = image.id
this.form.squareLogoUrl = image.materialUrl this.form.squareLogoUrl = image.materialUrl
this.dialogVisibleSelectMaterial = false this.dialogVisibleSelectMaterial = false
}, }
}, }
} }
</script> </script>
...@@ -237,13 +237,13 @@ export default { ...@@ -237,13 +237,13 @@ export default {
</el-dialog> </el-dialog>
<!-- 选择素材弹窗 --> <!-- 选择素材弹窗 -->
<SelectMaterial <!-- <SelectMaterial
:visible.sync="dialogVisibleSelectMaterial" :visible.sync="dialogVisibleSelectMaterial"
type="1" type="1"
:showArr="[1]" :showArr="[1]"
@success="submitSelectMaterial" @success="submitSelectMaterial"
> >
</SelectMaterial> </SelectMaterial> -->
</div> </div>
</template> </template>
......
<script>
export default {
components: {},
props: {},
data() {
return {};
},
watch: {},
computed: {},
created() {},
mounted() {},
methods: {}
};
</script>
<template>
<div>
<img src="@/assets/example/task.jpg" alt="" />
</div>
</template>
<style lang="less" scoped></style>
<script>
import * as api from '@/api/customer'
// import clipboard from "clipboard";
export default {
components: {},
props: {},
data() {
return {
query: {
pageNum: 1,
pageSize: 10,
name: '',
},
dateRange: [], // 添加日期
total: 0,
form: {},
list: [],
dialogVisible: false,
disabled: false,
loading: false,
rules: Object.freeze({
name: [{ required: true, message: '必填项', trigger: 'blur' }],
corpId: [{ required: true, message: '必填项', trigger: 'blur' }],
corpSecret: [{ required: true, message: '必填项', trigger: 'blur' }],
contactSecret: [{ required: true, message: '必填项', trigger: 'blur' }],
}),
status: ['正常', '停用'],
}
},
watch: {},
computed: {},
created() {
this.getList()
},
mounted() {
// new clipboard(".copy-btn");
},
methods: {
getList(page) {
if (this.dateRange) {
this.query.beginTime = this.dateRange[0]
this.query.endTime = this.dateRange[1]
} else {
this.query.beginTime = ''
this.query.endTime = ''
}
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)
},
submit() {
this.$refs['form'].validate((valid) => {
if (valid) {
api[this.form.id ? 'update' : 'add'](this.form)
.then(() => {
this.msgSuccess('操作成功')
this.dialogVisible = false
this.getList(!this.form.id && 1)
})
.catch(() => {
this.dialogVisible = false
})
}
})
},
goRoute(id, path) {
this.$router.push({
path: '/appTool/taskAev',
query: { id },
})
},
},
}
</script>
<template>
<div>
<div class="top-search">
<el-form inline label-position="right" :model="form" label-width="80px">
<el-form-item label="任务名">
<el-input v-model="query.name" placeholder="请输入"></el-input>
</el-form-item>
<el-form-item label="活动日期">
<el-date-picker
v-model="dateRange"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item label>
<el-button type="primary" @click="getList(1)">查询</el-button>
<el-button @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</div>
<div class="ar mb10">
<el-button
v-hasPermi="['enterpriseWechat:add']"
type="primary"
icon="el-icon-plus"
@click="goRoute()"
>新建任务</el-button
>
</div>
<!-- <el-card shadow="never" :body-style="{padding: '20px 0 0'}">
</el-card>-->
<el-table v-loading="loading" :data="list">
<!-- <el-table-column type="selection" width="50" align="center" /> -->
<el-table-column
label="任务活动名称"
align="center"
prop="name"
:show-overflow-tooltip="true"
/>
<el-table-column prop="createTime" label="裂变客户数量" align="center">
<template slot-scope="scope">{{
Math.floor(Math.random() * 10000)
}}</template>
</el-table-column>
<el-table-column prop="createTime" label="活动状态" align="center">
已结束
</el-table-column>
<el-table-column
label="活动时间"
align="center"
prop="createTime"
width="160"
></el-table-column>
<el-table-column
label="操作"
align="center"
width="180"
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
<el-button
v-hasPermi="['enterpriseWechat:view']"
size="mini"
type="text"
icon="el-icon-view"
@click="edit(scope.row, 0)"
>查看</el-button
>
<el-button
v-hasPermi="['enterpriseWechat:edit']"
size="mini"
type="text"
icon="el-icon-edit"
@click="edit(scope.row, 1)"
>编辑</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="query.pageNum"
:limit.sync="query.pageSize"
@pagination="getList()"
/>
<el-dialog title="查看企业微信号" :visible.sync="dialogVisible">
<el-form
ref="form"
label-position="right"
:model="form"
:rules="rules"
label-width="160px"
:disabled="disabled"
>
<el-form-item label="企业名称" prop="name">
<el-input v-model="form.name" :disabled="form.id"></el-input>
</el-form-item>
<el-form-item label="企业ID(CorpID)" prop="corpId">
<el-input
:disabled="form.id"
v-model="form.corpId"
style="width: 80%"
placeholder="可在新闻公告应用的生日祝福等场景使用"
></el-input>
<el-link class="fr" type="primary">如何获取?</el-link>
</el-form-item>
<!-- <el-form-item label="Token">
<el-input disabled id="copy-input" v-model="form.name" placeholder="成员唯一标识,不支持更改,不支持中文"></el-input>
<el-button type="primary" class="copy-btn" data-clipboard-target="#copy-input">复制</el-button>
</el-form-item>
<el-form-item label="EncodingAESKey">
<el-input disabled id="copy-input1" v-model="form.name"></el-input>
<el-button type="primary" class="copy-btn" data-clipboard-target="#copy-input1">复制</el-button>
</el-form-item>-->
<el-form-item label="服务商secret" prop="providerSecret">
<el-input v-model="form.providerSecret" style="width: 80%"></el-input>
<el-link class="fr" type="primary">如何获取?</el-link>
</el-form-item>
<el-form-item label="通讯录管理secret" prop="corpSecret">
<el-input v-model="form.corpSecret" style="width: 80%"></el-input>
<el-link class="fr" type="primary">如何获取?</el-link>
</el-form-item>
<!-- <el-form-item label="通讯录事件服务">
<el-radio-group v-model="form.contactSecret">
<el-radio label="label">开启</el-radio>
<el-radio label="label">不开启</el-radio>
</el-radio-group>
<div>开启后,可以将成员、部门的增删改以及成员的标签变更实时的同步到仟微SCRM,无需手动更新同步。</div>
</el-form-item>-->
<el-form-item label="外部联系人管理secret" prop="contactSecret">
<el-input v-model="form.contactSecret"></el-input>
</el-form-item>
<!-- <el-form-item label="通讯录事件服务">
<el-radio-group v-model="form.model">
<el-radio label="label">开启</el-radio>
<el-radio label="label">不开启</el-radio>
</el-radio-group>
<div>开启后,可以将企业客户的添加、编辑以及主动删除客户和被动被客户删除实时的同步到仟微SCRM,无需手动更新同步。</div>
</el-form-item>-->
<el-form-item
label="企业微信扫码登陆回调地址"
prop="wxQrLoginRedirectUri"
>
<el-input v-model="form.wxQrLoginRedirectUri"></el-input>
</el-form-item>
</el-form>
<div slot="footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="submit" v-show="!disabled"
>确 定</el-button
>
</div>
</el-dialog>
</div>
</template>
...@@ -11,12 +11,12 @@ export default { ...@@ -11,12 +11,12 @@ export default {
taskName: '', taskName: '',
startTime: '', startTime: '',
overTime: '', overTime: '',
fissionType: 2, fissionType: 2
}, },
dateRange: [], dateRange: [],
tableData: [], tableData: [],
total: 0, total: 0,
loading:false loading: false
} }
}, },
created() { created() {
...@@ -42,20 +42,20 @@ export default { ...@@ -42,20 +42,20 @@ export default {
resetForm() {}, resetForm() {},
toDetail(row) { toDetail(row) {
this.$router.push({ this.$router.push({
path: `/application/fissionDetail?id=${row.id}`, path: `fissionDetail?id=${row.id}`
}) })
}, },
newAdd() { newAdd() {
this.$router.push({ this.$router.push({
path: '/application/addFission', path: 'addFission'
}) })
}, },
toEdit(row) { toEdit(row) {
this.$router.push({ this.$router.push({
path: `/application/addFission?id=${row.id}`, path: `addFission?id=${row.id}`
}) })
}, }
}, }
} }
</script> </script>
...@@ -119,8 +119,7 @@ export default { ...@@ -119,8 +119,7 @@ export default {
size="medium" size="medium"
type="text" type="text"
icon="el-icon-view" icon="el-icon-view"
></el-button ></el-button>
>
<el-button <el-button
v-if="scope.row.fissStatus != 2" v-if="scope.row.fissStatus != 2"
@click="toEdit(scope.row)" @click="toEdit(scope.row)"
...@@ -129,8 +128,7 @@ export default { ...@@ -129,8 +128,7 @@ export default {
type="text" type="text"
icon="el-icon-edit-outline" icon="el-icon-edit-outline"
style="color:#E74E59" style="color:#E74E59"
></el-button ></el-button>
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
......
...@@ -10,7 +10,7 @@ export default { ...@@ -10,7 +10,7 @@ export default {
SelectUser, SelectUser,
SelectTag, SelectTag,
SelectPoster, SelectPoster,
TargetSelectUser: SelectUser, TargetSelectUser: SelectUser
}, },
data() { data() {
return { return {
...@@ -18,7 +18,7 @@ export default { ...@@ -18,7 +18,7 @@ export default {
taskName: '', taskName: '',
fissInfo: '', fissInfo: '',
fissNum: '', fissNum: '',
dateRange: '', dateRange: ''
}, },
groupForm: { groupForm: {
taskFissionStaffs: [], taskFissionStaffs: [],
...@@ -33,7 +33,7 @@ export default { ...@@ -33,7 +33,7 @@ export default {
welcomeMsg: '', welcomeMsg: '',
rewardUrl: '', rewardUrl: '',
rewardImageUrl: '', rewardImageUrl: '',
rewardRule: '', rewardRule: ''
}, },
rewardImageUrlTemp: '', rewardImageUrlTemp: '',
action: action:
...@@ -43,17 +43,19 @@ export default { ...@@ -43,17 +43,19 @@ export default {
headers: window.CONFIG.headers, headers: window.CONFIG.headers,
ruleForm: { ruleForm: {
taskName: [ taskName: [
{ required: true, message: '请输入活动名称', trigger: 'blur' }, { required: true, message: '请输入活动名称', trigger: 'blur' }
], ],
postersId: [{ required: true, message: '请输入海报', trigger: 'blur' }], postersId: [{ required: true, message: '请输入海报', trigger: 'blur' }],
fissionTargetId: [{ required: true, message: '请选择员工', trigger: 'blur' }], fissionTargetId: [
{ required: true, message: '请选择员工', trigger: 'blur' }
],
fissNum: [ fissNum: [
{ required: true, message: '请输入数量', trigger: 'blur' }, { required: true, message: '请输入数量', trigger: 'blur' },
{ pattern: /^[1-9]+$/, message: '请输入数字', trigger: 'blur' }, { pattern: /^[1-9]+$/, message: '请输入数字', trigger: 'blur' }
], ],
dateRange: [ dateRange: [
{ required: true, message: '时间不可为空', trigger: 'blur' }, { required: true, message: '时间不可为空', trigger: 'blur' }
], ]
}, },
dialogVisibleSelectUser: false, dialogVisibleSelectUser: false,
dialogVisibleSelectTag: false, dialogVisibleSelectTag: false,
...@@ -61,7 +63,7 @@ export default { ...@@ -61,7 +63,7 @@ export default {
dialogVisibleTargetStff: false, dialogVisibleTargetStff: false,
selectTagType: '', selectTagType: '',
pageType: 'add', pageType: 'add',
taskDetail: {}, taskDetail: {}
} }
}, },
created() { created() {
...@@ -88,7 +90,7 @@ export default { ...@@ -88,7 +90,7 @@ export default {
console.log('验证通过,提交表单') console.log('验证通过,提交表单')
let params = { let params = {
...this.query, ...this.query,
...this.groupForm, ...this.groupForm
} }
params.startTime = params.dateRange[0] params.startTime = params.dateRange[0]
params.overTime = params.dateRange[1] params.overTime = params.dateRange[1]
...@@ -99,8 +101,8 @@ export default { ...@@ -99,8 +101,8 @@ export default {
{ {
staffId: '', staffId: '',
staffName: '', staffName: '',
staffType: 3, staffType: 3
}, }
] ]
} }
delete params.sendType delete params.sendType
...@@ -129,11 +131,11 @@ export default { ...@@ -129,11 +131,11 @@ export default {
if (res.code == 200) { if (res.code == 200) {
this.$message({ this.$message({
message: '新增成功', message: '新增成功',
type: 'success', type: 'success'
}) })
taskApi.sendFission(JSON.parse(res.msg).id) taskApi.sendFission(JSON.parse(res.msg).id)
this.$router.push({ this.$router.push({
path: '/application/taskGroup', path: 'taskGroup'
}) })
} }
// //
...@@ -144,10 +146,10 @@ export default { ...@@ -144,10 +146,10 @@ export default {
if (res.code == 200) { if (res.code == 200) {
this.$message({ this.$message({
message: '修改成功', message: '修改成功',
type: 'success', type: 'success'
}) })
this.$router.push({ this.$router.push({
path: '/application/taskGroup', path: 'taskGroup'
}) })
// taskApi.sendFission(JSON.parse(res.msg).id) // taskApi.sendFission(JSON.parse(res.msg).id)
} }
...@@ -168,8 +170,8 @@ export default { ...@@ -168,8 +170,8 @@ export default {
fissNum: res.data.fissNum, fissNum: res.data.fissNum,
dateRange: [ dateRange: [
res.data.startTime + ' 00:00:00', res.data.startTime + ' 00:00:00',
res.data.overTime + ' 00:00:00', res.data.overTime + ' 00:00:00'
], ]
} }
this.query = query this.query = query
this.groupForm = { this.groupForm = {
...@@ -195,7 +197,7 @@ export default { ...@@ -195,7 +197,7 @@ export default {
welcomeMsg: res.data.welcomeMsg, welcomeMsg: res.data.welcomeMsg,
rewardUrl: res.data.rewardUrl, rewardUrl: res.data.rewardUrl,
rewardImageUrl: res.data.rewardImageUrl, rewardImageUrl: res.data.rewardImageUrl,
rewardRule: res.data.rewardRule, rewardRule: res.data.rewardRule
} }
}) })
}, },
...@@ -207,13 +209,13 @@ export default { ...@@ -207,13 +209,13 @@ export default {
selectParam = { selectParam = {
staffId: item.userId, staffId: item.userId,
staffName: item.name, staffName: item.name,
staffType: 2, staffType: 2
} }
} else { } else {
selectParam = { selectParam = {
staffId: item.id, staffId: item.id,
staffName: item.name, staffName: item.name,
staffType: 1, staffType: 1
} }
} }
return selectParam return selectParam
...@@ -255,8 +257,8 @@ export default { ...@@ -255,8 +257,8 @@ export default {
} }
return isJPG || isPNG return isJPG || isPNG
}, }
}, }
} }
</script> </script>
......
...@@ -11,12 +11,12 @@ export default { ...@@ -11,12 +11,12 @@ export default {
taskName: '', taskName: '',
startTime: '', startTime: '',
overTime: '', overTime: '',
fissionType: 1, fissionType: 1
}, },
dateRange: [], dateRange: [],
tableData: [], tableData: [],
total: 0, total: 0,
loading:false loading: false
} }
}, },
created() { created() {
...@@ -42,20 +42,20 @@ export default { ...@@ -42,20 +42,20 @@ export default {
resetForm() {}, resetForm() {},
toDetail(row) { toDetail(row) {
this.$router.push({ this.$router.push({
path: `/application/taskDetail?id=${row.id}`, path: `taskDetail?id=${row.id}`
}) })
}, },
newAdd() { newAdd() {
this.$router.push({ this.$router.push({
path: '/application/addTask', path: 'addTask'
}) })
}, },
toEdit(row) { toEdit(row) {
this.$router.push({ this.$router.push({
path: `/application/addTask?id=${row.id}`, path: `addTask?id=${row.id}`
}) })
}, }
}, }
} }
</script> </script>
...@@ -119,8 +119,7 @@ export default { ...@@ -119,8 +119,7 @@ export default {
size="medium" size="medium"
type="text" type="text"
icon="el-icon-view" icon="el-icon-view"
></el-button ></el-button>
>
<el-button <el-button
v-if="scope.row.fissStatus != 2" v-if="scope.row.fissStatus != 2"
@click="toEdit(scope.row)" @click="toEdit(scope.row)"
...@@ -129,8 +128,7 @@ export default { ...@@ -129,8 +128,7 @@ export default {
type="text" type="text"
icon="el-icon-edit-outline" icon="el-icon-edit-outline"
style="color:#E74E59" style="color:#E74E59"
></el-button ></el-button>
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
......
...@@ -10,13 +10,13 @@ export default { ...@@ -10,13 +10,13 @@ export default {
ruleName: '', // 规则名称 ruleName: '', // 规则名称
createBy: '', // 创建人 createBy: '', // 创建人
beginTime: '', // 创建开始时间 beginTime: '', // 创建开始时间
endTime: '', // 创建结束时间 endTime: '' // 创建结束时间
}, },
dateRange: [], // 添加日期 dateRange: [], // 添加日期
total: 0, // 群SOP数据总量 total: 0, // 群SOP数据总量
list: [], // 群SOP数据 list: [], // 群SOP数据
multiSelect: [], // 多选数据 multiSelect: [], // 多选数据
loading: false, loading: false
} }
}, },
watch: { watch: {
...@@ -28,7 +28,7 @@ export default { ...@@ -28,7 +28,7 @@ export default {
} else { } else {
;[this.query.beginTime, this.query.endTime] = dateRange ;[this.query.beginTime, this.query.endTime] = dateRange
} }
}, }
}, },
created() { created() {
this.getList() this.getList()
...@@ -59,8 +59,8 @@ export default { ...@@ -59,8 +59,8 @@ export default {
// 新增/编辑群SOP // 新增/编辑群SOP
goRoute(id) { goRoute(id) {
this.$router.push({ this.$router.push({
path: '/communityOperating/groupSOPAev', path: 'groupSOPAev',
query: { id: id }, query: { id: id }
}) })
}, },
// 重置查询参数 // 重置查询参数
...@@ -77,7 +77,7 @@ export default { ...@@ -77,7 +77,7 @@ export default {
this.$confirm('确认删除当前数据?删除操作无法撤销,请谨慎操作。', '提示', { this.$confirm('确认删除当前数据?删除操作无法撤销,请谨慎操作。', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning'
}) })
.then(() => { .then(() => {
const ids = this.multiSelect.map((r) => r.ruleId) const ids = this.multiSelect.map((r) => r.ruleId)
...@@ -96,7 +96,7 @@ export default { ...@@ -96,7 +96,7 @@ export default {
this.$confirm('确认删除当前数据?删除操作无法撤销,请谨慎操作。', '提示', { this.$confirm('确认删除当前数据?删除操作无法撤销,请谨慎操作。', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning'
}) })
.then(() => { .then(() => {
remove(id + '').then((res) => { remove(id + '').then((res) => {
...@@ -117,8 +117,8 @@ export default { ...@@ -117,8 +117,8 @@ export default {
const groups = row.groupList.map((g) => g.groupName) const groups = row.groupList.map((g) => g.groupName)
return groups.join(' ') return groups.join(' ')
}, }
}, }
} }
</script> </script>
......
...@@ -16,7 +16,7 @@ export default { ...@@ -16,7 +16,7 @@ export default {
createBy: '', // 创建人 createBy: '', // 创建人
keyword: '', // 关键词 keyword: '', // 关键词
beginTime: '', // 创建开始时间 beginTime: '', // 创建开始时间
endTime: '', // 创建结束时间 endTime: '' // 创建结束时间
}, },
queryCreateByName: '', queryCreateByName: '',
dateRange: [], // 添加日期 dateRange: [], // 添加日期
...@@ -27,7 +27,7 @@ export default { ...@@ -27,7 +27,7 @@ export default {
dialogHowToConfig: false, dialogHowToConfig: false,
disabled: false, disabled: false,
loading: false, loading: false,
clipboard: null, clipboard: null
} }
}, },
watch: { watch: {
...@@ -39,7 +39,7 @@ export default { ...@@ -39,7 +39,7 @@ export default {
} else { } else {
;[this.query.beginTime, this.query.endTime] = dateRange ;[this.query.beginTime, this.query.endTime] = dateRange
} }
}, }
}, },
created() { created() {
this.getList(1) this.getList(1)
...@@ -57,7 +57,7 @@ export default { ...@@ -57,7 +57,7 @@ export default {
this.$notify({ this.$notify({
title: '成功', title: '成功',
message: '链接已复制到剪切板,可粘贴。', message: '链接已复制到剪切板,可粘贴。',
type: 'success', type: 'success'
}) })
}) })
...@@ -87,8 +87,8 @@ export default { ...@@ -87,8 +87,8 @@ export default {
// 新增/编辑关键词拉群 // 新增/编辑关键词拉群
goRoute(id) { goRoute(id) {
this.$router.push({ this.$router.push({
path: '/communityOperating/keywordsAev', path: 'keywordsAev',
query: { id: id }, query: { id: id }
}) })
}, },
// 重置查询参数 // 重置查询参数
...@@ -105,7 +105,7 @@ export default { ...@@ -105,7 +105,7 @@ export default {
this.$confirm('确认删除当前数据?删除操作无法撤销,请谨慎操作。', '提示', { this.$confirm('确认删除当前数据?删除操作无法撤销,请谨慎操作。', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning'
}) })
.then(() => { .then(() => {
const ids = this.multiSelect.map((t) => t.taskId) const ids = this.multiSelect.map((t) => t.taskId)
...@@ -124,7 +124,7 @@ export default { ...@@ -124,7 +124,7 @@ export default {
this.$confirm('确认删除当前数据?删除操作无法撤销,请谨慎操作。', '提示', { this.$confirm('确认删除当前数据?删除操作无法撤销,请谨慎操作。', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning'
}) })
.then(() => { .then(() => {
remove(id + '').then((res) => { remove(id + '').then((res) => {
...@@ -153,8 +153,8 @@ export default { ...@@ -153,8 +153,8 @@ export default {
// 处理多选 // 处理多选
handleSelectionChange(val) { handleSelectionChange(val) {
this.multiSelect = val this.multiSelect = val
}, }
}, }
} }
</script> </script>
......
...@@ -3,7 +3,7 @@ import { ...@@ -3,7 +3,7 @@ import {
getList, getList,
remove, remove,
download, download,
downloadBatch, downloadBatch
} from '@/api/communityOperating/newCustomer' } from '@/api/communityOperating/newCustomer'
export default { export default {
...@@ -14,10 +14,10 @@ export default { ...@@ -14,10 +14,10 @@ export default {
query: { query: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
emplCodeName: '', // 活码名称 emplCodeName: '', // 活码名称
createBy: '', // 创建人 createBy: '', // 创建人
beginTime: '', // 开始日期 beginTime: '', // 开始日期
endTime: '', // 结束日期 endTime: '' // 结束日期
}, },
dateRange: [], // 添加日期 dateRange: [], // 添加日期
total: 0, // 数据总量 total: 0, // 数据总量
...@@ -29,10 +29,10 @@ export default { ...@@ -29,10 +29,10 @@ export default {
status: ['正常', '停用'], status: ['正常', '停用'],
pushType: { pushType: {
0: '发给客户', 0: '发给客户',
1: '发给客户群', 1: '发给客户群'
}, },
queryUser: [], // 搜索框选择的添加人 queryUser: [], // 搜索框选择的添加人
ids: [], ids: []
} }
}, },
computed: {}, computed: {},
...@@ -45,7 +45,7 @@ export default { ...@@ -45,7 +45,7 @@ export default {
} else { } else {
;[this.query.beginTime, this.query.endTime] = dateRange ;[this.query.beginTime, this.query.endTime] = dateRange
} }
}, }
}, },
created() { created() {
this.getList() this.getList()
...@@ -78,8 +78,8 @@ export default { ...@@ -78,8 +78,8 @@ export default {
// 新建/编辑新客数据 // 新建/编辑新客数据
goRoute(id) { goRoute(id) {
this.$router.push({ this.$router.push({
path: '/communityOperating/newCustomerAev', path: 'newCustomerAev',
query: { id }, query: { id }
}) })
}, },
// 多选框选中数据 // 多选框选中数据
...@@ -92,7 +92,7 @@ export default { ...@@ -92,7 +92,7 @@ export default {
this.$confirm('是否确认删除?', '警告', { this.$confirm('是否确认删除?', '警告', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning'
}) })
.then(function() { .then(function() {
return remove(ids) return remove(ids)
...@@ -106,25 +106,24 @@ export default { ...@@ -106,25 +106,24 @@ export default {
// 下载 // 下载
download(data) { download(data) {
let name = data.codeName + '.png' let name = data.codeName + '.png'
download(data.id) download(data.id).then((res) => {
.then((res) => { if (res != null) {
if (res != null) { let blob = new Blob([res], { type: 'application/zip' })
let blob = new Blob([res], { type: 'application/zip' }) let url = window.URL.createObjectURL(blob)
let url = window.URL.createObjectURL(blob) const link = document.createElement('a') // 创建a标签
const link = document.createElement('a') // 创建a标签 link.href = url
link.href = url link.download = name // 重命名文件
link.download = name // 重命名文件 link.click()
link.click() URL.revokeObjectURL(url) // 释放内存
URL.revokeObjectURL(url) // 释放内存 }
} })
})
}, },
// 批量下载 // 批量下载
downloadBatch() { downloadBatch() {
this.$confirm('是否确认下载所有活码图片吗?', '警告', { this.$confirm('是否确认下载所有活码图片吗?', '警告', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning'
}) })
.then(() => { .then(() => {
return downloadBatch(this.ids + '') return downloadBatch(this.ids + '')
...@@ -151,7 +150,7 @@ export default { ...@@ -151,7 +150,7 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.getList(1) this.getList(1)
}) })
}, }
} }
} }
</script> </script>
......
...@@ -14,7 +14,7 @@ export default { ...@@ -14,7 +14,7 @@ export default {
sendType: '', // 发送方式 sendType: '', // 发送方式
createBy: '', // 创建人 createBy: '', // 创建人
beginTime: '', // 创建开始时间 beginTime: '', // 创建开始时间
endTime: '', // 创建结束时间 endTime: '' // 创建结束时间
}, },
total: 0, // 老客标签建群总数据量 total: 0, // 老客标签建群总数据量
loading: false, // 主页table加载状态 loading: false, // 主页table加载状态
...@@ -22,7 +22,7 @@ export default { ...@@ -22,7 +22,7 @@ export default {
// 可用的发送方式数据 // 可用的发送方式数据
sendTypeOptions: [ sendTypeOptions: [
{ label: '企业群发', value: 0 }, { label: '企业群发', value: 0 },
{ label: '个人群发', value: 1 }, { label: '个人群发', value: 1 }
], ],
dateRange: [], // 创建日期[开始时间, 结束时间] dateRange: [], // 创建日期[开始时间, 结束时间]
multiSelect: [], // 多选数据 multiSelect: [], // 多选数据
...@@ -33,7 +33,7 @@ export default { ...@@ -33,7 +33,7 @@ export default {
pageSize: 10, pageSize: 10,
customerName: '', // 客户名称 customerName: '', // 客户名称
isInGroup: '', // 是否在群 isInGroup: '', // 是否在群
isSent: '', // 是否送达 isSent: '' // 是否送达
}, },
customerTotal: 0, // 客户统计总数据量 customerTotal: 0, // 客户统计总数据量
customerLoading: false, // 客户统计table加载状态 customerLoading: false, // 客户统计table加载状态
...@@ -42,14 +42,14 @@ export default { ...@@ -42,14 +42,14 @@ export default {
// 是否在群选择项 // 是否在群选择项
inGroupOptions: [ inGroupOptions: [
{ label: '在群', value: 1 }, { label: '在群', value: 1 },
{ label: '不在群', value: 0 }, { label: '不在群', value: 0 }
], ],
// 是否送达选择项 // 是否送达选择项
sendStatusOptions: [ sendStatusOptions: [
{ label: '已送达', value: 1 }, { label: '已送达', value: 1 },
{ label: '未送达', value: 0 }, { label: '未送达', value: 0 }
], ],
dialogVisible: false, // 客户统计会话 dialogVisible: false // 客户统计会话
} }
}, },
watch: { watch: {
...@@ -66,7 +66,7 @@ export default { ...@@ -66,7 +66,7 @@ export default {
if (!val) this.$refs['customerForm'].resetFields() if (!val) this.$refs['customerForm'].resetFields()
this.customerList = [] this.customerList = []
this.customerTotal = 0 this.customerTotal = 0
}, }
}, },
created() { created() {
this.getList(1) this.getList(1)
...@@ -112,8 +112,8 @@ export default { ...@@ -112,8 +112,8 @@ export default {
// 新增/编辑老客数据 // 新增/编辑老客数据
goRoute(id) { goRoute(id) {
this.$router.push({ this.$router.push({
path: '/communityOperating/oldCustomerAev', path: 'oldCustomerAev',
query: { id: id }, query: { id: id }
}) })
}, },
// 重置查询参数 // 重置查询参数
...@@ -136,7 +136,7 @@ export default { ...@@ -136,7 +136,7 @@ export default {
this.$confirm('确认删除当前数据?删除操作无法撤销,请谨慎操作。', '提示', { this.$confirm('确认删除当前数据?删除操作无法撤销,请谨慎操作。', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning'
}) })
.then(() => { .then(() => {
const ids = this.multiSelect.map((t) => t.taskId) const ids = this.multiSelect.map((t) => t.taskId)
...@@ -155,7 +155,7 @@ export default { ...@@ -155,7 +155,7 @@ export default {
this.$confirm('确认删除当前数据?删除操作无法撤销,请谨慎操作。', '提示', { this.$confirm('确认删除当前数据?删除操作无法撤销,请谨慎操作。', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning'
}) })
.then(() => { .then(() => {
remove(id + '').then((res) => { remove(id + '').then((res) => {
...@@ -217,8 +217,8 @@ export default { ...@@ -217,8 +217,8 @@ export default {
// this.getStat(1) // this.getStat(1)
this.customerFilter() this.customerFilter()
}, }
}, }
} }
</script> </script>
......
...@@ -19,7 +19,7 @@ export default { ...@@ -19,7 +19,7 @@ export default {
userIds: '', // "添加人id", userIds: '', // "添加人id",
tagIds: '', // "标签id,多个标签,id使用逗号隔开", tagIds: '', // "标签id,多个标签,id使用逗号隔开",
beginTime: '', // "开始时间", beginTime: '', // "开始时间",
endTime: '', // "结束时间" endTime: '' // "结束时间"
}, },
queryTag: [], // 搜索框选择的标签 queryTag: [], // 搜索框选择的标签
queryUser: [], // 搜索框选择的添加人 queryUser: [], // 搜索框选择的添加人
...@@ -30,7 +30,7 @@ export default { ...@@ -30,7 +30,7 @@ export default {
// 添加标签表单 // 添加标签表单
form: { form: {
gourpName: '', gourpName: '',
weTags: [], weTags: []
}, },
list: [], // 客户列表 list: [], // 客户列表
listOrganization: [], // 组织架构列表 listOrganization: [], // 组织架构列表
...@@ -43,8 +43,8 @@ export default { ...@@ -43,8 +43,8 @@ export default {
removeTag: [], // 可移除的标签 removeTag: [], // 可移除的标签
tagDialogType: { tagDialogType: {
title: '', // 选择标签弹窗标题 title: '', // 选择标签弹窗标题
type: '', // 弹窗类型 type: '' // 弹窗类型
}, }
} }
}, },
watch: {}, watch: {},
...@@ -98,7 +98,7 @@ export default { ...@@ -98,7 +98,7 @@ export default {
this.$refs.selectTag.getList() this.$refs.selectTag.getList()
this.form = { this.form = {
gourpName: '', gourpName: '',
weTags: [], weTags: []
} }
} }
}) })
...@@ -112,7 +112,7 @@ export default { ...@@ -112,7 +112,7 @@ export default {
this.selectedTag = this.queryTag this.selectedTag = this.queryTag
this.tagDialogType = { this.tagDialogType = {
title: '选择标签', title: '选择标签',
type: 'query', type: 'query'
} }
this.dialogVisible = true this.dialogVisible = true
// this.$refs.selectTag.$forceUpdate() // this.$refs.selectTag.$forceUpdate()
...@@ -169,7 +169,7 @@ export default { ...@@ -169,7 +169,7 @@ export default {
title: title:
(type === 'add' ? '增加标签' : '移出标签') + (type === 'add' ? '增加标签' : '移出标签') +
(repeat.length ? '(重复的标签已去重显示)' : ''), (repeat.length ? '(重复的标签已去重显示)' : ''),
type: type, type: type
} }
this.dialogVisible = true this.dialogVisible = true
// this.$refs.selectTag.$forceUpdate() // this.$refs.selectTag.$forceUpdate()
...@@ -179,7 +179,7 @@ export default { ...@@ -179,7 +179,7 @@ export default {
lock: true, lock: true,
text: 'Loading', text: 'Loading',
spinner: 'el-icon-loading', spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)', background: 'rgba(0, 0, 0, 0.7)'
}) })
api api
.sync() .sync()
...@@ -198,7 +198,7 @@ export default { ...@@ -198,7 +198,7 @@ export default {
this.$confirm('是否确认导出所有客户数据项?', '警告', { this.$confirm('是否确认导出所有客户数据项?', '警告', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning'
}) })
.then(function() { .then(function() {
return api.exportCustomer(queryParams) return api.exportCustomer(queryParams)
...@@ -221,11 +221,11 @@ export default { ...@@ -221,11 +221,11 @@ export default {
} else { } else {
let data = { let data = {
externalUserid: this.multipleSelection[0].externalUserid, externalUserid: this.multipleSelection[0].externalUserid,
addTag: selected, addTag: selected
} }
let apiType = { let apiType = {
add: 'makeLabel', add: 'makeLabel',
remove: 'removeLabel', remove: 'removeLabel'
} }
api[apiType[this.tagDialogType.type]](data).then(() => { api[apiType[this.tagDialogType.type]](data).then(() => {
this.msgSuccess('操作成功') this.msgSuccess('操作成功')
...@@ -251,8 +251,8 @@ export default { ...@@ -251,8 +251,8 @@ export default {
this.$refs.table.clearSelection() this.$refs.table.clearSelection()
this.$refs.table.toggleRowSelection(row, true) this.$refs.table.toggleRowSelection(row, true)
}) })
}, }
}, }
} }
</script> </script>
...@@ -387,7 +387,7 @@ export default { ...@@ -387,7 +387,7 @@ export default {
<i <i
:class="[ :class="[
'el-icon-s-custom', 'el-icon-s-custom',
{ 1: 'man', 2: 'woman' }[scope.row.gender], { 1: 'man', 2: 'woman' }[scope.row.gender]
]" ]"
></i> ></i>
</template> </template>
...@@ -432,8 +432,8 @@ export default { ...@@ -432,8 +432,8 @@ export default {
v-hasPermi="['customerManage:customer:view']" v-hasPermi="['customerManage:customer:view']"
@click=" @click="
$router.push({ $router.push({
path: '/customerManage/customerDetail', path: 'customerDetail',
query: { id: scope.row.externalUserid }, query: { id: scope.row.externalUserid }
}) })
" "
type="text" type="text"
......
...@@ -7,8 +7,8 @@ export default { ...@@ -7,8 +7,8 @@ export default {
props: { props: {
dateRange: { dateRange: {
type: Array, type: Array,
default: () => [], default: () => []
}, }
}, },
data() { data() {
return { return {
...@@ -18,11 +18,11 @@ export default { ...@@ -18,11 +18,11 @@ export default {
pageSize: 10, pageSize: 10,
handoverUserId: undefined, handoverUserId: undefined,
beginTime: undefined, beginTime: undefined,
endTime: undefined, endTime: undefined
}, },
loading: false, loading: false,
total: 0, total: 0,
list: [], list: []
} }
}, },
watch: {}, watch: {},
...@@ -50,8 +50,8 @@ export default { ...@@ -50,8 +50,8 @@ export default {
.catch(() => { .catch(() => {
this.loading = false this.loading = false
}) })
}, }
}, }
} }
</script> </script>
...@@ -81,8 +81,8 @@ export default { ...@@ -81,8 +81,8 @@ export default {
v-hasPermi="['customerManage:dimission:edit']" v-hasPermi="['customerManage:dimission:edit']"
@click=" @click="
$router.push({ $router.push({
path: '/customerManage/customerDetail', path: 'customerDetail',
query: { id: scope.row.id }, query: { id: scope.row.id }
}) })
" "
type="text" type="text"
......
...@@ -13,13 +13,13 @@ export default { ...@@ -13,13 +13,13 @@ export default {
pageSize: 10, pageSize: 10,
userName: undefined, userName: undefined,
beginTime: undefined, beginTime: undefined,
endTime: undefined, endTime: undefined
}, },
loading: false, loading: false,
total: 0, total: 0,
list: [], list: [],
dialogVisibleSelectUser: false, dialogVisibleSelectUser: false,
dateRange: [], // 离职日期 dateRange: [] // 离职日期
} }
}, },
watch: {}, watch: {},
...@@ -53,8 +53,8 @@ export default { ...@@ -53,8 +53,8 @@ export default {
resetForm(formName) { resetForm(formName) {
this.dateRange = [] this.dateRange = []
this.$refs['queryForm'].resetFields() this.$refs['queryForm'].resetFields()
}, }
}, }
} }
</script> </script>
...@@ -131,8 +131,8 @@ export default { ...@@ -131,8 +131,8 @@ export default {
v-hasPermi="['customerManage:dimission:edit']" v-hasPermi="['customerManage:dimission:edit']"
@click=" @click="
$router.push({ $router.push({
path: '/customerManage/allocatedStaffDetail', path: 'allocatedStaffDetail',
query: { userId: scope.row.userId }, query: { userId: scope.row.userId }
}) })
" "
type="text" type="text"
......
...@@ -14,19 +14,19 @@ export default { ...@@ -14,19 +14,19 @@ export default {
pageSize: 10, pageSize: 10,
userName: undefined, userName: undefined,
beginTime: undefined, beginTime: undefined,
endTime: undefined, endTime: undefined
}, },
loading: false, loading: false,
isMoreFilter: false, isMoreFilter: false,
total: 0, total: 0,
form: { form: {
user: '', user: '',
region: '', region: ''
}, },
list: [], list: [],
currentRow: {}, currentRow: {},
dialogVisibleSelectUser: false, dialogVisibleSelectUser: false,
dateRange: [], // 离职日期 dateRange: [] // 离职日期
} }
}, },
watch: {}, watch: {},
...@@ -83,7 +83,7 @@ export default { ...@@ -83,7 +83,7 @@ export default {
api api
.allocate({ .allocate({
handoverUserid: this.currentRow.userId, handoverUserid: this.currentRow.userId,
takeoverUserid: userlist[0].userId, takeoverUserid: userlist[0].userId
}) })
.then(() => { .then(() => {
this.msgSuccess('操作成功') this.msgSuccess('操作成功')
...@@ -92,8 +92,8 @@ export default { ...@@ -92,8 +92,8 @@ export default {
// 选中数据 // 选中数据
handleCurrentChange(val) { handleCurrentChange(val) {
this.currentRow = val this.currentRow = val
}, }
}, }
} }
</script> </script>
...@@ -144,7 +144,7 @@ export default { ...@@ -144,7 +144,7 @@ export default {
<el-button <el-button
v-hasPermi="['customerManage:dimission:filter']" v-hasPermi="['customerManage:dimission:filter']"
type="primary" type="primary"
@click="$router.push({ path: '/customerManage/allocatedStaffList' })" @click="$router.push({ path: 'allocatedStaffList' })"
>已分配的离职员工</el-button >已分配的离职员工</el-button
> >
<el-button <el-button
......
...@@ -11,7 +11,7 @@ export default { ...@@ -11,7 +11,7 @@ export default {
pageSize: 10, pageSize: 10,
groupName: undefined, groupName: undefined,
beginTime: undefined, beginTime: undefined,
endTime: undefined, endTime: undefined
}, },
// 日期范围 // 日期范围
dateRange: [], dateRange: [],
...@@ -24,7 +24,7 @@ export default { ...@@ -24,7 +24,7 @@ export default {
// 总条数 // 总条数
total: 0, total: 0,
// 表格数据 // 表格数据
list: [], list: []
} }
}, },
created() { created() {
...@@ -63,7 +63,7 @@ export default { ...@@ -63,7 +63,7 @@ export default {
lock: true, lock: true,
text: 'Loading', text: 'Loading',
spinner: 'el-icon-loading', spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)', background: 'rgba(0, 0, 0, 0.7)'
}) })
api.sync().then((r) => { api.sync().then((r) => {
loading.close() loading.close()
...@@ -90,8 +90,8 @@ export default { ...@@ -90,8 +90,8 @@ export default {
// this.download(response.msg); // this.download(response.msg);
// }) // })
// .catch(function () {}); // .catch(function () {});
}, }
}, }
} }
</script> </script>
...@@ -199,8 +199,8 @@ export default { ...@@ -199,8 +199,8 @@ export default {
icon="el-icon-view" icon="el-icon-view"
@click=" @click="
$router.push({ $router.push({
path: '/customerManage/groupDetail', path: 'groupDetail',
query: scope.row, query: scope.row
}) })
" "
v-hasPermi="['customerManage:group:view']" v-hasPermi="['customerManage:group:view']"
......
...@@ -3,7 +3,7 @@ import { ...@@ -3,7 +3,7 @@ import {
getList, getList,
exportCustomer, exportCustomer,
lossRemind, lossRemind,
getLossRemindStatus, getLossRemindStatus
} from '@/api/customer' } from '@/api/customer'
import { getList as getListTag } from '@/api/customer/tag' import { getList as getListTag } from '@/api/customer/tag'
import { getList as getListOrganization } from '@/api/organization' import { getList as getListOrganization } from '@/api/organization'
...@@ -24,7 +24,7 @@ export default { ...@@ -24,7 +24,7 @@ export default {
tagIds: '', // "标签id,多个标签,id使用逗号隔开", tagIds: '', // "标签id,多个标签,id使用逗号隔开",
beginTime: '', // "开始时间", beginTime: '', // "开始时间",
endTime: '', // "结束时间" endTime: '', // "结束时间"
status: 1, status: 1
}, },
queryTag: [], // 搜索框选择的标签 queryTag: [], // 搜索框选择的标签
queryUser: [], // 搜索框选择的添加人 queryUser: [], // 搜索框选择的添加人
...@@ -35,7 +35,7 @@ export default { ...@@ -35,7 +35,7 @@ export default {
// 添加标签表单 // 添加标签表单
form: { form: {
gourpName: '', gourpName: '',
weTags: [], weTags: []
}, },
list: [], // 客户列表 list: [], // 客户列表
listOrganization: [], // 组织架构列表 listOrganization: [], // 组织架构列表
...@@ -47,9 +47,9 @@ export default { ...@@ -47,9 +47,9 @@ export default {
removeTag: [], // 可移除的标签 removeTag: [], // 可移除的标签
tagDialogType: { tagDialogType: {
title: '', // 选择标签弹窗标题 title: '', // 选择标签弹窗标题
type: '', // 弹窗类型 type: '' // 弹窗类型
}, },
isNotice: '0', isNotice: '0'
} }
}, },
watch: {}, watch: {},
...@@ -115,7 +115,7 @@ export default { ...@@ -115,7 +115,7 @@ export default {
this.selectedTag = this.queryTag this.selectedTag = this.queryTag
this.tagDialogType = { this.tagDialogType = {
title: '选择标签', title: '选择标签',
type: 'query', type: 'query'
} }
this.dialogVisible = true this.dialogVisible = true
}, },
...@@ -125,7 +125,7 @@ export default { ...@@ -125,7 +125,7 @@ export default {
this.$confirm('是否确认导出所有客户数据项?', '警告', { this.$confirm('是否确认导出所有客户数据项?', '警告', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning'
}) })
.then(function() { .then(function() {
return exportCustomer(queryParams) return exportCustomer(queryParams)
...@@ -162,8 +162,8 @@ export default { ...@@ -162,8 +162,8 @@ export default {
lossRemind(val).then(() => { lossRemind(val).then(() => {
this.msgSuccess('操作成功') this.msgSuccess('操作成功')
}) })
}, }
}, }
} }
</script> </script>
...@@ -279,7 +279,7 @@ export default { ...@@ -279,7 +279,7 @@ export default {
<i <i
:class="[ :class="[
'el-icon-s-custom', 'el-icon-s-custom',
{ 1: 'man', 2: 'woman' }[scope.row.gender], { 1: 'man', 2: 'woman' }[scope.row.gender]
]" ]"
></i> ></i>
</template> </template>
...@@ -320,8 +320,8 @@ export default { ...@@ -320,8 +320,8 @@ export default {
v-hasPermi="['customerManage:customer:view']" v-hasPermi="['customerManage:customer:view']"
@click=" @click="
$router.push({ $router.push({
path: '/customerManage/customerDetail', path: 'customerDetail',
query: { id: scope.row.externalUserid }, query: { id: scope.row.externalUserid }
}) })
" "
type="text" type="text"
......
...@@ -4,7 +4,7 @@ import { ...@@ -4,7 +4,7 @@ import {
getList, getList,
remove, remove,
downloadBatch, downloadBatch,
download, download
} from '@/api/drainageCode/group' } from '@/api/drainageCode/group'
import ClipboardJS from 'clipboard' import ClipboardJS from 'clipboard'
...@@ -18,7 +18,7 @@ export default { ...@@ -18,7 +18,7 @@ export default {
activityName: '', activityName: '',
createBy: '', createBy: '',
beginTime: '', beginTime: '',
endTime: '', endTime: ''
}, },
loading: false, loading: false,
searchDate: '', // 查询日期 searchDate: '', // 查询日期
...@@ -28,7 +28,7 @@ export default { ...@@ -28,7 +28,7 @@ export default {
realCodeDialog: false, // 实际群码总数dialog realCodeDialog: false, // 实际群码总数dialog
openGroupCodeId: null, // 打开实际群码关联的群活码ID openGroupCodeId: null, // 打开实际群码关联的群活码ID
openGroupCodeStatus: -1, // 打开实际群码的检索状态 openGroupCodeStatus: -1, // 打开实际群码的检索状态
clipboard: null, // 拷贝对象 clipboard: null // 拷贝对象
} }
}, },
watch: { watch: {
...@@ -43,7 +43,7 @@ export default { ...@@ -43,7 +43,7 @@ export default {
// 如果实际群码弹出框关闭,刷新数据 // 如果实际群码弹出框关闭,刷新数据
realCodeDialog(val) { realCodeDialog(val) {
if (val === false) this.getGroupCodes() if (val === false) this.getGroupCodes()
}, }
}, },
mounted() { mounted() {
this.clipboard = new ClipboardJS('.copy-btn') this.clipboard = new ClipboardJS('.copy-btn')
...@@ -52,7 +52,7 @@ export default { ...@@ -52,7 +52,7 @@ export default {
this.$notify({ this.$notify({
title: '成功', title: '成功',
message: '链接已复制到剪切板,可粘贴。', message: '链接已复制到剪切板,可粘贴。',
type: 'success', type: 'success'
}) })
}) })
...@@ -113,7 +113,7 @@ export default { ...@@ -113,7 +113,7 @@ export default {
this.$confirm('是否确认下载所有图片吗?', '警告', { this.$confirm('是否确认下载所有图片吗?', '警告', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning'
}) })
.then(() => { .then(() => {
return downloadBatch(ids + '') return downloadBatch(ids + '')
...@@ -139,19 +139,18 @@ export default { ...@@ -139,19 +139,18 @@ export default {
{ {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning'
} }
) )
.then(() => { .then(() => {
const ids = this.multiGroupCode.map((group) => group.id) const ids = this.multiGroupCode.map((group) => group.id)
remove(ids + '') remove(ids + '').then((res) => {
.then((res) => { if (res.code === 200) {
if (res.code === 200) { this.getGroupCodes()
this.getGroupCodes() } else {
} else { }
} })
})
}) })
.catch(() => {}) .catch(() => {})
}, },
...@@ -159,18 +158,17 @@ export default { ...@@ -159,18 +158,17 @@ export default {
handleDownload(codeId, activityName) { handleDownload(codeId, activityName) {
const name = activityName + '.png' const name = activityName + '.png'
download(codeId) download(codeId).then((res) => {
.then((res) => { if (res != null) {
if (res != null) { let blob = new Blob([res], { type: 'application/zip' })
let blob = new Blob([res], { type: 'application/zip' }) let url = window.URL.createObjectURL(blob)
let url = window.URL.createObjectURL(blob) const link = document.createElement('a') // 创建a标签
const link = document.createElement('a') // 创建a标签 link.href = url
link.href = url link.download = name // 重命名文件
link.download = name // 重命名文件 link.click()
link.click() URL.revokeObjectURL(url) // 释放内存
URL.revokeObjectURL(url) // 释放内存 }
} })
})
}, },
// 删除 // 删除
handleRemove(codeId) { handleRemove(codeId) {
...@@ -180,17 +178,16 @@ export default { ...@@ -180,17 +178,16 @@ export default {
{ {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning'
} }
) )
.then(() => { .then(() => {
remove(codeId) remove(codeId).then((res) => {
.then((res) => { if (res.code === 200) {
if (res.code === 200) { this.getGroupCodes()
this.getGroupCodes() } else {
} else { }
} })
})
}) })
.catch(() => {}) .catch(() => {})
}, },
...@@ -203,7 +200,7 @@ export default { ...@@ -203,7 +200,7 @@ export default {
this.openGroupCodeId = groupCodeId this.openGroupCodeId = groupCodeId
this.openGroupCodeStatus = status this.openGroupCodeStatus = status
this.realCodeDialog = true this.realCodeDialog = true
}, }
} }
} }
</script> </script>
...@@ -368,8 +365,8 @@ export default { ...@@ -368,8 +365,8 @@ export default {
size="mini" size="mini"
@click=" @click="
$router.push({ $router.push({
path: '/drainageCode/customerGroupDetail', path: 'customerGroupDetail',
query: { groupCodeId: row.id }, query: { groupCodeId: row.id }
}) })
" "
>编辑</el-button >编辑</el-button
...@@ -387,10 +384,7 @@ export default { ...@@ -387,10 +384,7 @@ export default {
:data-clipboard-text="row.codeUrl" :data-clipboard-text="row.codeUrl"
>复制</el-button >复制</el-button
> >
<el-button <el-button type="text" size="mini" @click="handleRemove(row.id)"
type="text"
size="mini"
@click="handleRemove(row.id)"
>删除</el-button >删除</el-button
> >
</template> </template>
......
...@@ -4,7 +4,7 @@ import { ...@@ -4,7 +4,7 @@ import {
remove, remove,
batchAdd, batchAdd,
downloadBatch, downloadBatch,
download, download
} from '@/api/drainageCode/staff' } from '@/api/drainageCode/staff'
import SelectUser from '@/components/SelectUser' import SelectUser from '@/components/SelectUser'
import ClipboardJS from 'clipboard' import ClipboardJS from 'clipboard'
...@@ -22,7 +22,7 @@ export default { ...@@ -22,7 +22,7 @@ export default {
scenario: undefined, scenario: undefined,
createBy: undefined, createBy: undefined,
beginTime: undefined, beginTime: undefined,
endTime: undefined, endTime: undefined
}, },
// 日期范围 // 日期范围
dateRange: [], dateRange: [],
...@@ -41,8 +41,8 @@ export default { ...@@ -41,8 +41,8 @@ export default {
qrcode: '', qrcode: '',
isJoinConfirmFriends: 0, isJoinConfirmFriends: 0,
weEmpleCodeTags: [], weEmpleCodeTags: [],
weEmpleCodeUseScops: [], weEmpleCodeUseScops: []
}, }
} }
}, },
created() { created() {
...@@ -60,7 +60,7 @@ export default { ...@@ -60,7 +60,7 @@ export default {
this.$notify({ this.$notify({
title: '成功', title: '成功',
message: '链接已复制到剪切板,可粘贴。', message: '链接已复制到剪切板,可粘贴。',
type: 'success', type: 'success'
}) })
}) })
clipboard.on('error', (e) => { clipboard.on('error', (e) => {
...@@ -97,7 +97,7 @@ export default { ...@@ -97,7 +97,7 @@ export default {
this.getList(1) this.getList(1)
}, },
goRoute(path, id) { goRoute(path, id) {
this.$router.push({ path: '/drainageCode/' + path, query: { id } }) this.$router.push({ path: path, query: { id } })
}, },
// 多选框选中数据 // 多选框选中数据
...@@ -110,7 +110,7 @@ export default { ...@@ -110,7 +110,7 @@ export default {
this.$confirm('是否确认删除?', '警告', { this.$confirm('是否确认删除?', '警告', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning'
}) })
.then(function() { .then(function() {
return remove(ids) return remove(ids)
...@@ -127,7 +127,7 @@ export default { ...@@ -127,7 +127,7 @@ export default {
return { return {
businessId: d.id || d.userId, businessId: d.id || d.userId,
businessName: d.name, businessName: d.name,
businessIdType: d.userId ? 2 : 1, businessIdType: d.userId ? 2 : 1
} }
}) })
batchAdd(this.form).then(({ data }) => { batchAdd(this.form).then(({ data }) => {
...@@ -154,7 +154,7 @@ export default { ...@@ -154,7 +154,7 @@ export default {
this.$confirm('是否确认下载所有图片吗?', '警告', { this.$confirm('是否确认下载所有图片吗?', '警告', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning'
}) })
.then(() => { .then(() => {
return downloadBatch(this.ids + '') return downloadBatch(this.ids + '')
...@@ -172,8 +172,8 @@ export default { ...@@ -172,8 +172,8 @@ export default {
} }
}) })
.catch(function() {}) .catch(function() {})
}, }
}, }
} }
</script> </script>
......
...@@ -10,7 +10,7 @@ export default { ...@@ -10,7 +10,7 @@ export default {
let unit = data.expectSend == 1 ? '个群' : '人' let unit = data.expectSend == 1 ? '个群' : '人'
return `预计发送${data.expectSend}${unit},已成功发送${data.actualSend}${unit}` return `预计发送${data.expectSend}${unit},已成功发送${data.actualSend}${unit}`
} }
}, }
}, },
data() { data() {
return { return {
...@@ -32,17 +32,17 @@ export default { ...@@ -32,17 +32,17 @@ export default {
content: undefined, content: undefined,
pushType: undefined, pushType: undefined,
beginTime: undefined, beginTime: undefined,
endTime: undefined, endTime: undefined
}, },
pushType: { pushType: {
0: '发给客户', 0: '发给客户',
1: '发给客户群', 1: '发给客户群'
}, },
pickerOptions: { pickerOptions: {
disabledDate(time) { disabledDate(time) {
return time.getTime() > Date.now() // 选当前时间之前的时间 return time.getTime() > Date.now() // 选当前时间之前的时间
}, }
}, }
} }
}, },
created() { created() {
...@@ -89,7 +89,7 @@ export default { ...@@ -89,7 +89,7 @@ export default {
{ {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning'
} }
) )
.then(function() {}) .then(function() {})
...@@ -101,8 +101,8 @@ export default { ...@@ -101,8 +101,8 @@ export default {
}, },
goRoute(id, path) { goRoute(id, path) {
this.$router.push({ this.$router.push({
path: '/customerMaintain/groupMessage/' + path, path: path,
query: { id }, query: { id }
}) })
}, },
syncMsg(data) { syncMsg(data) {
...@@ -119,8 +119,8 @@ export default { ...@@ -119,8 +119,8 @@ export default {
.catch(() => { .catch(() => {
// this.loading = false // this.loading = false
}) })
}, }
}, }
} }
</script> </script>
<template> <template>
......
...@@ -6,7 +6,7 @@ export default { ...@@ -6,7 +6,7 @@ export default {
components: { MaPage }, components: { MaPage },
data() { data() {
return { return {
ids: [], // 选中数组 ids: [] // 选中数组
} }
}, },
watch: {}, watch: {},
...@@ -15,8 +15,8 @@ export default { ...@@ -15,8 +15,8 @@ export default {
// 多选框选中数据 // 多选框选中数据
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id) this.ids = selection.map((item) => item.id)
}, }
}, }
} }
</script> </script>
...@@ -40,22 +40,19 @@ export default { ...@@ -40,22 +40,19 @@ export default {
class-name="small-padding fixed-width" class-name="small-padding fixed-width"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button type="text" @click="$refs.page.download(scope.row)"
type="text"
@click="$refs.page.download(scope.row)"
v-hasPermi="['material:download']"
>下载</el-button >下载</el-button
> >
<el-button <el-button
type="text" type="text"
@click="$refs.page.edit(scope.row)" @click="$refs.page.edit(scope.row)"
v-hasPermi="['material:edit']" v-hasPermi="['wechat:material:edit']"
>修改</el-button >修改</el-button
> >
<el-button <el-button
type="text" type="text"
@click="$refs.page.remove(scope.row.id)" @click="$refs.page.remove(scope.row.id)"
v-hasPermi="['material:remove']" v-hasPermi="['wechat:material:remove']"
>删除</el-button >删除</el-button
> >
</template> </template>
......
...@@ -10,7 +10,7 @@ import { ...@@ -10,7 +10,7 @@ import {
add, add,
update, update,
remove, remove,
moveGroup, moveGroup
} from '@/api/material' } from '@/api/material'
// import { // import {
...@@ -24,13 +24,13 @@ export default { ...@@ -24,13 +24,13 @@ export default {
// "0 图片(image)、1 语音(voice)、2 视频(video),3 普通文件(file) 4 文本 5 海报 6 海报字体", // "0 图片(image)、1 语音(voice)、2 视频(video),3 普通文件(file) 4 文本 5 海报 6 海报字体",
type: { type: {
type: String, type: String,
default: '0', default: '0'
}, },
// 选中的素材ids // 选中的素材ids
selected: { selected: {
type: [Array, String], type: [Array, String],
default: '', default: ''
}, }
}, },
data() { data() {
return { return {
...@@ -41,7 +41,7 @@ export default { ...@@ -41,7 +41,7 @@ export default {
pageSize: 10, pageSize: 10,
categoryId: '', categoryId: '',
search: '', search: '',
mediaType: '0', mediaType: '0'
}, },
list: [], // 列表 list: [], // 列表
total: 0, // 总条数 total: 0, // 总条数
...@@ -49,7 +49,7 @@ export default { ...@@ -49,7 +49,7 @@ export default {
// 树props // 树props
treeProps: { treeProps: {
children: 'children', children: 'children',
label: 'name', label: 'name'
}, },
treeForm: {}, // 树表格 treeForm: {}, // 树表格
treeDialogVisible: false, // 树表格对话框显隐 treeDialogVisible: false, // 树表格对话框显隐
...@@ -63,7 +63,7 @@ export default { ...@@ -63,7 +63,7 @@ export default {
children: 'children', children: 'children',
label: 'name', label: 'name',
value: 'id', value: 'id',
emitPath: false, emitPath: false
}, },
typeTitle: ['图片', '语音', '视频', '文件', '文本', '海报', '海报字体'], typeTitle: ['图片', '语音', '视频', '文件', '文本', '海报', '海报字体'],
...@@ -72,18 +72,18 @@ export default { ...@@ -72,18 +72,18 @@ export default {
// 表单校验 // 表单校验
rules: Object.freeze({ rules: Object.freeze({
categoryId: [ categoryId: [
{ required: true, message: '不能为空', trigger: 'change' }, { required: true, message: '不能为空', trigger: 'change' }
], ],
content: [{ required: true, message: '不能为空', trigger: 'blur' }], content: [{ required: true, message: '不能为空', trigger: 'blur' }],
materialUrl: [ materialUrl: [
{ required: true, message: '不能为空', trigger: 'change' }, { required: true, message: '不能为空', trigger: 'change' }
], ],
materialName: [ materialName: [
{ required: true, message: '不能为空', trigger: 'blur' }, { required: true, message: '不能为空', trigger: 'blur' }
], ],
digest: [{ required: true, message: '不能为空', trigger: 'blur' }], digest: [{ required: true, message: '不能为空', trigger: 'blur' }],
coverUrl: [{ required: true, message: '不能为空', trigger: 'blur' }], coverUrl: [{ required: true, message: '不能为空', trigger: 'blur' }]
}), })
} }
}, },
watch: {}, watch: {},
...@@ -105,8 +105,8 @@ export default { ...@@ -105,8 +105,8 @@ export default {
parentId: '0', parentId: '0',
hasParent: false, hasParent: false,
hasChildren: true, hasChildren: true,
children: data || [], children: data || []
}, }
] ]
}) })
}, },
...@@ -159,7 +159,7 @@ export default { ...@@ -159,7 +159,7 @@ export default {
// 类目树节点删除 // 类目树节点删除
treeRemove(id) { treeRemove(id) {
this.$confirm('是否确认删除吗?', '警告', { this.$confirm('是否确认删除吗?', '警告', {
type: 'warning', type: 'warning'
}) })
.then(function() { .then(function() {
return removeTree(id) return removeTree(id)
...@@ -214,7 +214,7 @@ export default { ...@@ -214,7 +214,7 @@ export default {
remove(id) { remove(id) {
const Ids = id || this.selected + '' const Ids = id || this.selected + ''
this.$confirm('是否确认删除吗?', '警告', { this.$confirm('是否确认删除吗?', '警告', {
type: 'warning', type: 'warning'
}) })
.then(function() { .then(function() {
return remove(Ids) return remove(Ids)
...@@ -235,8 +235,8 @@ export default { ...@@ -235,8 +235,8 @@ export default {
// 下载 // 下载
download(data) { download(data) {
window.open(data.materialUrl) window.open(data.materialUrl)
}, }
}, }
} }
</script> </script>
...@@ -246,7 +246,7 @@ export default { ...@@ -246,7 +246,7 @@ export default {
<el-col :span="6"> <el-col :span="6">
<div> <div>
<el-button <el-button
v-hasPermi="['material:addType']" v-hasPermi="['wechat:category:add']"
slot="reference" slot="reference"
type="primary" type="primary"
@click="treeEdit({}, 0)" @click="treeEdit({}, 0)"
...@@ -269,19 +269,19 @@ export default { ...@@ -269,19 +269,19 @@ export default {
<span>{{ node.label }}</span> <span>{{ node.label }}</span>
<span class="fr" v-if="data.id"> <span class="fr" v-if="data.id">
<i <i
v-hasPermi="['material:editType']" v-hasPermi="['wechat:category:edit']"
class="el-icon-edit-outline" class="el-icon-edit-outline"
title="编辑" title="编辑"
@click.stop="treeEdit(data, 1)" @click.stop="treeEdit(data, 1)"
></i> ></i>
<i <i
v-hasPermi="['material:addType']" v-hasPermi="['wechat:category:edit']"
class="el-icon-circle-plus-outline" class="el-icon-circle-plus-outline"
title="添加子分类" title="添加子分类"
@click.stop="treeEdit(data, 0)" @click.stop="treeEdit(data, 0)"
></i> ></i>
<i <i
v-hasPermi="['material:removeType']" v-hasPermi="['wechat:category:remove']"
class="el-icon-delete" class="el-icon-delete"
title="删除" title="删除"
@click.stop="treeRemove(data.id)" @click.stop="treeRemove(data.id)"
...@@ -307,9 +307,14 @@ export default { ...@@ -307,9 +307,14 @@ export default {
prefix-icon="el-icon-search" prefix-icon="el-icon-search"
style="width: 300px;" style="width: 300px;"
/> />
<el-button class="ml10" @click="getList(1)">搜索</el-button>
<el-button <el-button
v-hasPermi="['material:remove']" class="ml10"
@click="getList(1)"
v-hasPermi="['wecom:material:list']"
>搜索</el-button
>
<el-button
v-hasPermi="['wechat:material:remove']"
@click="remove()" @click="remove()"
:disabled="selected.length === 0" :disabled="selected.length === 0"
>删除</el-button >删除</el-button
...@@ -332,7 +337,7 @@ export default { ...@@ -332,7 +337,7 @@ export default {
> >
</div> </div>
<el-button <el-button
v-hasPermi="['material:edit']" v-hasPermi="['wechat:material:resetCategory']"
slot="reference" slot="reference"
class="ml10" class="ml10"
:disabled="selected.length === 0" :disabled="selected.length === 0"
...@@ -342,7 +347,7 @@ export default { ...@@ -342,7 +347,7 @@ export default {
<div class="fr"> <div class="fr">
<el-button <el-button
v-hasPermi="['material:add']" v-hasPermi="['wechat:material:add']"
type="primary" type="primary"
@click="edit(1, ~~type)" @click="edit(1, ~~type)"
>添加{{ typeTitle[type] }}</el-button >添加{{ typeTitle[type] }}</el-button
......
...@@ -6,7 +6,7 @@ export default { ...@@ -6,7 +6,7 @@ export default {
components: { MaPage }, components: { MaPage },
data() { data() {
return { return {
ids: [], // 选中数组 ids: [] // 选中数组
} }
}, },
watch: {}, watch: {},
...@@ -15,8 +15,8 @@ export default { ...@@ -15,8 +15,8 @@ export default {
// 多选框选中数据 // 多选框选中数据
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id) this.ids = selection.map((item) => item.id)
}, }
}, }
} }
</script> </script>
...@@ -41,22 +41,19 @@ export default { ...@@ -41,22 +41,19 @@ export default {
class-name="small-padding fixed-width" class-name="small-padding fixed-width"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button type="text" @click="$refs.page.download(scope.row)"
type="text"
@click="$refs.page.download(scope.row)"
v-hasPermi="['material:download']"
>下载</el-button >下载</el-button
> >
<el-button <el-button
type="text" type="text"
@click="$refs.page.edit(scope.row)" @click="$refs.page.edit(scope.row)"
v-hasPermi="['material:edit']" v-hasPermi="['wechat:material:edit']"
>修改</el-button >修改</el-button
> >
<el-button <el-button
type="text" type="text"
@click="$refs.page.remove(scope.row.id)" @click="$refs.page.remove(scope.row.id)"
v-hasPermi="['material:remove']" v-hasPermi="['wechat:material:remove']"
>删除</el-button >删除</el-button
> >
</template> </template>
......
...@@ -7,7 +7,7 @@ export default { ...@@ -7,7 +7,7 @@ export default {
data() { data() {
return { return {
srcList: [], srcList: [],
ids: [], // 选中数组 ids: [] // 选中数组
} }
}, },
watch: {}, watch: {},
...@@ -15,8 +15,8 @@ export default { ...@@ -15,8 +15,8 @@ export default {
methods: { methods: {
listChange(data) { listChange(data) {
this.srcList = data.map((item) => item.materialUrl) this.srcList = data.map((item) => item.materialUrl)
}, }
}, }
} }
</script> </script>
...@@ -44,12 +44,12 @@ export default { ...@@ -44,12 +44,12 @@ export default {
></el-image> ></el-image>
<div class="actions"> <div class="actions">
<i <i
v-hasPermi="['material:edit']" v-hasPermi="['wechat:material:edit']"
class="el-icon-edit cp" class="el-icon-edit cp"
@click="$refs.page.edit(item)" @click="$refs.page.edit(item)"
></i> ></i>
<i <i
v-hasPermi="['material:remove']" v-hasPermi="['wechat:material:remove']"
class="el-icon-delete cp" class="el-icon-delete cp"
@click="$refs.page.remove(item.id)" @click="$refs.page.remove(item.id)"
></i> ></i>
......
...@@ -6,7 +6,7 @@ export default { ...@@ -6,7 +6,7 @@ export default {
components: { MaPage }, components: { MaPage },
data() { data() {
return { return {
ids: [], // 选中数组 ids: [] // 选中数组
} }
}, },
watch: {}, watch: {},
...@@ -16,8 +16,8 @@ export default { ...@@ -16,8 +16,8 @@ export default {
// 多选框选中数据 // 多选框选中数据
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id) this.ids = selection.map((item) => item.id)
}, }
}, }
} }
</script> </script>
...@@ -45,13 +45,13 @@ export default { ...@@ -45,13 +45,13 @@ export default {
<el-button <el-button
type="text" type="text"
@click="$refs.page.edit(scope.row)" @click="$refs.page.edit(scope.row)"
v-hasPermi="['material:edit']" v-hasPermi="['wechat:material:edit']"
>修改</el-button >修改</el-button
> >
<el-button <el-button
type="text" type="text"
@click="$refs.page.remove(scope.row.id)" @click="$refs.page.remove(scope.row.id)"
v-hasPermi="['material:remove']" v-hasPermi="['wechat:material:remove']"
>删除</el-button >删除</el-button
> >
</template> </template>
......
...@@ -5,16 +5,16 @@ import Video from 'video.js' ...@@ -5,16 +5,16 @@ import Video from 'video.js'
export default { export default {
name: 'Video', name: 'Video',
components: { components: {
MaPage, MaPage
}, },
data() { data() {
return { return {
ids: [], // 选中数组 ids: [] // 选中数组
} }
}, },
watch: {}, watch: {},
created() {}, created() {},
methods: {}, methods: {}
} }
</script> </script>
...@@ -43,17 +43,16 @@ export default { ...@@ -43,17 +43,16 @@ export default {
</video> </video>
<div class="actions"> <div class="actions">
<i <i
v-hasPermi="['material:download']"
class="el-icon-download" class="el-icon-download"
@click="$refs.page.download(item)" @click="$refs.page.download(item)"
></i> ></i>
<i <i
v-hasPermi="['material:edit']" v-hasPermi="['wechat:material:edit']"
class="el-icon-edit cp" class="el-icon-edit cp"
@click="$refs.page.edit(item)" @click="$refs.page.edit(item)"
></i> ></i>
<i <i
v-hasPermi="['material:remove']" v-hasPermi="['wechat:material:remove']"
class="el-icon-delete cp" class="el-icon-delete cp"
@click="$refs.page.remove(item.id)" @click="$refs.page.remove(item.id)"
></i> ></i>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!