修改
This commit is contained in:
+1
-1
@@ -6,7 +6,7 @@ NODE_ENV=production
|
|||||||
# 测试0 生产1
|
# 测试0 生产1
|
||||||
VUE_APP_ENV = '1'
|
VUE_APP_ENV = '1'
|
||||||
# 定义变量
|
# 定义变量
|
||||||
VUE_APP_CITY_TYPE = 'xj'
|
VUE_APP_CITY_TYPE = 'sx'
|
||||||
|
|
||||||
# base api
|
# base api
|
||||||
VUE_APP_BASE_API = ''
|
VUE_APP_BASE_API = ''
|
||||||
|
|||||||
+2
-2
@@ -18,9 +18,9 @@
|
|||||||
content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no">
|
content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no">
|
||||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||||
<script src="static/lib/echarts.min.js"></script>
|
<script src="static/lib/echarts.min.js"></script>
|
||||||
<!-- <script src="https://cdn.bootcss.com/html2canvas/0.5.0-beta4/html2canvas.min.js"></script>
|
<script src="https://cdn.bootcss.com/html2canvas/0.5.0-beta4/html2canvas.min.js"></script>
|
||||||
|
|
||||||
<script src="https://unpkg.com/vconsole@latest/dist/vconsole.min.js"></script>
|
<!-- <script src="https://unpkg.com/vconsole@latest/dist/vconsole.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
var vConsole = new window.VConsole();
|
var vConsole = new window.VConsole();
|
||||||
</script> -->
|
</script> -->
|
||||||
|
|||||||
+3
-1
@@ -282,7 +282,9 @@ export function getPositionData(params) {
|
|||||||
// 获取配电信息
|
// 获取配电信息
|
||||||
export function getNxzdPower(params) {
|
export function getNxzdPower(params) {
|
||||||
return myAxios({
|
return myAxios({
|
||||||
url: `${sx}/energy-effcicency-net-service/nxzdUseEnergyEquipNet/getNxzdPower?customerId=${params}`,
|
url: `${sx}/energy-effcicency-net-service/nxzdUseEnergyEquipNet/getNxzdPower`,
|
||||||
|
// ?customerId=${params}
|
||||||
method: 'get',
|
method: 'get',
|
||||||
|
params: { "customerId": params }
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-17
@@ -2,6 +2,7 @@
|
|||||||
import myAxios from "./axios";
|
import myAxios from "./axios";
|
||||||
import myAxios2 from "./axios2";
|
import myAxios2 from "./axios2";
|
||||||
const sx = process.env.VUE_APP_CITY_TYPE == 'sx'?'/ferry_service/ferryController/conveyor':''
|
const sx = process.env.VUE_APP_CITY_TYPE == 'sx'?'/ferry_service/ferryController/conveyor':''
|
||||||
|
const sxAdmin = process.env.VUE_APP_CITY_TYPE == 'sx'?'/admin/grsg2':'/thirdpart/grsg'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询系统码表
|
* 查询系统码表
|
||||||
@@ -39,7 +40,7 @@ export function getUserInfo(params) {
|
|||||||
//获取ai
|
//获取ai
|
||||||
export function getLoginInfoByGrsg(params) {
|
export function getLoginInfoByGrsg(params) {
|
||||||
return myAxios({
|
return myAxios({
|
||||||
url: `/thirdpart/grsg/loginGrsg`, //后端接口路由
|
url: `${sxAdmin}/loginGrsg`, //后端接口路由
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: params
|
data: params
|
||||||
})
|
})
|
||||||
@@ -63,21 +64,5 @@ export function getUserLevel() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取返回base64
|
|
||||||
export function downReportTime(data) {
|
|
||||||
return myAxios2({
|
|
||||||
url: `${sx}/energy-effcicency-net-service/nxzdReportTemplaNet/downReportTime`, //后端接口路由
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 保存日志
|
|
||||||
export function saveLog(data) {
|
|
||||||
return myAxios({
|
|
||||||
url: `${sx}/energy-effcicency-net-service/log/saveLog`, //后端接口路由
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -18,8 +18,8 @@ if (process.env.NODE_ENV === 'development') {
|
|||||||
// baseURL = '' // 本地 打包以后只需要空路径就行
|
// baseURL = '' // 本地 打包以后只需要空路径就行
|
||||||
// baseURL = '/proxy-ah' //安徽 打包以后的路径
|
// baseURL = '/proxy-ah' //安徽 打包以后的路径
|
||||||
// baseURL = '/proxy-nx' //宁夏 打包以后的路径
|
// baseURL = '/proxy-nx' //宁夏 打包以后的路径
|
||||||
baseURL = '/proxy-xj' //新疆 打包以后的路径
|
// baseURL = '/proxy-xj' //新疆 打包以后的路径
|
||||||
// baseURL = '/proxy-sx' //山西 打包以后的路径
|
baseURL = '/proxy-sx' //山西 打包以后的路径
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -43,15 +43,3 @@ export function getSingleTaskInfo(id) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询客户用电户号列表
|
|
||||||
* @param data
|
|
||||||
*/
|
|
||||||
// nxzdCustomerBasicInfoNet
|
|
||||||
export function getUseele(data) {
|
|
||||||
return myAxios({
|
|
||||||
url: `${sx}/energy-effcicency-net-service/nxzdCConsNet/list`, //后端接口路由
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
@@ -264,19 +264,3 @@ export function enterprisEdit(params) {
|
|||||||
data: params
|
data: params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 新增保存企业通用能源系统信息主
|
|
||||||
export function systemInfoAdd(params) {
|
|
||||||
return myAxios({
|
|
||||||
url: `${sx}/energy-effcicency-net-service/nxzdEnterprisSystemInfoNet/add`,
|
|
||||||
method: 'POST',
|
|
||||||
data: params
|
|
||||||
})
|
|
||||||
}
|
|
||||||
// 修改保存企业通用能源系统信息主
|
|
||||||
export function systemInfoEdit(params) {
|
|
||||||
return myAxios({
|
|
||||||
url: `${sx}/energy-effcicency-net-service/nxzdEnterprisSystemInfoNet/edit`,
|
|
||||||
method: 'POST',
|
|
||||||
data: params
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|||||||
+1
-10
@@ -303,16 +303,7 @@ export default [
|
|||||||
component: () => import('@/views/enterprise/customer.vue')
|
component: () => import('@/views/enterprise/customer.vue')
|
||||||
},
|
},
|
||||||
|
|
||||||
// 工业企业-用电户号
|
|
||||||
{
|
|
||||||
path: '/useele',
|
|
||||||
name: 'useele',
|
|
||||||
meta: {
|
|
||||||
title: '用电户号',
|
|
||||||
keepAlive: true
|
|
||||||
},
|
|
||||||
component: () => import('@/views/enterprise/useEle.vue')
|
|
||||||
},
|
|
||||||
// 工业企业-部分报告
|
// 工业企业-部分报告
|
||||||
{
|
{
|
||||||
path: '/partialreport',
|
path: '/partialreport',
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@ module.exports = {
|
|||||||
menuExclude: [],
|
menuExclude: [],
|
||||||
// ${process.env.VUE_APP_BASE_API}
|
// ${process.env.VUE_APP_BASE_API}
|
||||||
// https://portal.xt.nfjbill.ren:30004
|
// https://portal.xt.nfjbill.ren:30004
|
||||||
downloadUrl: `${process.env.VUE_APP_BASE_API}/file/minio/download/`,
|
downloadUrl: `${process.env.VUE_APP_BASE_API}/proxy-sx/file/minio/download/`,
|
||||||
// downloadUrl: `https://www.greensgcc.com/proxy-xj/file/minio/download/`,
|
// downloadUrl: `https://www.greensgcc.com/proxy-xj/file/minio/download/`,
|
||||||
// downloadUrl: `http://172.29.69.38:19012/proxy-sx/file/minio/download/`,
|
// downloadUrl: `http://172.29.69.38:19012/proxy-sx/file/minio/download/`,
|
||||||
uploadUrl: `${process.env.VUE_APP_BASE_API}/file/minio/upload/`,
|
uploadUrl: `${process.env.VUE_APP_BASE_API}/file/minio/upload/`,
|
||||||
|
|||||||
@@ -6,7 +6,9 @@ const tokenKey = 'stk',
|
|||||||
uidKey = 'suid',
|
uidKey = 'suid',
|
||||||
userTypeKey = 'sut',
|
userTypeKey = 'sut',
|
||||||
duidKey = 'sduid',
|
duidKey = 'sduid',
|
||||||
sak = 'saikey'
|
sak = 'saikey',
|
||||||
|
useridKey= 'userId',
|
||||||
|
username= 'username'
|
||||||
const getValueByKey = key => {
|
const getValueByKey = key => {
|
||||||
return sessionStorage.getItem(key) ? sessionStorage.getItem(key) : ''
|
return sessionStorage.getItem(key) ? sessionStorage.getItem(key) : ''
|
||||||
}
|
}
|
||||||
@@ -15,8 +17,8 @@ const getDefaultState = () => ({
|
|||||||
token: getValueByKey(tokenKey),
|
token: getValueByKey(tokenKey),
|
||||||
ai: getValueByKey(sak),
|
ai: getValueByKey(sak),
|
||||||
platform: getValueByKey(platformKey),
|
platform: getValueByKey(platformKey),
|
||||||
userid: '',
|
userid: getValueByKey(useridKey),
|
||||||
username: '',
|
username: getValueByKey(username),
|
||||||
realname: '',
|
realname: '',
|
||||||
mobile: '',
|
mobile: '',
|
||||||
uno: '', //0500024691
|
uno: '', //0500024691
|
||||||
@@ -85,6 +87,7 @@ const mutations = {
|
|||||||
},
|
},
|
||||||
SET_USER_NAME: (state, username) => {
|
SET_USER_NAME: (state, username) => {
|
||||||
state.username = username
|
state.username = username
|
||||||
|
sessionStorage.setItem('username', username)
|
||||||
},
|
},
|
||||||
SET_REALNAME: (state, realname) => {
|
SET_REALNAME: (state, realname) => {
|
||||||
state.realname = realname
|
state.realname = realname
|
||||||
@@ -152,7 +155,7 @@ const actions = {
|
|||||||
getUserInfo({ commit }) {
|
getUserInfo({ commit }) {
|
||||||
console.log(this);
|
console.log(this);
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
getUserInfo().then(res => {
|
getUserInfo({t: new Date().getTime()}).then(res => {
|
||||||
// if (res.code == vm.$StatusCode.SUCCESS) {
|
// if (res.code == vm.$StatusCode.SUCCESS) {
|
||||||
if(res.code == 0) {
|
if(res.code == 0) {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import html2Canvas from 'html2canvas'
|
import html2Canvas from 'html2canvas'
|
||||||
import JsPDF from 'jspdf'
|
import JsPDF from 'jspdf'
|
||||||
import { buildPDF } from '@/utils/dsbridge.js'
|
import { buildPDF } from '@/utils/dsbridge.js'
|
||||||
// import { downReportTime } from '@/api/common.js'
|
|
||||||
|
|
||||||
//前端不作不分页
|
//前端不作不分页
|
||||||
var getPdf = async function(title, date) {
|
var getPdf = async function(title, date) {
|
||||||
@@ -47,10 +46,6 @@ export default getPdf
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
// // var getBase64 = async function (data) {
|
|
||||||
// // const res = await downReportTime(data)
|
|
||||||
|
|
||||||
// // }
|
|
||||||
|
|
||||||
//前端作分页
|
//前端作分页
|
||||||
// var getPdf = async function(title, id) {
|
// var getPdf = async function(title, id) {
|
||||||
@@ -175,10 +170,5 @@ export default getPdf
|
|||||||
// let formData = new FormData()
|
// let formData = new FormData()
|
||||||
// let fileOfBlob = new File([u8Arr], fileName + '.jpg', options) //返回文件流
|
// let fileOfBlob = new File([u8Arr], fileName + '.jpg', options) //返回文件流
|
||||||
// formData.append('file', fileOfBlob)
|
// formData.append('file', fileOfBlob)
|
||||||
// const res = await downReportTime(formData)
|
|
||||||
// if(res.code == 0) {
|
|
||||||
// const ba64 = `filename=${fileName}.pdf;base64,` + res.data
|
|
||||||
// buildPDF(ba64)
|
|
||||||
// }
|
|
||||||
|
|
||||||
// }
|
// }
|
||||||
@@ -438,10 +438,7 @@ export default {
|
|||||||
customerTypeSure() {},
|
customerTypeSure() {},
|
||||||
//所属区域点击确认
|
//所属区域点击确认
|
||||||
provOrgSure() {},
|
provOrgSure() {},
|
||||||
//用电户号点击操作
|
|
||||||
// goUseele() {
|
|
||||||
// this.$router.push('/useele')
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,9 +57,9 @@
|
|||||||
<van-cell title="是否享受峰谷平电价" required is-link :value="showData.valleyElectricityPrices1" @click="showPicker3 = !showForm" />
|
<van-cell title="是否享受峰谷平电价" required is-link :value="showData.valleyElectricityPrices1" @click="showPicker3 = !showForm" />
|
||||||
<van-cell title="是否使用绿电交易" required is-link :value="showData.greenElectricityTrading1" @click="showPickerLd = !showForm" />
|
<van-cell title="是否使用绿电交易" required is-link :value="showData.greenElectricityTrading1" @click="showPickerLd = !showForm" />
|
||||||
<van-cell title="已使用清洁能源" required is-link :value="result1" @click="showPicker4 = !showForm" />
|
<van-cell title="已使用清洁能源" required is-link :value="result1" @click="showPicker4 = !showForm" />
|
||||||
<van-field v-model="formData.photovoltaicArea" required :rules="[{ required: gfShow == 1 }]" label="光伏总建设面积(㎡)" placeholder="请输入" type="number" input-align="right" v-if="gfShow == 1">
|
<van-field v-model="formData.photovoltaicArea" required :rules="[{ required: gfShow == 1 }]" label="光伏已建设面积(㎡)" placeholder="请输入" type="number" input-align="right" v-if="gfShow == 1">
|
||||||
</van-field>
|
</van-field>
|
||||||
<div class="tips" v-if="tips8 == true&&gfShow == 1">光伏总建设面积+可利用屋面面积<总建筑面积</div>
|
<div class="tips" v-if="tips8 == true&&gfShow == 1">光伏已建设面积+可利用屋面面积<总建筑面积</div>
|
||||||
<van-field v-model="formData.photovoltaicPhotovoltaic" required :rules="[{ required: gfShow == 1 }]" label="光伏总装机容量(kW)" placeholder="请输入" type="number" input-align="right" v-if="gfShow == 1">
|
<van-field v-model="formData.photovoltaicPhotovoltaic" required :rules="[{ required: gfShow == 1 }]" label="光伏总装机容量(kW)" placeholder="请输入" type="number" input-align="right" v-if="gfShow == 1">
|
||||||
</van-field>
|
</van-field>
|
||||||
<div class="tips" v-if="tips9 == true&&gfShow == 1">50×光伏已建设面积/1000<光伏总装机容量<200×光伏已建设面积/1000</div>
|
<div class="tips" v-if="tips9 == true&&gfShow == 1">50×光伏已建设面积/1000<光伏总装机容量<200×光伏已建设面积/1000</div>
|
||||||
@@ -296,7 +296,6 @@
|
|||||||
import Year from '@/views/facilityManage/common-vue/year.vue'
|
import Year from '@/views/facilityManage/common-vue/year.vue'
|
||||||
import mixin from '@/mixins/mixin'
|
import mixin from '@/mixins/mixin'
|
||||||
// import { Toast } from 'vant'
|
// import { Toast } from 'vant'
|
||||||
// saveLog
|
|
||||||
import { getCode } from '@/api/common.js'
|
import { getCode } from '@/api/common.js'
|
||||||
import { addEnergyEquip } from '@/api/energyConsumption'
|
import { addEnergyEquip } from '@/api/energyConsumption'
|
||||||
import { downloadUrl } from '@/settings'
|
import { downloadUrl } from '@/settings'
|
||||||
@@ -500,7 +499,7 @@ export default {
|
|||||||
purchasePower: '1', // 购电方式
|
purchasePower: '1', // 购电方式
|
||||||
basicCharge: '1', // 基本电费
|
basicCharge: '1', // 基本电费
|
||||||
valleyElectricityPrices: '2', // 是否享受峰谷平电价
|
valleyElectricityPrices: '2', // 是否享受峰谷平电价
|
||||||
photovoltaicArea: '0', // 光伏总建设面积
|
photovoltaicArea: '0', // 光伏已建设面积
|
||||||
photovoltaicPhotovoltaic: '0', // 光伏总装机容量
|
photovoltaicPhotovoltaic: '0', // 光伏总装机容量
|
||||||
reclaimedWater: '2', // 是否采用再生水
|
reclaimedWater: '2', // 是否采用再生水
|
||||||
reclaimedWaterType: '', // 再生水类型
|
reclaimedWaterType: '', // 再生水类型
|
||||||
@@ -837,18 +836,6 @@ export default {
|
|||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//保存绿网传来的数据
|
|
||||||
// async saveGreenComeData(content) {
|
|
||||||
// const tidCid = JSON.parse(sessionStorage.getItem('tidCid'))
|
|
||||||
// console.log(tidCid);
|
|
||||||
// const data = {
|
|
||||||
// businessKey: "buildBusinessKey",
|
|
||||||
// content: content,
|
|
||||||
// customerId: tidCid.customerId
|
|
||||||
// }
|
|
||||||
// const res = await saveLog(data)
|
|
||||||
// console.log(res);
|
|
||||||
// },
|
|
||||||
|
|
||||||
//点击选择日期时只展示年份
|
//点击选择日期时只展示年份
|
||||||
handelOpen() {
|
handelOpen() {
|
||||||
@@ -2021,7 +2008,7 @@ export default {
|
|||||||
purchasePower: '1', // 购电方式
|
purchasePower: '1', // 购电方式
|
||||||
basicCharge: '1', // 基本电费
|
basicCharge: '1', // 基本电费
|
||||||
valleyElectricityPrices: '2', // 是否享受峰谷平电价
|
valleyElectricityPrices: '2', // 是否享受峰谷平电价
|
||||||
photovoltaicArea: '', // 光伏总建设面积
|
photovoltaicArea: '', // 光伏已建设面积
|
||||||
photovoltaicPhotovoltaic: '', // 光伏总装机容量
|
photovoltaicPhotovoltaic: '', // 光伏总装机容量
|
||||||
reclaimedWater: '2', // 是否采用再生水
|
reclaimedWater: '2', // 是否采用再生水
|
||||||
reclaimedWaterType: '', // 再生水类型
|
reclaimedWaterType: '', // 再生水类型
|
||||||
|
|||||||
@@ -275,7 +275,7 @@ export default {
|
|||||||
// this.init()
|
// this.init()
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getAi()
|
// this.getAi()
|
||||||
if(this.$route.query.type == 2) {
|
if(this.$route.query.type == 2) {
|
||||||
this.handleSelect('2')
|
this.handleSelect('2')
|
||||||
} else {
|
} else {
|
||||||
@@ -283,30 +283,30 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//获取到ai
|
// //获取到ai
|
||||||
async getAi() {
|
// async getAi() {
|
||||||
const params = sessionStorage.getItem('saikey')
|
// const params = sessionStorage.getItem('saikey')
|
||||||
const res = await getAi({ai: params})
|
// const res = await getAi({ai: params})
|
||||||
if(res.code == 0 && !res.data) {
|
// if(res.code == 0 && !res.data) {
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
this.ai = res.data
|
// this.ai = res.data
|
||||||
// Dialog.confirm({
|
// // Dialog.confirm({
|
||||||
// title: '标题',
|
// // title: '标题',
|
||||||
// message: `${res.data}`,
|
// // message: `${res.data}`,
|
||||||
//}).then(() => {
|
// //}).then(() => {
|
||||||
// var cInput = document.createElement("input");
|
// // var cInput = document.createElement("input");
|
||||||
// cInput.value = res.data;
|
// // cInput.value = res.data;
|
||||||
// document.body.appendChild(cInput);
|
// // document.body.appendChild(cInput);
|
||||||
// cInput.select(); // 选取文本框内容
|
// // cInput.select(); // 选取文本框内容
|
||||||
// // 执行浏览器复制命令
|
// // // 执行浏览器复制命令
|
||||||
// // 复制命令会将当前选中的内容复制到剪切板中(这里就是创建的input标签)
|
// // // 复制命令会将当前选中的内容复制到剪切板中(这里就是创建的input标签)
|
||||||
// // Input要在正常的编辑状态下原生复制方法才会生效
|
// // // Input要在正常的编辑状态下原生复制方法才会生效
|
||||||
// document.execCommand("copy");
|
// // document.execCommand("copy");
|
||||||
// document.body.removeChild(cInput);
|
// // document.body.removeChild(cInput);
|
||||||
// // on confirm
|
// // // on confirm
|
||||||
//})
|
// //})
|
||||||
},
|
// },
|
||||||
// 搜索
|
// 搜索
|
||||||
async searchEveryItem() {
|
async searchEveryItem() {
|
||||||
if (!this.searchValue) {
|
if (!this.searchValue) {
|
||||||
|
|||||||
@@ -1,237 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="list">
|
|
||||||
<!-- 搜索框 -->
|
|
||||||
<!-- <div class="search">
|
|
||||||
<img src="@/assets/search.png" alt="" />
|
|
||||||
<input
|
|
||||||
type="text"
|
|
||||||
placeholder="请输入搜索文字"
|
|
||||||
@keydown.enter="searchEveryItem"
|
|
||||||
v-model="searchValue"
|
|
||||||
/>
|
|
||||||
</div> -->
|
|
||||||
<div class="container">
|
|
||||||
<van-radio-group v-model="radio">
|
|
||||||
<van-cell
|
|
||||||
v-for="(item, index) in client"
|
|
||||||
:title="item.consName +' '+ item.consNo"
|
|
||||||
:key="index"
|
|
||||||
clickable
|
|
||||||
@click="clickRadio(item, index)"
|
|
||||||
:style="item.checked ? 'background: #e5f6f3; ' : ''"
|
|
||||||
>
|
|
||||||
<!-- <van-radio :name="index" /> -->
|
|
||||||
</van-cell>
|
|
||||||
</van-radio-group>
|
|
||||||
</div>
|
|
||||||
<div class="btn">
|
|
||||||
<van-button size="large" class="faqi" @click="sureEle">
|
|
||||||
确认
|
|
||||||
</van-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
// import Header from "@/components/headerNew";
|
|
||||||
import { getUseele } from '@/api/customer'
|
|
||||||
import { Notify } from 'vant'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: '',
|
|
||||||
components: {
|
|
||||||
// Header,
|
|
||||||
},
|
|
||||||
beforeRouteEnter(to, from, next) {
|
|
||||||
next(vm => {
|
|
||||||
vm.title = to.meta.title
|
|
||||||
})
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
// 标题
|
|
||||||
title: '客户选择',
|
|
||||||
// 单选框
|
|
||||||
radio: '',
|
|
||||||
searchValue:'',
|
|
||||||
client: [],
|
|
||||||
loading: false, //加载
|
|
||||||
finished: false, //完成
|
|
||||||
pageNum: 1, //当前页数
|
|
||||||
pageSize: 10, //每页多少条
|
|
||||||
allPage: 0, //总共多少条
|
|
||||||
numArr: [],
|
|
||||||
currentItem: {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
// this.getData();
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
// this.getUseele()
|
|
||||||
this.getUseele()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
//反显数据
|
|
||||||
editData(data) {
|
|
||||||
const arr = sessionStorage.getItem('customer')
|
|
||||||
if(arr) {
|
|
||||||
this.numArr = JSON.parse(arr).list
|
|
||||||
data.forEach((ele)=> {
|
|
||||||
this.numArr.forEach((v)=>{
|
|
||||||
if(ele.consId == v.consId) {
|
|
||||||
ele.checked = true
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
//获取列表数据
|
|
||||||
async getUseele() {
|
|
||||||
const customer = sessionStorage.getItem('customer')
|
|
||||||
const data = {
|
|
||||||
pageNum: this.pageNum,
|
|
||||||
pagesize: this.pageSize,
|
|
||||||
}
|
|
||||||
if(customer) {
|
|
||||||
data.consName = JSON.parse(customer).name
|
|
||||||
} else {
|
|
||||||
data.consName = ''
|
|
||||||
}
|
|
||||||
|
|
||||||
const res = await getUseele(data)
|
|
||||||
if(res.code == 0) {
|
|
||||||
res.data.records.forEach((v) => {
|
|
||||||
v.checked = false
|
|
||||||
})
|
|
||||||
this.client = res.data.records
|
|
||||||
this.editData(res.data.records)
|
|
||||||
} else {
|
|
||||||
Notify({ type: 'danger', message: res.msg })
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 滑动加载
|
|
||||||
// onLoad() {
|
|
||||||
// // 异步更新数据
|
|
||||||
// setTimeout(async () => {
|
|
||||||
// this.pageNum++
|
|
||||||
// const data = {
|
|
||||||
// pageNum: this.pageNum,
|
|
||||||
// pagesize: this.pageSize,
|
|
||||||
// }
|
|
||||||
// // 加载状态结束
|
|
||||||
// this.loading = false
|
|
||||||
|
|
||||||
// const res = await getUseele(data)
|
|
||||||
// if(res.code == 0) {
|
|
||||||
// res.data.records.forEach((v) => {
|
|
||||||
// v.checked = false
|
|
||||||
// })
|
|
||||||
// // this.client = res.data.records
|
|
||||||
// this.client.push(...res.data.records)
|
|
||||||
// this.editData(res.data.records)
|
|
||||||
// // 数据全部加载完成
|
|
||||||
// if (this.client.length == res.data.total) {
|
|
||||||
// this.finished = true
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
// } else {
|
|
||||||
// this.finished = true
|
|
||||||
// }
|
|
||||||
// }, 1000)
|
|
||||||
// },
|
|
||||||
// 选择客户数据处理
|
|
||||||
clickRadio(item, index) {
|
|
||||||
item.checked = !item.checked
|
|
||||||
if(item.checked == true) {
|
|
||||||
this.numArr.push(item)
|
|
||||||
} else {
|
|
||||||
this.numArr.splice(index, 1)
|
|
||||||
}
|
|
||||||
console.log(this.numArr);
|
|
||||||
},
|
|
||||||
// 点击确认
|
|
||||||
sureEle() {
|
|
||||||
if (this.numArr.length == 0 ) {
|
|
||||||
Notify({ type: 'danger', message: '请至少选择一条' })
|
|
||||||
return
|
|
||||||
}
|
|
||||||
sessionStorage.setItem('numArr', JSON.stringify(this.numArr))
|
|
||||||
this.$router.go(-1)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="less" scoped>
|
|
||||||
.list {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
.container {
|
|
||||||
height: calc(100vh - 60px);
|
|
||||||
overflow-y: auto;
|
|
||||||
.van-cell {
|
|
||||||
padding: 20px;
|
|
||||||
font-size: 17px;
|
|
||||||
opacity: 0.9;
|
|
||||||
}
|
|
||||||
.item {
|
|
||||||
background: #fff;
|
|
||||||
padding: 30px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
font-size: 18px;
|
|
||||||
color: #797b7b;
|
|
||||||
border-bottom: 1px solid #e9e9e9;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
::v-deep .van-radio__icon {
|
|
||||||
-webkit-box-flex: 0;
|
|
||||||
-webkit-flex: none;
|
|
||||||
flex: none;
|
|
||||||
height: 1em;
|
|
||||||
font-size: 0.533333rem;
|
|
||||||
line-height: 1em;
|
|
||||||
cursor: pointer;
|
|
||||||
position: absolute;
|
|
||||||
right: 0;
|
|
||||||
top: 0px;
|
|
||||||
}
|
|
||||||
.btn {
|
|
||||||
padding: 0 20px;
|
|
||||||
}
|
|
||||||
.faqi {
|
|
||||||
background-color: #63cbb6;
|
|
||||||
color: #fff;
|
|
||||||
border-radius: 8px;
|
|
||||||
margin-top: -20px;
|
|
||||||
}
|
|
||||||
/deep/ .van-radio-group{
|
|
||||||
height: 100%;
|
|
||||||
background: #fff;
|
|
||||||
}
|
|
||||||
.search {
|
|
||||||
width: 100%;
|
|
||||||
height: 60px;
|
|
||||||
display: flex;
|
|
||||||
// border: 1px solid #f2f2f2;
|
|
||||||
// opacity: 0.5;
|
|
||||||
border-radius: 6px;
|
|
||||||
padding: 5px 10px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
align-items: center;
|
|
||||||
background: #fff;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
img {
|
|
||||||
width: 15px;
|
|
||||||
height: 15px;
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="list">
|
<div class="list">
|
||||||
<van-form ref="detailForm" @submit="handelClickSave">
|
<van-form ref="detailForm" @submit="handelClickSave">
|
||||||
<div class="list-upload" v-if="(type == 1||type == 2) && $store.getters.imageRecognition">
|
<!-- <div class="list-upload" v-if="(type == 1||type == 2) && $store.getters.imageRecognition">
|
||||||
<btn-uploader type="filePic" :value="filePic" @afterRead="afterRead" @delImg="delImg" @onUpload="onUpload" />
|
<btn-uploader type="filePic" :value="filePic" @afterRead="afterRead" @delImg="delImg" @onUpload="onUpload" />
|
||||||
</div>
|
</div> -->
|
||||||
<div class="container" v-if="type == 1">
|
<div class="container" v-if="type == 1">
|
||||||
<div class="inputStyle">
|
<div class="inputStyle">
|
||||||
<van-cell-group>
|
<van-cell-group>
|
||||||
|
|||||||
@@ -1,15 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="multipleAir">
|
<div class="multipleAir">
|
||||||
<div class="list-upload" v-if="$store.getters.imageRecognition">
|
<!-- <div class="list-upload" v-if="$store.getters.imageRecognition">
|
||||||
<btnUploader type="filePic" :value="filePic"
|
<btnUploader type="filePic" :value="filePic"
|
||||||
@afterRead="afterRead1"
|
@afterRead="afterRead1"
|
||||||
@delImg="delImg1"
|
@delImg="delImg1"
|
||||||
@onUpload="onUpload1" />
|
@onUpload="onUpload1" />
|
||||||
<!-- <Uploader type="exteriorImage" :value="exteriorImage"
|
</div> -->
|
||||||
@afterRead="afterRead"
|
|
||||||
@delImg="delImg"
|
|
||||||
@onUpload="onUpload" /> -->
|
|
||||||
</div>
|
|
||||||
<div class="focusItem">
|
<div class="focusItem">
|
||||||
<div class="inputStyle">
|
<div class="inputStyle">
|
||||||
<van-cell-group>
|
<van-cell-group>
|
||||||
|
|||||||
Reference in New Issue
Block a user