Commit 7f463f96 by 前端

权限

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