Commit a58d16a8 by 李宁

1

1 parent f7a34c31
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
data: { data: {
info: {}, info: {},
busiFlag: '--', busiFlag: '1',
areaCode: '' areaCode: ''
}, },
created: function() { created: function() {
...@@ -20,9 +20,11 @@ ...@@ -20,9 +20,11 @@
}, },
methods: { methods: {
httpRequest:function(param){ httpRequest:function(param){
let origin = "https://hhzj.lgyzpt.com" let origin = window.origin
if(origin.includes('localhost')>0 || origin=='null' || origin.includes('file:')>0 || window.origin.includes('testznzl')){ if(origin.includes('localhost')>0 || origin=='null' || origin.includes('file:')>0 || window.origin.includes('testznzl')){
origin = 'https://testznzl.lgyzpt.com' origin = 'https://testznzl.lgyzpt.com'
}else{
origin = "https://hhzj.lgyzpt.com"
} }
return new Promise(function(resolve, reject){ return new Promise(function(resolve, reject){
...@@ -63,14 +65,17 @@ ...@@ -63,14 +65,17 @@
url = "https://testznzl.lgyzpt.com/activity/zjbPhone/addBusi.html" url = "https://testznzl.lgyzpt.com/activity/zjbPhone/addBusi.html"
} }
window.location.replace(url+"?source=zhijian&phone="+this.info.accNbr+"&areaCode="+this.areaCode+"&campaignId="+this.info.campaignId) //window.location.replace(url+"?source=zhijian&phone="+this.info.accNbr+"&areaCode="+this.areaCode+"&campaignId="+this.info.campaignId)
// window.location.replace( window.location.replace(
// `${url}?source=zhijian\ `${url}?source=zhijian` +
// &phone=${this.info.accNbr}\ `&areaCode=${this.areaCode}` +
// &areaCode=${this.areaCode}\ `&accNbr=${this.info.accNbr}` +
// &campaignId=${this.info.campaignId}` `&sysId=${this.info.sysId}` +
// ); `&orderId=${this.info.orderId}` +
`&areaType=${this.info.areaType}` +
`&campaignId=${this.info.campaignId}`
)
}, },
goBack(){ goBack(){
history.go(-1) history.go(-1)
......
...@@ -36,6 +36,6 @@ ...@@ -36,6 +36,6 @@
<script src="js/axios.min.js"></script> <script src="js/axios.min.js"></script>
<script src="js/vue.min.js"></script> <script src="js/vue.min.js"></script>
<script src="js/result.js?666633"></script> <script src="js/result.js?66663993"></script>
</body> </body>
</html> </html>
\ No newline at end of file \ No newline at end of file
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
"permissions": { "permissions": {
"allow": [ "allow": [
"Bash(tree src/ -I node_modules)", "Bash(tree src/ -I node_modules)",
"Bash(npm run serve)" "Bash(npm run serve)",
"Bash(tree src/)"
], ],
"deny": [], "deny": [],
"ask": [] "ask": []
......
<template> <template>
<div id="app"> <div id="app">
<keep-alive>
<router-view/> <router-view/>
</keep-alive>
</div> </div>
</template> </template>
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
/> />
</div> </div>
<el-select v-model="formData.personnelTypes" placeholder="人员类型" class="filter-select" multiple clearable> <el-select v-model="formData.personnelTypes" placeholder="人员类型" class="filter-select" multiple clearable>
<el-option label="装维师傅" value="1"></el-option> <el-option label="工维人员" value="1"></el-option>
<el-option label="支撑人员" value="2"></el-option> <el-option label="支撑人员" value="2"></el-option>
</el-select> </el-select>
<template v-if="addressStore.cityArr.length>0"> <template v-if="addressStore.cityArr.length>0">
...@@ -174,7 +174,7 @@ ...@@ -174,7 +174,7 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="人员类型" prop="personnelType"> <el-form-item label="人员类型" prop="personnelType">
<el-select v-model="updatePersonStore.personnelType" :disabled="!!updatePersonStore.row.id" @change="personnelTypeChange" style="width: 100%;"> <el-select v-model="updatePersonStore.personnelType" :disabled="!!updatePersonStore.row.id" @change="personnelTypeChange" style="width: 100%;">
<el-option label="装维师傅" value="1"></el-option> <el-option label="工维人员" value="1"></el-option>
<el-option label="支撑人员" value="2"></el-option> <el-option label="支撑人员" value="2"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
......
...@@ -26,7 +26,10 @@ const routes = [ ...@@ -26,7 +26,10 @@ const routes = [
{ {
path: '/opportunities', path: '/opportunities',
name: 'OpportunityManagement', name: 'OpportunityManagement',
component: OpportunityManagement component: OpportunityManagement,
meta: {
keepAlive: true
}
}, },
{ {
path: '/opportunitiesDetail', path: '/opportunitiesDetail',
......
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
</el-header> </el-header>
<!-- 页面内容 --> <!-- 页面内容 -->
<el-main class="dashboard-main"> <el-main class="dashboard-main" id="mainContain">
<router-view /> <router-view />
</el-main> </el-main>
</el-container> </el-container>
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
v-model="addressStore.city" v-model="addressStore.city"
placeholder="选择地市" placeholder="选择地市"
@change="cityChange" @change="cityChange"
:disabled="getData.city!=''"
clearable> clearable>
<el-option <el-option
v-for="item in addressStore.cityArr" v-for="item in addressStore.cityArr"
...@@ -49,7 +50,7 @@ ...@@ -49,7 +50,7 @@
<el-select <el-select
v-model="addressStore.county" v-model="addressStore.county"
placeholder="选择区县" placeholder="选择区县"
@change="countyChange" :disabled="getData.county!=''"
clearable> clearable>
<el-option <el-option
v-for="item in addressStore.countyArr" v-for="item in addressStore.countyArr"
...@@ -121,6 +122,10 @@ export default { ...@@ -121,6 +122,10 @@ export default {
county: '', county: '',
countyArr: [], countyArr: [],
}, },
getData:{
city: '',
county: ''
},
formData:{ formData:{
gridName: '', gridName: '',
gridCode: '', gridCode: '',
...@@ -134,6 +139,9 @@ export default { ...@@ -134,6 +139,9 @@ export default {
} }
}, },
created(){ created(){
let pa = JSON.parse(localStorage.getItem('accountInfo'))
this.getData.city = pa.cityCode||''
this.getData.county = pa.countyCode||''
this.queryArea() this.queryArea()
this.handleQuery() this.handleQuery()
...@@ -146,9 +154,24 @@ export default { ...@@ -146,9 +154,24 @@ export default {
}).then(res=>{ }).then(res=>{
if(res.code == 200){ if(res.code == 200){
this.addressStore.cityArr = res.data this.addressStore.cityArr = res.data
this.setAddressShow()
} }
}) })
}, },
setAddressShow(){
let ad = this.addressStore
let gd = this.getData
if(gd.city){
ad.city = gd.city
this.cityChange(ad.city)
if(gd.county){
ad.county = gd.county
}
}
},
cityChange(value){ cityChange(value){
let ad = this.addressStore let ad = this.addressStore
ad.city = value ad.city = value
......
...@@ -362,7 +362,7 @@ ...@@ -362,7 +362,7 @@
v-model="audioBusiStore.reason" v-model="audioBusiStore.reason"
type="textarea" type="textarea"
:rows="4" :rows="4"
placeholder="请输入审核不通过的理由" placeholder="请输入理由"
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -646,7 +646,7 @@ export default { ...@@ -646,7 +646,7 @@ export default {
let ad = this.audioBusiStore let ad = this.audioBusiStore
if(!ad.reason){ if(!ad.reason){
this.$message.error('请输入不通过理由') this.$message.error('请输入理由')
return return
} }
...@@ -672,6 +672,7 @@ export default { ...@@ -672,6 +672,7 @@ export default {
}, },
goBack() { goBack() {
// 使用浏览器返回,这样可以触发列表页的 beforeRouteLeave 钩子
this.$router.go(-1) this.$router.go(-1)
}, },
getStatusType(status) { getStatusType(status) {
......
...@@ -408,12 +408,12 @@ ...@@ -408,12 +408,12 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item v-if="auditForm.result == '0'" label="不通过理由" required> <el-form-item label="理由" required>
<el-input <el-input
v-model="auditForm.reason" v-model="auditForm.reason"
type="textarea" type="textarea"
:rows="4" :rows="4"
placeholder="请输入审核不通过的理由" placeholder="请输入理由"
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -523,6 +523,10 @@ export default { ...@@ -523,6 +523,10 @@ export default {
// 分页 // 分页
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
// 滚动位置相关
savedScrollPosition: 0,
currentScrollPosition: 0,
scrollTimer: null,
} }
}, },
created(){ created(){
...@@ -532,12 +536,123 @@ export default { ...@@ -532,12 +536,123 @@ export default {
this.getData.grid = pa.gridCode||'' this.getData.grid = pa.gridCode||''
this.queryArea() this.queryArea()
this.queryBusi()
this.queryStatistics() this.queryStatistics()
this.queryStatus() this.queryStatus()
this.queryAllBusiLabel() this.queryAllBusiLabel()
}, },
mounted() {
// 延迟注册滚动事件监听器,确保DOM已完全加载
this.$nextTick(() => {
setTimeout(() => {
document.querySelector('#mainContain').addEventListener('scroll', this.handleScroll, { passive: true })
console.log('滚动事件监听器已注册')
}, 100)
})
},
// keep-alive 激活时的生命周期钩子
activated() {
// 重新注册滚动事件监听器
window.addEventListener('scroll', this.handleScroll, { passive: true })
console.log('组件被激活,重新注册滚动监听')
},
// 组件失活时移除监听器
deactivated() {
window.removeEventListener('scroll', this.handleScroll)
console.log('组件失活,移除滚动监听')
},
// 组件销毁时移除监听器
beforeDestroy() {
if (this.scrollTimer) {
clearTimeout(this.scrollTimer)
}
window.removeEventListener('scroll', this.handleScroll)
console.log('组件销毁,清理资源')
},
// 添加页面生命周期钩子
beforeRouteLeave(to, from, next) {
// 保存当前状态到 localStorage
this.saveState()
next()
},
methods: { methods: {
// 保存页面状态
saveState() {
const state = {
formData: this.formData,
addressStore: this.addressStore,
pageStore: this.pageStore,
scrollPosition: this.currentScrollPosition
}
localStorage.setItem('opportunityManagementState', JSON.stringify(state))
},
// 恢复页面状态
restoreState() {
const savedState = localStorage.getItem('opportunityManagementState')
if (savedState) {
try {
const state = JSON.parse(savedState)
// 恢复筛选条件
if (state.formData) {
this.formData = { ...this.formData, ...state.formData }
}
// 恢复地址选择
if (state.addressStore) {
this.addressStore = { ...this.addressStore, ...state.addressStore }
}
// 恢复分页
if (state.pageStore) {
this.pageStore = { ...this.pageStore, ...state.pageStore }
}
// 恢复滚动位置
if (state.scrollPosition !== undefined) {
this.savedScrollPosition = state.scrollPosition
}
// 清除保存的状态,避免过期数据
localStorage.removeItem('opportunityManagementState')
} catch (error) {
console.error('恢复状态失败:', error)
}
}else{
this.setAddressShow()
}
this.queryBusi()
},
// 滚动事件处理函数
handleScroll() {
// 使用节流优化性能
if (this.scrollTimer) {
clearTimeout(this.scrollTimer)
}
this.scrollTimer = setTimeout(() => {
this.currentScrollPosition = document.querySelector('#mainContain').scrollTop
console.log('当前滚动位置:', this.currentScrollPosition)
}, 100)
},
// 恢复滚动位置
restoreScrollPosition() {
if (this.savedScrollPosition > 0) {
// 使用多种方式确保兼容性
document.querySelector('#mainContain').scrollTop = this.savedScrollPosition
console.log('恢复滚动位置到:', this.savedScrollPosition)
// 重置保存的滚动位置
this.savedScrollPosition = 0
}
},
ifCanAudio(row){ ifCanAudio(row){
return row.status!=3 || (row.opportunityType==2&&this.getData.grid) return row.status!=3 || (row.opportunityType==2&&this.getData.grid)
}, },
...@@ -603,7 +718,8 @@ export default { ...@@ -603,7 +718,8 @@ export default {
if(res.code == 200){ if(res.code == 200){
this.addressStore.cityArr = res.data this.addressStore.cityArr = res.data
this.setAddressShow()
this.restoreState()
} }
}) })
}, },
...@@ -671,7 +787,6 @@ export default { ...@@ -671,7 +787,6 @@ export default {
} }
} }
} }
}, },
cityChange(value){ cityChange(value){
let ad = this.addressStore let ad = this.addressStore
...@@ -765,8 +880,12 @@ export default { ...@@ -765,8 +880,12 @@ export default {
}).then(res=>{ }).then(res=>{
if(res.code == 200){ if(res.code == 200){
this.tableData = res.data.records this.tableData = res.data.records
this.pageStore.total = res.data.total this.pageStore.total = res.data.total
// 数据加载完成后恢复滚动位置
this.$nextTick(() => {
this.restoreScrollPosition()
})
}else{ }else{
this.$message.error(res.message) this.$message.error(res.message)
} }
...@@ -846,8 +965,14 @@ export default { ...@@ -846,8 +965,14 @@ export default {
this.selectedTag = '' this.selectedTag = ''
this.dateRange = [] this.dateRange = []
this.currentPage = 1 this.currentPage = 1
// 清除保存的状态
localStorage.removeItem('opportunityManagementState')
}, },
checkDetail(row){ checkDetail(row){
// 保存当前状态
this.saveState()
localStorage.setItem('detailId',row.id) localStorage.setItem('detailId',row.id)
this.$router.push(`/opportunitiesDetail`) this.$router.push(`/opportunitiesDetail`)
...@@ -871,8 +996,8 @@ export default { ...@@ -871,8 +996,8 @@ export default {
return return
} }
if (this.auditForm.result == '0' && !this.auditForm.reason.trim()) { if (!this.auditForm.reason.trim()) {
this.$message.error('审核不通过时必须填写理由') this.$message.error('请输入理由')
return return
} }
......
...@@ -211,6 +211,6 @@ ...@@ -211,6 +211,6 @@
<script src="js/vue.min.js"></script> <script src="js/vue.min.js"></script>
<script src="js/util.js"></script> <script src="js/util.js"></script>
<script src="js/addressData.js"></script> <script src="js/addressData.js"></script>
<script src="js/addBusi.js?0911"></script> <script src="js/addBusi.js?0910001"></script>
</body> </body>
</html> </html>
\ No newline at end of file \ No newline at end of file
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
</div> </div>
</div> </div>
<!-- 营销人员 --> <!-- 营销人员 -->
<div class="info-row" data-node-id="294:2298" v-else> <div class="info-row" data-node-id="294:2298" v-else-if="businessDetail.marketingStaffPhone">
<span class="info-label" data-node-id="294:2299">营销人员</span> <span class="info-label" data-node-id="294:2299">营销人员</span>
<div class="phone-container" data-node-id="294:2300"> <div class="phone-container" data-node-id="294:2300">
<span class="info-value" data-node-id="294:2301">{{ businessDetail.marketingStaffPhone }}</span> <span class="info-value" data-node-id="294:2301">{{ businessDetail.marketingStaffPhone }}</span>
...@@ -228,7 +228,7 @@ ...@@ -228,7 +228,7 @@
<div class="cancel" @click="cdStore.isShow=false">取消</div> <div class="cancel" @click="cdStore.isShow=false">取消</div>
<div class="submit" @click="cdSubmit">确认成单</div> <div class="submit" @click="cdSubmit">确认成单</div>
</div> </div>
<div class="botTs">提交后将进入审核流程,审核通过前可以撤回</div> <div class="botTs">提交后将进入审核流程</div>
</div> </div>
</div> </div>
......
...@@ -528,7 +528,7 @@ body { ...@@ -528,7 +528,7 @@ body {
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
background: rgba(0, 0, 0, 0.9); background: rgba(0, 0, 0, 0.7);
z-index: 99999; z-index: 99999;
display: flex; display: flex;
align-items: center; align-items: center;
......
...@@ -256,14 +256,58 @@ new Vue({ ...@@ -256,14 +256,58 @@ new Vue({
*/ */
initData() { initData() {
this.haZjData = { this.haZjData = {
accNbr: utils.getUrlParam('phone'), sysId: utils.getUrlParam('sysId'),
accNbr: utils.getUrlParam('accNbr'),
orderId: utils.getUrlParam('orderId'),
campaignId: utils.getUrlParam('campaignId'), campaignId: utils.getUrlParam('campaignId'),
areaType: utils.getUrlParam('areaType'),
areaCode: utils.getUrlParam('areaCode'), areaCode: utils.getUrlParam('areaCode'),
} }
this.getAddress()
this.contactPhone = this.haZjData.accNbr this.contactPhone = this.haZjData.accNbr
}, },
getAddress(){
this.httpRequest({
url: '/zhijian/ha/getOrderInfo',
data: {...this.haZjData,...{
realAddress: '无所谓',
latitude: '123.123',
longitude: '123.2123',
cmcc: false
}}
}).then(res=>{
if(res.code == '200'){
this.haZjData.address = res.data.addressName||''
}
})
},
httpRequest:function(param){
let origin = window.origin
if(origin.includes('localhost')>0 || origin=='null' || origin.includes('file:')>0 || window.origin.includes('testznzl')){
origin = 'https://testznzl.lgyzpt.com'
}else{
origin = "https://hazj.lgyzpt.com"
}
return new Promise(function(resolve, reject){
axios ({
method: 'post',
url:origin + param.url,
timeout: param.time||15000,
data:param.data,
headers: {
'Content-Type': 'application/json'
}
}).then((res) => {
resolve(res.data)
}).catch(res => {
reject(res)
})
})
},
/** /**
* 手机号脱敏处理 * 手机号脱敏处理
*/ */
......
...@@ -134,6 +134,8 @@ new Vue({ ...@@ -134,6 +134,8 @@ new Vue({
data: fd data: fd
}) })
if (result.code == 200) { if (result.code == 200) {
utils.toast('跟进提交成功!'); utils.toast('跟进提交成功!');
this.gjStore.isShow = false this.gjStore.isShow = false
......
...@@ -8,7 +8,7 @@ new Vue({ ...@@ -8,7 +8,7 @@ new Vue({
loginForm: { loginForm: {
employeeId: '', employeeId: '',
phoneNumber: '', phoneNumber: '',
verifyCode: '' verifyCode: '123456'
}, },
countdown: 0, countdown: 0,
countdownTimer: null, countdownTimer: null,
...@@ -19,16 +19,16 @@ new Vue({ ...@@ -19,16 +19,16 @@ new Vue({
this.platform = type this.platform = type
localStorage.setItem('platform',type) localStorage.setItem('platform',type)
// if(type == 'gw'){ if(type == 'gw'){
// this.loginForm.employeeId = '54321' this.loginForm.employeeId = '54321'
// this.loginForm.phoneNumber = '15611154004' this.loginForm.phoneNumber = '15611154004'
// }else if(type == 'yx'){ }else if(type == 'yx'){
// this.loginForm.employeeId = '12345' this.loginForm.employeeId = '12345'
// this.loginForm.phoneNumber = '13718590607' this.loginForm.phoneNumber = '13718590607'
// }else{ }else{
// this.loginForm.employeeId = '54321' this.loginForm.employeeId = '54321'
// this.loginForm.phoneNumber = '13212789513' this.loginForm.phoneNumber = '13212789513'
// } }
}, },
getVerifyCode() { getVerifyCode() {
let pa = this.loginForm let pa = this.loginForm
......
...@@ -72,6 +72,6 @@ ...@@ -72,6 +72,6 @@
<script src="js/axios.min.js"></script> <script src="js/axios.min.js"></script>
<script src="js/vue.min.js"></script> <script src="js/vue.min.js"></script>
<script src="js/util.js"></script> <script src="js/util.js"></script>
<script src="js/login.js?1233"></script> <script src="js/login.js?123333"></script>
</body> </body>
</html> </html>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!