Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-3
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
office
haoban-3
Commits
a9784113
Commit
a9784113
authored
Apr 12, 2021
by
陈羽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: 销售线索
parent
abad3669
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
221 additions
and
5 deletions
+221
-5
api.js
src/api/api.js
+2
-2
app-set.vue
src/components/set/app-set.vue
+155
-0
index.js
src/router/index.js
+5
-0
enterpriseSet.vue
src/views/enterprise/enterpriseSet.vue
+59
-3
No files found.
src/api/api.js
View file @
a9784113
...
@@ -22,9 +22,9 @@ import { Message } from 'element-ui';
...
@@ -22,9 +22,9 @@ import { Message } from 'element-ui';
Vue
.
axios
.
defaults
.
timeout
=
500000
;
Vue
.
axios
.
defaults
.
timeout
=
500000
;
let
local
=
window
.
location
.
origin
;
let
local
=
window
.
location
.
origin
;
/*
if (local.indexOf('localhost') != -1) {
if
(
local
.
indexOf
(
'localhost'
)
!=
-
1
)
{
local
=
'https://www.gicdev.com'
;
local
=
'https://www.gicdev.com'
;
}
*/
}
let
axiosPromiseArr
=
[];
//储存cancel toke
let
axiosPromiseArr
=
[];
//储存cancel toke
let
pending
=
[];
//声明一个数组用于存储每个ajax请求的取消函数和ajax标识
let
pending
=
[];
//声明一个数组用于存储每个ajax请求的取消函数和ajax标识
let
CancelToken
=
Vue
.
axios
.
CancelToken
;
let
CancelToken
=
Vue
.
axios
.
CancelToken
;
...
...
src/components/set/app-set.vue
0 → 100644
View file @
a9784113
<!--
* @Descripttion: 当前组件信息
* @version: 1.0.0
* @Author: 阿羽
* @Date: 2021-04-12 15:57:24
* @LastEditors: 阿羽
* @LastEditTime: 2021-04-12 15:57:24
-->
<!--
<app-set @closeText="closeText" @submitText="submitText"></app-set>
import appSet from '@/components/set/app-set.vue';
-->
<
template
>
<el-dialog
:title=
"!!editRow.materialId ? '编辑' : '新建'"
:visible
.
sync=
"dialogVisible"
width=
"600px"
:before-close=
"handleClose"
>
<div
class=
""
>
<el-form
:model=
"ruleForm"
:rules=
"rules"
ref=
"ruleForm"
label-width=
"120px"
class=
"demo-ruleForm"
>
<el-form-item
label=
"小程序名称"
prop=
"appName"
>
<el-input
show-word-limit
placeholder=
"请输入小程序名称"
type=
"text"
v-model=
"ruleForm.appName"
maxlength=
"20"
></el-input>
</el-form-item>
<el-form-item
label=
"AppID:"
prop=
"appId"
>
<el-input
show-word-limit
placeholder=
"请输入AppID"
type=
"text"
v-model=
"ruleForm.appId"
maxlength=
"80"
></el-input>
</el-form-item>
<el-form-item
label=
"标题:"
prop=
"title"
>
<el-input
show-word-limit
placeholder=
"请输入标题"
type=
"text"
v-model=
"ruleForm.title"
maxlength=
"80"
></el-input>
</el-form-item>
<el-form-item
label=
" 封面:"
prop=
"pic"
>
<single-upload
uploadType=
"1"
:imgSrc
.
sync=
"ruleForm.pic"
:field=
"''"
class=
"app-set"
:uploadLimit=
"20"
>
</single-upload>
<p
style=
"margin-top: 9px;font-size: 12px;color: #909399;line-height: 17px;"
>
建议尺寸520*416,支持png、jpg、jpeg格式
</p>
</el-form-item>
</el-form>
</div>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"toCancel"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm('ruleForm')"
>
{{
!!
editRow
.
materialId
?
'保存'
:
'新建'
}}
</el-button>
</div>
</el-dialog>
</
template
>
<
script
>
import
singleUpload
from
'@/components/single-upload.vue'
;
import
{
_debounce
}
from
'@/common/js/public'
;
import
{
postRequest
}
from
'@/api/api'
;
import
showMsg
from
'@/common/js/showmsg'
;
import
errMsg
from
'@/common/js/error'
;
export
default
{
props
:
{
editRow
:
{
type
:
Object
,
default
()
{
return
{};
}
}
},
components
:
{
singleUpload
},
data
()
{
return
{
dialogVisible
:
true
,
ruleForm
:
{
appName
:
''
,
appId
:
''
,
title
:
''
},
rules
:
{
appName
:
[{
required
:
true
,
message
:
'请输入小程序名称'
,
trigger
:
'blur'
}],
appId
:
[{
required
:
true
,
message
:
'请输入AppID'
,
trigger
:
'blur'
}],
title
:
[{
required
:
true
,
message
:
'请输入标题'
,
trigger
:
'blur'
}]
}
};
},
methods
:
{
toCancel
()
{
const
that
=
this
;
that
.
$emit
(
'closeText'
);
that
.
$refs
[
'ruleForm'
].
resetFields
();
},
handleClose
(
done
)
{
const
that
=
this
;
that
.
$emit
(
'closeText'
);
that
.
$refs
[
'ruleForm'
].
resetFields
();
},
submitForm
:
_debounce
(
function
(
formName
)
{
const
that
=
this
;
that
.
$refs
[
formName
].
validate
(
valid
=>
{
if
(
valid
)
{
that
.
postSave
();
}
});
},
300
),
postSave
()
{
const
that
=
this
;
const
data
=
{
...
that
.
ruleForm
};
postRequest
(
'/haoban-manage3-web/'
,
data
)
.
then
(
res
=>
{
let
resData
=
res
.
data
;
if
(
resData
.
errorCode
==
1
)
{
showMsg
.
showmsg
(
'操作成功'
,
'success'
);
that
.
$refs
[
'ruleForm'
].
resetFields
();
that
.
$emit
(
'submitText'
);
}
else
{
that
.
$refs
[
'ruleForm'
].
resetFields
();
that
.
$emit
(
'submitText'
);
errMsg
.
errorMsg
(
resData
);
}
})
.
catch
(
error
=>
{
that
.
$message
.
error
({
duration
:
1000
,
message
:
error
.
message
});
});
}
},
watch
:
{
editRow
(
newData
)
{
const
that
=
this
;
if
(
Object
.
keys
(
newData
).
length
)
{
that
.
$nextTick
(()
=>
{
that
.
ruleForm
=
JSON
.
parse
(
JSON
.
stringify
(
newData
));
});
}
}
},
mounted
()
{
const
that
=
this
;
if
(
Object
.
keys
(
that
.
editRow
).
length
)
{
that
.
$nextTick
(()
=>
{
that
.
ruleForm
=
JSON
.
parse
(
JSON
.
stringify
(
that
.
editRow
));
});
}
}
};
</
script
>
<
style
lang=
"scss"
scoped
></
style
>
<
style
lang=
"scss"
>
.app-set
{
.avatar-uploader
{
.el-upload
{
width
:
60px
!important
;
height
:
60px
!important
;
.font-12
{
display
:
none
;
}
.avatar-uploader-icon
{
font-size
:
14px
;
color
:
#303133
;
font-weight
:
bold
;
}
}
}
.upload-tip
{
display
:
none
;
}
}
</
style
>
src/router/index.js
View file @
a9784113
...
@@ -110,6 +110,11 @@ export const constantRouterMap = [
...
@@ -110,6 +110,11 @@ export const constantRouterMap = [
path
:
'/material'
,
path
:
'/material'
,
name
:
'素材库'
,
name
:
'素材库'
,
component
:
_import
(
'enterprise'
,
'material'
)
component
:
_import
(
'enterprise'
,
'material'
)
},
{
path
:
'/welcome'
,
name
:
'素材库'
,
component
:
_import
(
'enterprise'
,
'material'
)
}
}
]
]
},
},
...
...
src/views/enterprise/enterpriseSet.vue
View file @
a9784113
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
* @LastEditTime: 2020-12-03 15:26:58
* @LastEditTime: 2020-12-03 15:26:58
-->
-->
<
template
>
<
template
>
<div
class=
"daily-set-wrap
"
>
<div
class=
"daily-set-wrap"
>
<div
class=
"company-set-content border-box"
>
<div
class=
"company-set-content border-box"
>
<div
class=
"company-title m-b-20 flex flex-space-between"
>
<div
class=
"company-title m-b-20 flex flex-space-between"
>
<div
class=
"line-h-32"
><span
class=
"color-303133 font-14 font-w-600"
>
企业微信基本信息
</span><el-button
class=
"m-l-20"
type=
"text"
@
click=
"refeshData"
>
同步刷新
</el-button></div>
<div
class=
"line-h-32"
><span
class=
"color-303133 font-14 font-w-600"
>
企业微信基本信息
</span><el-button
class=
"m-l-20"
type=
"text"
@
click=
"refeshData"
>
同步刷新
</el-button></div>
...
@@ -38,6 +38,8 @@
...
@@ -38,6 +38,8 @@
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</div>
</div>
</div>
<div
class=
"company-set-content border-box"
>
<div
class=
"company-title m-b-20 m-t-30"
><span
class=
"color-303133 font-14 font-w-600"
>
客户密钥维护
</span></div>
<div
class=
"company-title m-b-20 m-t-30"
><span
class=
"color-303133 font-14 font-w-600"
>
客户密钥维护
</span></div>
<div
class=
"company-info-body secret-body"
>
<div
class=
"company-info-body secret-body"
>
<div
class=
"m-b-20 secret-cell"
>
<div
class=
"m-b-20 secret-cell"
>
...
@@ -80,7 +82,7 @@
...
@@ -80,7 +82,7 @@
</div>
-->
</div>
-->
<div
class=
"secret-cell m-b-20"
>
<div
class=
"secret-cell m-b-20"
>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"企业微信中【应用管理】关联的会员小程序secret,请复制后更新至此处。首次使用好办请输入。"
placement=
"top-start"
>
<span
style=
"cursor: pointer;padding-bottom: 2px; border-bottom: 1px dashed #2F54EB;"
class=
"font-14 color-606266"
>
会员小程序secret:
</span></el-tooltip>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"企业微信中【应用管理】关联的会员小程序secret,请复制后更新至此处。首次使用好办请输入。"
placement=
"top-start"
>
<span
style=
"cursor: pointer;padding-bottom: 2px; border-bottom: 1px dashed #2F54EB;"
class=
"font-14 color-606266"
>
会员小程序secret:
</span></el-tooltip>
<span
class=
"p-l-
5
font-14 color-303133 font-w-500"
>
会员小程序信息
</span>
<span
class=
"p-l-
10
font-14 color-303133 font-w-500"
>
会员小程序信息
</span>
<div
class=
"table-cell m-t-10 p-l-137"
>
<div
class=
"table-cell m-t-10 p-l-137"
>
<el-table
class=
"no-empty-icon-table"
ref=
"multipleTable"
:data=
"tableData"
tooltip-effect=
"dark"
:style=
"
{ width: '100%', minHeight: tableH }">
<el-table
class=
"no-empty-icon-table"
ref=
"multipleTable"
:data=
"tableData"
tooltip-effect=
"dark"
:style=
"
{ width: '100%', minHeight: tableH }">
<el-table-column
label=
"小程序名称"
show-overflow-tooltip
>
<el-table-column
label=
"小程序名称"
show-overflow-tooltip
>
...
@@ -121,12 +123,44 @@
...
@@ -121,12 +123,44 @@
</el-form>
</el-form>
</div>
</div>
</div>
</div>
<div
class=
"company-set-content border-box"
>
<div
class=
"company-title m-b-20 m-t-30"
><span
class=
"color-303133 font-14 font-w-600"
>
小程序添加
</span></div>
<div
class=
"company-info-body"
>
<div
class=
"table-cell m-t-10"
>
<el-table
class=
"no-empty-icon-table"
ref=
"multipleTable"
:data=
"tableData"
tooltip-effect=
"dark"
:style=
"{ width: '100%', minHeight: tableH }"
>
<el-table-column
label=
"小程序名称"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
secretName
||
'--'
}}
</
template
>
</el-table-column>
<el-table-column
prop=
""
label=
"AppID"
width=
"239"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
enterpriseName
||
'--'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
""
label=
"类型"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
enterpriseName
||
'--'
}}
</
template
>
</el-table-column>
<el-table-column
prop=
""
label=
"最近编辑时间"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
<div
class=
"line-18"
>
{{
scope
.
row
.
updateTime
|
timeStampToYmd
}}
</div>
<div
class=
"line-18"
>
{{
scope
.
row
.
updateTime
|
timeStampToHms
}}
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
""
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"toEdit(scope.$index, scope.row)"
>
编辑
</el-button><el-button
type=
"text"
@
click=
"toDel(scope.$index, scope.row)"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
<div
v-if=
"tableData.length < 10"
class=
"text-center add-cell cursor-pointer"
@
click=
"addApp"
><span
class=
"el-icon-plus font-14 color-2f54eb add-cell-txt"
></span><span
class=
"font-14 color-2f54eb p-l-5 add-cell-txt"
>
新建
</span><span
class=
"font-12 color-c0c4cc p-l-20"
>
最多添加10个
</span></div>
</div>
</div>
</div>
<secret-set
v-if=
"addShow"
:editRow=
"editRow"
@
closeText=
"closeText"
@
submitText=
"submitText"
></secret-set>
<secret-set
v-if=
"addShow"
:editRow=
"editRow"
@
closeText=
"closeText"
@
submitText=
"submitText"
></secret-set>
<app-set
v-if=
"addAppShow"
@
closeText=
"closeAppText"
@
submitText=
"submitAppText"
></app-set>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
setTip
from
'@/components/app/set-tip.vue'
;
import
setTip
from
'@/components/app/set-tip.vue'
;
import
secretSet
from
'@/components/set/secret-set.vue'
;
import
secretSet
from
'@/components/set/secret-set.vue'
;
import
appSet
from
'@/components/set/app-set.vue'
;
import
{
getRequest
,
postRequest
}
from
'@/api/api'
;
import
{
getRequest
,
postRequest
}
from
'@/api/api'
;
import
{
_debounce
}
from
'@/common/js/public'
;
import
{
_debounce
}
from
'@/common/js/public'
;
import
showMsg
from
'@/common/js/showmsg'
;
import
showMsg
from
'@/common/js/showmsg'
;
...
@@ -176,6 +210,7 @@ export default {
...
@@ -176,6 +210,7 @@ export default {
showHaobanError
:
false
,
showHaobanError
:
false
,
tableData
:
[],
tableData
:
[],
addShow
:
false
,
addShow
:
false
,
addAppShow
:
false
,
editRow
:
{},
editRow
:
{},
// 企微好友
// 企微好友
wxShow
:
false
,
wxShow
:
false
,
...
@@ -256,6 +291,11 @@ export default {
...
@@ -256,6 +291,11 @@ export default {
that
.
addShow
=
true
;
that
.
addShow
=
true
;
that
.
editRow
=
{};
that
.
editRow
=
{};
},
},
addApp
()
{
const
that
=
this
;
that
.
addAppShow
=
true
;
that
.
editRow
=
{};
},
/**
/**
* 编辑
* 编辑
*/
*/
...
@@ -269,12 +309,23 @@ export default {
...
@@ -269,12 +309,23 @@ export default {
that
.
addShow
=
false
;
that
.
addShow
=
false
;
that
.
editRow
=
{};
that
.
editRow
=
{};
},
},
closeAppText
()
{
const
that
=
this
;
that
.
addAppShow
=
false
;
that
.
editRow
=
{};
},
submitText
()
{
submitText
()
{
const
that
=
this
;
const
that
=
this
;
that
.
addShow
=
false
;
that
.
addShow
=
false
;
that
.
editRow
=
{};
that
.
editRow
=
{};
that
.
getSecretData
();
that
.
getSecretData
();
},
},
submitAppText
()
{
const
that
=
this
;
that
.
addAppShow
=
false
;
that
.
editRow
=
{};
// that.getSecretData();
},
/**
/**
* 删除
* 删除
*/
*/
...
@@ -496,7 +547,8 @@ export default {
...
@@ -496,7 +547,8 @@ export default {
},
},
components
:
{
components
:
{
setTip
,
setTip
,
secretSet
secretSet
,
appSet
}
}
};
};
</
script
>
</
script
>
...
@@ -584,7 +636,11 @@ export default {
...
@@ -584,7 +636,11 @@ export default {
}
}
.daily-set-wrap
{
.daily-set-wrap
{
height
:
100%
;
height
:
100%
;
margin-top
:
-10px
;
background
:
#f0f2f5
!important
;
.company-set-content
{
.company-set-content
{
background
:
#ffffff
;
margin-top
:
10px
;
padding
:
20px
;
padding
:
20px
;
.table-condition-left
{
.table-condition-left
{
font-size
:
0
;
font-size
:
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment