Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
glsx-oss-ai-manager
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 8cb35973
authored
Jan 30, 2019
by
liimin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
tiaozhengdaima
1 parent
bc5a8ead
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
146 additions
and
69 deletions
package-lock.json
package.json
src/base.js
src/views/customer/components/src/manufacturers.vue
src/views/customer/voice/Edit.vue
src/views/customer/voice/index.vue
package-lock.json
View file @
8cb3597
...
...
@@ -2908,6 +2908,16 @@
"integrity"
:
"sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk="
,
"dev"
:
true
},
"clipboard"
:
{
"version"
:
"2.0.4"
,
"resolved"
:
"https://registry.npmjs.org/clipboard/-/clipboard-2.0.4.tgz"
,
"integrity"
:
"sha512-Vw26VSLRpJfBofiVaFb/I8PVfdI1OxKcYShe6fm0sP/DtmiWQNCjhM/okTvdCo0G+lMMm1rMYbk4IK4x1X+kgQ=="
,
"requires"
:
{
"good-listener"
:
"1.2.2"
,
"select"
:
"1.1.2"
,
"tiny-emitter"
:
"2.0.2"
}
},
"clipboardy"
:
{
"version"
:
"1.2.3"
,
"resolved"
:
"http://registry.npm.taobao.org/clipboardy/download/clipboardy-1.2.3.tgz"
,
...
...
@@ -3893,6 +3903,11 @@
"resolved"
:
"http://registry.npm.taobao.org/delayed-stream/download/delayed-stream-1.0.0.tgz"
,
"integrity"
:
"sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
},
"delegate"
:
{
"version"
:
"3.2.0"
,
"resolved"
:
"https://registry.npmjs.org/delegate/-/delegate-3.2.0.tgz"
,
"integrity"
:
"sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw=="
},
"delegates"
:
{
"version"
:
"1.0.0"
,
"resolved"
:
"http://registry.npm.taobao.org/delegates/download/delegates-1.0.0.tgz"
,
...
...
@@ -5532,6 +5547,14 @@
}
}
},
"good-listener"
:
{
"version"
:
"1.2.2"
,
"resolved"
:
"https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz"
,
"integrity"
:
"sha1-1TswzfkxPf+33JoNR3CWqm0UXFA="
,
"requires"
:
{
"delegate"
:
"3.2.0"
}
},
"graceful-fs"
:
{
"version"
:
"4.1.11"
,
"resolved"
:
"http://registry.npm.taobao.org/graceful-fs/download/graceful-fs-4.1.11.tgz"
,
...
...
@@ -10525,6 +10548,11 @@
}
}
},
"select"
:
{
"version"
:
"1.1.2"
,
"resolved"
:
"https://registry.npmjs.org/select/-/select-1.1.2.tgz"
,
"integrity"
:
"sha1-DnNQrN7ICxEIUoeG7B1EGNEbOW0="
},
"select-hose"
:
{
"version"
:
"2.0.0"
,
"resolved"
:
"http://registry.npm.taobao.org/select-hose/download/select-hose-2.0.0.tgz"
,
...
...
@@ -11442,6 +11470,11 @@
"integrity"
:
"sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q="
,
"dev"
:
true
},
"tiny-emitter"
:
{
"version"
:
"2.0.2"
,
"resolved"
:
"https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.0.2.tgz"
,
"integrity"
:
"sha512-2NM0auVBGft5tee/OxP4PI3d8WItkDM+fPnaRAVo6xTDI2knbz9eC5ArWGqtGlYqiH3RU5yMpdyTTO7MguC4ow=="
},
"tmp"
:
{
"version"
:
"0.0.33"
,
"resolved"
:
"http://registry.npm.taobao.org/tmp/download/tmp-0.0.33.tgz"
,
...
...
@@ -12010,6 +12043,11 @@
"integrity"
:
"sha1-IpnwLG3tMNSllhsLn3RSShj2NPw="
,
"dev"
:
true
},
"vee-validate"
:
{
"version"
:
"2.1.7"
,
"resolved"
:
"https://registry.npmjs.org/vee-validate/-/vee-validate-2.1.7.tgz"
,
"integrity"
:
"sha512-IyPDTTvIRY6o9y14jXlgfY76Qv+hmvYDwNaMn9JY5KbQN8a1tJAu7H/+a/+EdHg1w8Zl9tsdG8lndGqY1lyMzQ=="
},
"vendors"
:
{
"version"
:
"1.0.2"
,
"resolved"
:
"http://registry.npm.taobao.org/vendors/download/vendors-1.0.2.tgz"
,
...
...
@@ -12040,6 +12078,14 @@
"resolved"
:
"http://registry.npm.taobao.org/vue/download/vue-2.5.17.tgz"
,
"integrity"
:
"sha1-D4eJrXGL5oyhhyYpgy7VM1icato="
},
"vue-clipboard2"
:
{
"version"
:
"0.2.1"
,
"resolved"
:
"https://registry.npmjs.org/vue-clipboard2/-/vue-clipboard2-0.2.1.tgz"
,
"integrity"
:
"sha512-n6ie/0g0bKohmLlC/5ja1esq2Q0jQ5hWmhNSZcvCsWfDeDnVARjl6cBB9p72XV1nlVfuqsZcfV8HTjjZAIlLBA=="
,
"requires"
:
{
"clipboard"
:
"2.0.4"
}
},
"vue-eslint-parser"
:
{
"version"
:
"2.0.3"
,
"resolved"
:
"http://registry.npm.taobao.org/vue-eslint-parser/download/vue-eslint-parser-2.0.3.tgz"
,
...
...
package.json
View file @
8cb3597
...
...
@@ -13,9 +13,9 @@
"glsx-vue-components"
:
"^1.0.13"
,
"node-sass"
:
"^4.9.3"
,
"sass-loader"
:
"^7.1.0"
,
"vee-validate"
:
"^2.1.
5
"
,
"vee-validate"
:
"^2.1.
7
"
,
"vue"
:
"^2.5.17"
,
"vue-
i18n"
:
"^8.7.0
"
"vue-
clipboard2"
:
"^0.2.1
"
},
"devDependencies"
:
{
"@vue/cli-plugin-babel"
:
"^3.0.1"
,
...
...
src/base.js
View file @
8cb3597
...
...
@@ -4,18 +4,35 @@ import Vue from 'vue'
import
GlsxVueComponents
from
'glsx-vue-components'
import
'glsx-vue-components/dist/glsx-vue-components.css'
import
'./styles/index.scss'
import
zh_CN
from
'vee-validate/dist/locale/zh_CN'
//
import zh_CN from 'vee-validate/dist/locale/zh_CN'
import
VeeValidate
from
'vee-validate'
import
VueI18n
from
'vue-i18n'
Vue
.
use
(
VueI18n
)
const
i18n
=
new
VueI18n
({
locale
:
'zh_CN'
})
import
VueClipboard2
from
'vue-clipboard2'
// const {
// Validator
// } = VeeValidate
// import VueI18n from 'vue-i18n'
// Vue.use(VueI18n)
// const i18n = new VueI18n({
// locale: 'zh_CN'
// })
Vue
.
use
(
VueClipboard2
)
Vue
.
use
(
VeeValidate
,
{
i18n
,
i18nRootKey
:
'validation'
,
//
i18n,
//
i18nRootKey: 'validation',
dictionary
:
{
zh_CN
en
:
{
messages
:
{
required
:
(
field
)
=>
`
${
field
}
不能为空`
,
between
:
(
field
,
data
)
=>
`
${
field
}
必须在
${
data
[
0
]}
~
${
data
[
1
]}
之间`
,
confirmed
:
(
field
,
data
)
=>
`
${
field
}
必须与
${
data
[
0
]}
相匹配`
,
max
:
(
field
,
data
)
=>
`
${
field
}
最大长度不能超过
${
data
[
0
]}
`
,
min
:
(
field
,
data
)
=>
`
${
field
}
最小长度不能小于
${
data
[
0
]}
`
,
digits
:
(
field
,
data
)
=>
`
${
field
}
必须为数字,且长度必须等于
${
data
[
0
]}
`
,
min_value
:
(
field
,
data
)
=>
`
${
field
}
数值不能小于
${
data
[
0
]}
`
,
max_value
:
(
field
,
data
)
=>
`
${
field
}
数值不能大于
${
data
[
0
]}
`
,
not_in
:
(
field
,
data
)
=>
`
${
field
}
不能为
${
data
.
join
(
','
)}
`
}
}
},
errorBagName
:
'errorBags'
,
fieldsBagName
:
'fieldBags'
,
...
...
src/views/customer/components/src/manufacturers.vue
View file @
8cb3597
...
...
@@ -127,7 +127,7 @@
<
script
>
import
{
manufacturers
,
merchants
,
grayscaleuser
}
from
'@/api'
import
{
NoticeMixin
}
from
'@/mixins'
le
t
manufacturer_list_back_up
=
[
cons
t
manufacturer_list_back_up
=
[
{
manufacturer
:
null
,
manufacturerName
:
'请选择品牌厂商'
,
...
...
@@ -135,7 +135,7 @@ let manufacturer_list_back_up = [
merchantName
:
''
}
]
le
t
merchant_list_back_up
=
[
cons
t
merchant_list_back_up
=
[
{
merchantId
:
null
,
merchantName
:
'请选择渠道商'
,
...
...
@@ -152,39 +152,38 @@ export default {
manufactureOnly
:
Boolean
,
in_row
:
Boolean
,
uploadAction
:
String
,
default_value
:
Object
default_value
:
Object
,
value
:
Object
// id: String
// errorBags: Object
},
watch
:
{
eventBus
:
{
handler
(
__eventBus
)
{
if
(
__eventBus
)
{
__eventBus
.
$on
(
'submit'
,
callback
=>
{
this
.
$validator
.
validate
().
then
(
result
=>
{
this
.
result
.
manufacturers
=
this
.
manufacturer_list
.
filter
(
obj
=>
this
.
model
.
manufacturerId
===
obj
.
manufacturer
)[
0
]
this
.
result
.
merchants
=
this
.
merchant_list
.
filter
(
obj
=>
this
.
model
.
merchantId
===
obj
.
merchantId
)[
0
]
this
.
$emit
(
'update:value'
,
this
.
result
)
let
__back__data__
=
null
// console.log(result, this.result, this.errorBags)
if
(
this
.
manufactureOnly
)
{
callback
&&
callback
(
this
.
result
)
}
else
{
if
(
result
)
{
__back__data__
=
this
.
result
}
callback
&&
__back__data__
&&
callback
(
__back__data__
)
}
})
}),
__eventBus
.
$on
(
'clear_error'
,
()
=>
{
this
.
$validator
.
errors
.
clear
()
})
// __eventBus.$on('submit', callback => {
// this.$validator.validate().then(result => {
// this.result.manufacturers = this.manufacturer_list.filter(
// obj => this.model.manufacturerId === obj.manufacturer
// )[0]
// this.result.merchants = this.merchant_list.filter(
// obj => this.model.merchantId === obj.merchantId
// )[0]
// const __back__data__ = this.$deep_clone(this.result)
// // this.$emit('update:value', __back__data__)
// // console.log(result, this.result, this.errorBags)
// if (result || this.manufactureOnly) {
// this.$emit('update:value', __back__data__)
// //通过验证 回调结果 如果只有"制造商"选项 不需验证 此逻辑只适用于目前需求
// callback && callback(__back__data__)
// }
// })
// }),
__eventBus
.
$on
(
'clear_error'
,
()
=>
{
this
.
$validator
.
errors
.
clear
()
})
__eventBus
.
$on
(
'reset'
,
()
=>
{
this
.
__reset
()
!
this
.
manufactureOnly
&&
this
.
__reset
()
})
}
},
...
...
@@ -207,11 +206,36 @@ export default {
},
immediate
:
true
,
deep
:
true
},
'model.merchantId'
:
{
handler
(
__value
)
{
this
.
result
.
merchants
=
this
.
merchant_list
.
filter
(
obj
=>
this
.
model
.
merchantId
===
obj
.
merchantId
)[
0
]
const
__back__data__
=
this
.
$deep_clone
(
this
.
result
)
this
.
$emit
(
'update:value'
,
__back__data__
)
}
},
'model.manufacturerId'
:
{
handler
(
__value
)
{
this
.
result
.
manufacturers
=
this
.
manufacturer_list
.
filter
(
obj
=>
this
.
model
.
manufacturerId
===
obj
.
manufacturer
)[
0
]
const
__back__data__
=
this
.
$deep_clone
(
this
.
result
)
this
.
$emit
(
'update:value'
,
__back__data__
)
}
},
result
:
{
handler
(
__value
)
{
const
__back__data__
=
this
.
$deep_clone
(
__value
)
this
.
$emit
(
'update:value'
,
__back__data__
)
},
deep
:
true
}
},
inject
:
[
'$validator'
],
data
()
{
return
{
value
:
''
,
action
:
''
,
template_url
:
'http://qcimg01.glsx.net:7060/ddh-ai-m/AI管家-灰度用户导入模板.XLSX'
,
...
...
@@ -281,14 +305,14 @@ export default {
this
.
model
.
grayscaleUserList
=
''
},
__reset
()
{
//初始化
//
初始化
this
.
model
.
manufacturerId
=
null
this
.
model
.
merchantId
=
null
this
.
result
=
{
manufacturers
:
null
,
//生产厂商
merchants
:
null
,
//商户渠道
grayscaleUserList
:
null
,
//灰度用户列表
influenceScope
:
''
//用户类型
manufacturers
:
null
,
//
生产厂商
merchants
:
null
,
//
商户渠道
grayscaleUserList
:
null
,
//
灰度用户列表
influenceScope
:
''
//
用户类型
}
// this.$emit('update:value', this.result)
},
...
...
src/views/customer/voice/Edit.vue
View file @
8cb3597
This diff is collapsed.
Click to expand it.
src/views/customer/voice/index.vue
View file @
8cb3597
...
...
@@ -63,7 +63,6 @@
<
script
>
import
Edit
from
'./Edit'
import
{
Manufacturers
}
from
'../components'
// import { fn, treeCheckKeys, deleteEmptyAttribute } from '@/common/common'
import
{
voiceList
,
manufacturers
,
mergeActivity
}
from
'@/api'
import
{
NoticeMixin
}
from
'@/mixins'
import
Vue
from
'vue'
...
...
@@ -148,10 +147,10 @@ export default {
}
}
},
{
label
:
'触发次数'
,
prop
:
'triCount'
},
//
{
//
label: '触发次数',
//
prop: 'triCount'
//
},
{
label
:
'操作人'
,
prop
:
'updatedBy'
...
...
@@ -173,8 +172,8 @@ export default {
{
label
:
'上架'
,
type
:
'text'
,
formatter
:
row
=>
row
.
status
===
{
ON
:
'上架'
,
OF
:
'下架'
}[
rows
.
status
],
formatter
:
row
s
=>
row
s
.
status
===
{
ON
:
'上架'
,
OF
:
'下架'
}[
rows
.
status
],
callback
:
(
index
,
rows
)
=>
this
.
$confirm
(
`确定
${
...
...
@@ -235,11 +234,11 @@ export default {
/* 接口请求-start */
getParams
()
{
return
new
Promise
(
resolve
=>
{
var
__p
=
{
condition
:
{}
}
var
__p
=
{
condition
:
{}}
this
.
eventBus
.
$emit
(
'submit'
,
data
=>
{
try
{
if
(
data
&&
data
.
manufacturers
)
{
__p
.
condition
.
manufacturerId
=
data
.
manufacturers
.
manufacturer
Id
if
(
data
&&
data
.
manufacturers
&&
data
.
manufacturers
.
manufacturer
)
{
__p
.
condition
.
manufacturerId
=
data
.
manufacturers
.
manufacturer
}
if
(
this
.
searchCondition
.
activityTitle
)
{
__p
.
condition
.
activityTitle
=
this
.
searchCondition
.
activityTitle
...
...
@@ -291,24 +290,12 @@ export default {
this
.
page
.
pageNum
=
val
this
.
loadingGetList
()
},
updateVisibleChange
()
{
this
.
updateVisible
=
!
this
.
updateVisible
this
.
updateLoading
=
false
// if(!this.updateVisible) {
// this.allModulelist = []
// this.updateParams = this.$deep_clone(channelStructrue)
// }
},
dialog
(
index
,
rows
)
{
this
.
updateVisible
=
true
this
.
eventBus
.
$emit
(
'edit_event_data'
,
rows
?
rows
[
index
]
:
null
)
},
updateDialogClose
(
updateData
)
{
this
.
updateLoading
=
true
updateData
?
this
.
updateChannel
(
updateData
)
:
this
.
updateVisibleChange
()
},
recordVisibleChange
()
{
this
.
recordVisible
=
!
this
.
recordVisible
updateDialogClose
()
{
this
.
updateVisible
=
false
}
}
}
...
...
@@ -321,5 +308,8 @@ export default {
padding
:
5px
10px
;
}
}
.el-dialog
{
margin-top
:
3vh
!important
;
}
}
</
style
>
Write
Preview
Markdown
is supported
Attach a file
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 post a comment