Commit 7f463f96 by 前端

权限

1 parent 0597ca6a
......@@ -18,7 +18,7 @@ export const appId = "wx570d9331f9ace0bd";
* 4预发布
* 5cdptest
*/
let index = 1;
let index = 2;
const accountInfo = wx.getAccountInfoSync();
const systemInfo = wx.getSystemInfoSync();
const envName = accountInfo.miniProgram.envVersion;
......
import aiApi from "../../../aiApi";
Page({
data: {
showPicker:false,
showPopup:false,
showPicker: false,
showPopup: false,
list: [{
label:'标签名',
value: 'sceneLabelName'
},{
label:'话术来源',
value: 'staffName'
},{
label:'萃取时间',
value: 'scriptTime'
},
{
label: "提交人",
value: "updatedBy",
type: 'UpdatedBy',
hidden:true
},
{
label: "提交时间",
value: "updatedTime",
type: 'UpdatedTime',
hidden:true
},{
label:'原文',
value: 'sourceContent'
},{
label:'润色文本',
value: 'polishContent'
}],
label: '标签名',
value: 'sceneLabelName'
}, {
label: '话术来源',
value: 'staffName'
}, {
label: '萃取时间',
value: 'scriptTime'
},
{
label: "提交人",
value: "updatedBy",
type: 'UpdatedBy',
hidden: true
},
{
label: "提交时间",
value: "updatedTime",
type: 'UpdatedTime',
hidden: true
}, {
label: '原文',
value: 'sourceContent'
}, {
label: '润色文本',
value: 'polishContent'
}
],
array: ['美国', '中国', '巴西', '日本'],
navBarHeight:0,
navBarHeight: 0,
navStyle: "background-color: transparent;box-shadow:none",
polishedText: '您对这辆车未来的使用规划是怎样的呀?是打算长期频繁使用,长时间陪伴您的出行呢,还是想着开个三四年,体验一番后就考虑更换新车?看样子您是准备多开几年,对吧?',
isExcellent: true,
categories: ['需求探寻', '产品介绍', '价格谈判', '异议处理'],
currentCategory: '需求探寻',
tags: [
{ id: 1, name: '互动深入', selected: true },
{ id: 2, name: '逻辑清晰', selected: true },
{ id: 3, name: '风险灌输有力', selected: false },
{ id: 4, name: '异议处理新颖多样', selected: false }
tags: [{
id: 1,
name: '互动深入',
selected: true
},
{
id: 2,
name: '逻辑清晰',
selected: true
},
{
id: 3,
name: '风险灌输有力',
selected: false
},
{
id: 4,
name: '异议处理新颖多样',
selected: false
}
]
},
// 头部返回上一级
back() {
wx.$router.back()
},
// 头部返回上一级
back() {
wx.$router.back()
},
onLoad() {
wx.$router.getData(({item})=>{
let {list} = this.data
if(item.checkStatus == 0) {
list = list.filter(i=>!i.hidden)
wx.$router.getData(({
item
}) => {
let {
list
} = this.data
if (item.checkStatus == 0) {
list = list.filter(i => !i.hidden)
}
this.setData({detail:item,list})
this.extractLabel(item.classCode)
this.extractLabel(list, item)
})
this.extractClass()
},
extractLabel(classCode) {
aiApi.extractLabel({classCode}).then(res=>{
this.setData({tags:res.data})
extractLabel(list, item) {
const {classCode} = item
aiApi.extractLabel({
classCode
}).then(res => {
if (item.excellentFlag === null) {
item.excellentFlag = 1
}
if (!item.labelCode) {
const {
labelCode: code
} = res.data[0] || {}
item.labelCode = code
}
this.setData({
detail: item,
list,
tags: res.data
})
})
},
extractClass() {
aiApi.extractClass().then(res=>{
const extractClassList = res.data||[]
const classArray = extractClassList.map(i=>i.className)
this.setData({extractClassList,classArray})
aiApi.extractClass().then(res => {
const extractClassList = res.data || []
const classArray = extractClassList.map(i => i.className)
this.setData({
extractClassList,
classArray
})
})
},
pickerCancel() {
this.setData({
showPicker:false
showPicker: false
})
},
pickerConfirm(event) {
const { index } = event.detail;
let {extractClassList,detail} = this.data
detail.className =extractClassList[index].className
detail.classCode = extractClassList[index].classCode
this.setData({
showPicker:false,
classIndex:index,
detail
})
this.extractLabel(detail.classCode)
const {
index
} = event.detail;
let {
extractClassList,
detail
} = this.data
detail.className = extractClassList[index].className
detail.classCode = extractClassList[index].classCode
this.setData({
showPicker: false,
classIndex: index,
detail
})
this.extractLabel(detail.classCode)
},
toggleClass() {
this.setData({
showPicker:true
showPicker: true
})
},
// 编辑润色文本
handleEdit() {
this.setData({showPopup:true})
this.setData({
showPopup: true
})
},
handleCancel() {
this.setData({showPopup:false})
this.setData({
showPopup: false
})
},
editConfirm() {
this.handleCancel()
......@@ -111,22 +159,28 @@ Page({
})
},
onChange(event) {
this.setDetail('excellentFlag',event.detail)
this.setDetail('excellentFlag', event.detail)
},
setDetail(name,value) {
const {detail} = this.data
setDetail(name, value) {
const {
detail
} = this.data
detail[name] = value
this.setData({
detail
});
},
textareaInput(e) {
this.setDetail('polishContent',e.detail.value)
this.setDetail('polishContent', e.detail.value)
},
// 标签选择
toggleTag(e) {
const {code} = e.currentTarget.dataset
const {detail} = this.data
const {
code
} = e.currentTarget.dataset
const {
detail
} = this.data
detail.labelCode = code
this.setData({
detail
......@@ -142,22 +196,24 @@ Page({
showCancel: true,
confirmText: '确定',
confirmColor: '#347BFF',
success (res) {
if (res.confirm) {
_this.extractUpdate()
success(res) {
if (res.confirm) {
_this.extractUpdate()
}
}
}
})
},
extractUpdate() {
const {detail:{
id,
classCode,
excellentFlag,
labelCode,
polishContent,
type
}} = this.data
const {
detail: {
id,
classCode,
excellentFlag,
labelCode,
polishContent,
type
}
} = this.data
const params = {
id,
classCode,
......@@ -166,11 +222,11 @@ Page({
polishContent,
}
let updateApi = 'extractUpdate'
if(type == 2) {
if (type == 2) {
updateApi = 'extractSecondUpdate'
}
aiApi[updateApi](params).then(res=>{
if(res.data) {
aiApi[updateApi](params).then(res => {
if (res.data) {
wx.navigateTo({
url: `/packageEquity/pages/extract/success/success`,
});
......
......@@ -23,8 +23,8 @@
<text class="label">是否优秀</text>
<view class="value">
<van-radio-group custom-class="radio-box" value="{{ detail.excellentFlag }}" bind:change="onChange">
<van-radio name="1">优秀话术</van-radio>
<van-radio name="0">非优秀话术</van-radio>
<van-radio name="{{1}}">优秀话术</van-radio>
<van-radio name="{{0}}">非优秀话术</van-radio>
</van-radio-group>
</view>
</view>
......
......@@ -34,6 +34,15 @@ Page({
{
label: '已驳回',
checkStatus: 3,
status: 4,
show: true,
style:
'border:2rpx solod #3582ee80;background-color:#fdece9;color: #F24724'
},
{
label: '二次驳回',
checkStatus: 4,
type: 2,
show: true,
style:
'border:2rpx solod #3582ee80;background-color:#fdece9;color: #F24724'
......@@ -105,6 +114,11 @@ Page({
const {type} = route.params || route;
const isLink = route.params?false:true
const barList = this.data.barList.filter(i=>i.type != type)
barList.forEach(bar=>{
if(bar.status) {
bar.checkStatus = bar.status
}
})
this.setData({barList,type,isLink},()=>{
this.initMethod()
})
......@@ -151,6 +165,7 @@ Page({
const resList = res.data ||[]
const { barList } = this.data;
const list = barList.map((i) => {
i.count = 0
const v = resList.find((k) => k.checkStatus == i.checkStatus);
return { ...i, ...v };
});
......
......@@ -85,7 +85,8 @@ background: #ffffff;
text-align: center;
padding-bottom: 30rpx;
height: 80rpx;
color: #666;
color: #5a5e66;
font-size: 28rpx;
}
.filter-tabs .active {
......
// filter.wxs
var showFunctions = {
showLabelName: function(item) {
return item.checkStatus != 3 && item.checkStatus != 0
return item.checkStatus != 3 && item.checkStatus != 0 && item.checkStatus != 4
},
showUpdatedBy: function(item) {
return item.checkStatus == 3 &&item.checkStatus == 2
return item.checkStatus == 2 || item.checkStatus == 3 || item.checkStatus == 4
},
showUpdatedTime: function(item) {
return item.checkStatus == 3 &&item.checkStatus == 2
return item.checkStatus == 2 || item.checkStatus == 3 || item.checkStatus == 4
},
showClassName: function(item) {
return item.checkStatus != 3 && item.checkStatus != 0
return item.checkStatus != 3 && item.checkStatus != 0 && item.checkStatus != 4
}
// 其他判断函数...
}
......
......@@ -64,4 +64,11 @@ module.exports = {
orderStaffValid(data) {
return api.post("dj.api.smartcarlife.order.staff.valid", data);
},
/** 二次核验权限校验 */
extractCheck(data) {
return api.post(
"dj.api.car.boutique.script.extract.second.check.permission",
data
);
},
};
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!