Commit 35a4c2d5 by 前端

修复BUG

1 parent 5f66c9f9
...@@ -100,4 +100,30 @@ util.downloadIamge = function(imgsrc, name = new Date().getTime()) { ...@@ -100,4 +100,30 @@ util.downloadIamge = function(imgsrc, name = new Date().getTime()) {
} }
image.src = imgsrc image.src = imgsrc
} }
util.downloadUrl = function(url) {
const link = document.createElement('a')
link.href = url.replace(/(http|https):/, '')
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
}
util.isShowBtn = function(value, permissions) {
let isShowStatus = false
const menu = JSON.parse(sessionStorage['SCRM_BASE_MENULIST'])
menuLevel(menu)
function menuLevel(item) {
item.forEach(itm => {
if (value && itm.path == value) {
isShowStatus = true
}
if (!value && itm.meta && itm.meta.permissions.includes(permissions)) {
isShowStatus = true
}
if (itm.children) {
menuLevel(itm.children)
}
})
}
return isShowStatus
}
export default util export default util
...@@ -983,9 +983,9 @@ export default { ...@@ -983,9 +983,9 @@ export default {
}, },
getInfo() { getInfo() {
console.log('1affdasfadsfafa');
this.marketingSOPLoading = true this.marketingSOPLoading = true
this.$apis.sop.getSopInfoDetailApi({ sopId: this.routeInfo.id }).then(async res => { this.$apis.sop.getSopInfoDetailApi({ sopId: this.routeInfo.id }).then(async res => {
this.marketingSOPLoading = false
if (this.routeInfo.addOrEdit == 'copy') { if (this.routeInfo.addOrEdit == 'copy') {
this.editForm.sopType = res.sopType this.editForm.sopType = res.sopType
res.eventList && res.eventList &&
...@@ -1010,6 +1010,7 @@ export default { ...@@ -1010,6 +1010,7 @@ export default {
this.editStatus = false this.editStatus = false
}) })
} }
this.marketingSOPLoading = false
}) })
}, },
...@@ -1552,6 +1553,8 @@ export default { ...@@ -1552,6 +1553,8 @@ export default {
} }
, ,
cancelJump() { cancelJump() {
console.log(this.routeInfo.fromPage);
this.$history.push(this.routeInfo.fromPage) this.$history.push(this.routeInfo.fromPage)
}, },
......
<!-- sop管理 --> <!-- sop管理 -->
<template> <template>
<div class="marketing sop-list"> <div class="marketing sop-list">
<SopNav @clickNav="handleClick" :activeName="'second'"/> <SopNav @clickNav="handleClick"
:activeName="'second'" />
<div class="m-b-20 m-t-20 p-relative"> <div class="m-b-20 m-t-20 p-relative">
<el-button :size="size" type="primary" class="el-icon-plus" @click="handleEdit('add')"> 新建SOP</el-button> <el-button :size="size"
<!-- <el-button class="sop-back-btn" :size="size" type="primary" @click="handleBack">返回</el-button>--> type="primary"
class="el-icon-plus"
@click="handleEdit('add')"> 新建SOP</el-button>
<!-- <el-button class="sop-back-btn" :size="size" type="primary" @click="handleBack">返回</el-button>-->
</div> </div>
<div class="container"> <div class="container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm> <GLCombiForm ref="showSearch"
:rowNumber="1"
:formObj="searchForm"
:formData="searchFormData"
@handleOk="handleSearch"
@handleRest="handleReset"></GLCombiForm>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="sopListRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <GLTable ref="sopListRef"
<div class="table-btns" slot="auth-button" slot-scope="scope"> :getListApi="getListApi"
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton> :noDataImg="url"
:searchForm="searchForm"
:tableParams="tableParams"
:pageConf="pageConf"
:beforeSearchFn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun">
<div class="table-btns"
slot="auth-button"
slot-scope="scope">
<GLTableButton :buttonList="tableButtonList"
:buttonItem="scope.scope"
:buttonNum="3"></GLTableButton>
</div> </div>
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
...@@ -26,7 +46,7 @@ import url from '@/assets/empty.png' ...@@ -26,7 +46,7 @@ import url from '@/assets/empty.png'
import SopNav from "views/sop/SopNav"; import SopNav from "views/sop/SopNav";
export default { export default {
name: 'sopList', name: 'sopList',
components:{SopNav}, components: { SopNav },
data() { data() {
return { return {
size: 'small', size: 'small',
...@@ -34,7 +54,7 @@ export default { ...@@ -34,7 +54,7 @@ export default {
searchForm: { searchForm: {
sopName: '', sopName: '',
sopStatus: '', sopStatus: '',
sopType:'' sopType: ''
}, },
// 搜索 // 搜索
searchFormData: [ searchFormData: [
...@@ -160,7 +180,7 @@ export default { ...@@ -160,7 +180,7 @@ export default {
width: 240, width: 240,
line: 1, line: 1,
formatter: cellValue => { formatter: cellValue => {
return cellValue.sopType == 2 ? '群sop' :'客户sop' return cellValue.sopType == 2 ? '群sop' : '客户sop'
} }
}, },
{ {
...@@ -240,7 +260,7 @@ export default { ...@@ -240,7 +260,7 @@ export default {
handleJump(path, row = {}) { handleJump(path, row = {}) {
this.$router.push({ this.$router.push({
path: '/sop/' + path, path: '/sop/' + path,
query: row ? { id: row.id,sopType:row.sopType, fromPage: '/marketing/sop/sopList' } : '' query: row ? { id: row.id, sopType: row.sopType, fromPage: '/marketing/sop/sopList' } : ''
}) })
}, },
...@@ -269,7 +289,7 @@ export default { ...@@ -269,7 +289,7 @@ export default {
handleEdit(addOrEdit, row) { handleEdit(addOrEdit, row) {
var params = { var params = {
addOrEdit: addOrEdit, addOrEdit: addOrEdit,
fromPage: '/marketing/sop/sopList', fromPage: '/tools/sop/sopList',
$title: encodeURI(addOrEdit == 'add' ? '新建SOP' : '编辑SOP') $title: encodeURI(addOrEdit == 'add' ? '新建SOP' : '编辑SOP')
} }
addOrEdit != 'add' && (params.id = row.id) addOrEdit != 'add' && (params.id = row.id)
...@@ -341,26 +361,26 @@ export default { ...@@ -341,26 +361,26 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.gl-tabs{ .gl-tabs {
/deep/ .el-tabs__header { /deep/ .el-tabs__header {
margin: 0 0 10px; margin: 0 0 10px;
//background: #f0f1f7; //background: #f0f1f7;
} }
/deep/ .el-tabs__nav-wrap::after { /deep/ .el-tabs__nav-wrap::after {
content: none; content: none;
} }
/deep/ .el-tabs__item { /deep/ .el-tabs__item {
font-size: 16px; font-size: 16px;
color: #717171; color: #717171;
letter-spacing: 0.8px; letter-spacing: 0.8px;
background: #f0f1f7 !important; background: #f0f1f7 !important;
} }
/deep/ .is-active { /deep/ .is-active {
color: #5850ff; color: #5850ff;
font-weight: 600; font-weight: 600;
background: #f0f1f7; background: #f0f1f7;
border-bottom: 2px solid #5850ff !important; border-bottom: 2px solid #5850ff !important;
} }
} }
.sop-list .sop-back-btn { .sop-list .sop-back-btn {
position: absolute; position: absolute;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!