Browse Source

Merge branch 'zdsz3.0' of http://192.168.10.18:3000/wangtong/zd_wechatApp into zdsz3.0

menchuang 1 year ago
parent
commit
fd69fb363e

+ 60 - 27
api/common.js

@@ -1,46 +1,79 @@
 import request from '@/utils/request'
 
+
+// 材质规格下拉
+export function getEnginSpecificationsList(materId) {
+	const data = {
+		materId
+	}
+	return request({
+		'url': '/zdsz/enginSpecifications/getEnginSpecificationsList',
+		'method': 'get',
+		'data': data
+	})
+}
+
+// 工程材质下拉
+export function getEnginMaterialQualityList(enginType) {
+	const data = {
+		enginType
+	}
+	return request({
+		'url': '/zdsz/enginMaterialQuality/getEnginMaterialQualityList',
+		'method': 'get',
+		'data': data
+	})
+}
+// 新增拆旧管
+export function addTearOldPipe(param) {
+	return request({
+		'url': '/zdsz/engineeringCivil',
+		'method': 'post',
+		'data': param
+	})
+}
+
 // 获取小区字典值
-export function getAreaList() {
-	// const data = {
-	//   district
-	// }
-  return request({
-    'url': '/zdsz/area/getAreaList',
-    'method': 'get',
-	// 'data': data
-  })
+export function getAreaList(district) {
+	const data = {
+		district
+	}
+	return request({
+		'url': '/zdsz/area/getAreaList',
+		'method': 'get',
+		'data': data
+	})
 }
 // 获取楼宇字典值
 export function getBuildingList(areaId) {
 	const data = {
-	  areaId
+		areaId
 	}
-  return request({
-    'url': '/zdsz/building/getBuildingList',
-    'method': 'get',
-	'data': data
-  })
+	return request({
+		'url': '/zdsz/building/getBuildingList',
+		'method': 'get',
+		'data': data
+	})
 }
 // 获取单元字典值
 export function getUnitList(buildingId) {
 	const data = {
-	  buildingId
+		buildingId
 	}
-  return request({
-    'url': '/zdsz/unit/getUnitList',
-    'method': 'get',
-	'data': data
-  })
+	return request({
+		'url': '/zdsz/unit/getUnitList',
+		'method': 'get',
+		'data': data
+	})
 }
 // 获取房间字典值
 export function getHousesList(unitId) {
 	const data = {
-	  unitId
+		unitId
 	}
-  return request({
-    'url': '/zdsz/house/getHousesList',
-    'method': 'get',
-	'data': data
-  })
+	return request({
+		'url': '/zdsz/house/getHousesList',
+		'method': 'get',
+		'data': data
+	})
 }

+ 10 - 0
api/system/dict/data.js

@@ -0,0 +1,10 @@
+import upload from '@/utils/upload'
+import request from '@/utils/request'
+
+// 根据字典类型查询字典数据信息
+export function getDicts(dictType) {
+  return request({
+    url: '/system/dict/data/type/' + dictType,
+    method: 'get'
+  })
+}

+ 5 - 3
main.js

@@ -3,15 +3,17 @@ import App from './App'
 import store from './store' // store
 import plugins from './plugins' // plugins
 import './permission' // permission
+import config from '@/config'
 Vue.use(plugins)
 
 Vue.config.productionTip = false
 Vue.prototype.$store = store
 
 App.mpType = 'app'
-
+// 挂载全局图片地址
+Vue.prototype.$HTTP = config.baseUrl
 const app = new Vue({
-  ...App
+	...App
 })
 
-app.$mount()
+app.$mount()

+ 3 - 3
pages/login.vue

@@ -80,10 +80,10 @@
       getCode() {
         getCodeImg().then(res => {
 			console.log(res)
-          this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled
+          this.captchaEnabled = res.data.captchaEnabled === undefined ? true : res.data.captchaEnabled
           if (this.captchaEnabled) {
-            this.codeUrl = 'data:image/gif;base64,' + res.img
-            this.loginForm.uuid = res.uuid
+            this.codeUrl = 'data:image/gif;base64,' + res.data.img
+            this.loginForm.uuid = res.data.uuid
           }
         })
       },

+ 465 - 18
pages/oldrenovation/indoor/putUpWatch.vue

@@ -1,22 +1,469 @@
-<template>
-	<view>
-		
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				
+	<template>
+		<view>
+			<view class="background">
+				<view class="uni-list">
+					<view class="container">
+						<view>
+							行政区
+						</view>
+						<view v-if="this.isEmpty(this.XZQValue.dictValue)" style="margin-top: 10;"
+							@click="pickerShow('xzq')">
+							<span style="color: darkgray;">请选择行政区</span>
+						</view>
+						<view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('xzq')">
+							<span style="color: black;">{{XZQValue.dictLabel}}</span>
+						</view>
+
+					</view>
+				</view>
+				<view class="uni-list">
+					<view class="container">
+						<view>
+							小区
+						</view>
+
+						<view v-if="this.isEmpty(this.XQValue.id)" class="uni-list-cell-db" style="margin-top: 10;"
+							@click="pickerShow('xq')">
+							<span style="color: darkgray;">请选择小区</span>
+						</view>
+						<view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('xq')">
+							<span style="color: black;">{{XQValue.name}}</span>
+						</view>
+					</view>
+				</view>
+				<view class="uni-list">
+					<view class="container">
+						<view class="uni-list-cell-left">
+							楼栋
+						</view>
+						<view v-if="this.isEmpty(this.LDValue.id)" class="uni-list-cell-db" style="margin-top: 10;"
+							@click="pickerShow('ld')">
+							<span style="color: darkgray;">请选择楼栋</span>
+						</view>
+						<view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('ld')">
+							<span style="color: black;">{{LDValue.name}}</span>
+						</view>
+					</view>
+				</view>
+				<view class="uni-list" style="margin-top: 10;">
+					<view class="container">
+						<view class="uni-list-cell-left">
+							单元
+						</view>
+						<view v-if="this.isEmpty(this.DYValue.id)" class="uni-list-cell-db" style="margin-top: 10;"
+							@click="pickerShow('dy')">
+							<span style="color: darkgray;">请选择单元</span>
+						</view>
+						<view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('dy')">
+							<span style="color: black;">{{DYValue.name}}</span>
+						</view>
+					</view>
+				</view>
+				<view class="uni-list">
+					<view class="container">
+						<view class="uni-list-cell-left">
+							房间
+						</view>
+						<view v-if="this.isEmpty(this.FJValue.id)" class="uni-list-cell-db" style="margin-top: 10;"
+							@click="pickerShow('fj')">
+							<span style="color: darkgray;">请选择房间</span>
+						</view>
+						<view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('fj')">
+							<span style="color: black;">{{FJValue.name}}</span>
+						</view>
+					</view>
+				</view>
+				<view class="container">
+
+					<view class="title">是否按照施工图纸施工</view>
+					<switch style="transform: scale(0.6,0.6);" @change="switch2Change" />
+
+				</view>
+
+				<SelectPicker :list="selectList" @change="changeSelect" v-if="open" @close="close" titleKey="name"
+					subtitleKey="id" v-model="name"></SelectPicker>
+
+
+				<SelectPicker :list="dictOptions" @change="changeSelectDict" v-if="openDict" @close="closeDict"
+					titleKey="dictLabel" subtitleKey="dictValue" v-model="dictLabel"></SelectPicker>
+			</view>
+
+
+			<view class="background">
+				<view class="uni-list">
+					<view style="font-size: 16px;margin-left: 10px;margin-top: 10px;">
+						立杠
+
+						<span
+							style="color: blue;font-size: 14px;  display: flex;justify-content:flex-end; margin-right: 15px;">历史</span>
+					</view>
+
+					<view class="container">
+
+						<view>
+							品 牌
+						</view>
+						<view class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('xzq')">
+							<span>{{attributeXZQ}}</span>
+						</view>
+					</view>
+					
+					<view class="number">
+						<text>数 量</text> <!-- 左边文字 -->
+						<input type="number" v-model="number"class="input" placeholder="请填写数量" style="margin-left: 10px;"></input>
+						<!-- 右边输入框 -->
+					</view>
+				</view>
+
+				<view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
+					<view class="container" style="color: gainsboro;">*请上传照片</view>
+					<view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
+						<image src="/static/images/chooseimg.png" mode=""
+							style="width: 190rpx; height: 190rpx; margin: 0 12rpx;; " @click="chooseimage()"></image>
+						<view v-for="(item,index) in imgArr" :key="index" style="position: relative;">
+							<view>
+								<image :src="item" mode="" style="width: 190rpx; height: 190rpx; margin: 0 12rpx;"
+									@click="showPhoto(index)">
+								</image>
+							</view>
+
+							<view @click="remove(index)"
+								style="position: absolute; top: 0; right: 14rpx; border-radius: 50%; background-color: #FF0000;">
+								<u-icon name="close" color="#FFFFFF" size="35"></u-icon>
+							</view>
+						</view>
+					</view>
+
+				</view>
+			</view>
+
+			<view class="action-btn">
+				<button @click="submit" class="btn cu-btn block bg-blue lg round">确认上传</button>
+			</view>
+		</view>
+	</template>
+
+
+
+	<script>
+		import SelectPicker from '../../../components/selectPicker/select_picker.vue'
+		import {
+			getDicts
+		} from "@/api/system/dict/data";
+		import {
+			getAreaList,
+			getBuildingList,
+			getUnitList,
+			getHousesList
+		} from '@/api/common'
+
+		export default {
+			components: {
+				SelectPicker
+			},
+			data() {
+
+				return {
+					number: '',
+					type: '',
+					open: false,
+					openDict: false,
+					selectList: [],
+					dictOptions: [],
+					imgArr: [],
+					XQValue: {},
+					XZQValue: {},
+					LDValue: {},
+					DYValue: {},
+					FJValue: {},
+					FSValue: {},
+					XQList: '',
+					LDList: '',
+					DYList: '',
+					FJList: '',
+					progress: 0, //上传图片进度百分比
+					loading: false
+
+
+				}
+			},
+
+			created() {
+				getDicts("district").then(response => {
+					this.dictOptions = response;
+				});
+
+
+			},
+			onLoad() {
+				uni.setNavigationBarTitle({
+					title: '旧改工程-室内'
+				})
+			},
+			methods: {
+				//判断是否选择
+				isEmpty(str) {
+
+					return (!str || 0 === str.length);
+
+				},
+				showPhoto(index) {
+					uni.previewImage({
+						current: index,
+						urls: this.imgArr,
+					})
+					console.log('sss')
+				},
+				remove(index) {
+					uni.showModal({
+						title: '提示',
+						content: '是否删除该图片或视频?',
+						success: (res) => {
+							if (res.confirm) {
+								this.imgArr.splice(index, 1)
+								console.log('this.imgarr', this.imgArr)
+								if (this.imgArr.length <= 0) {
+									this.photo = true;
+								}
+							}
+						}
+					})
+				},
+				chooseimage() {
+					console.log('图片')
+					let _this = this;
+					uni.chooseImage({
+						sizeType: ['album', 'camera'],
+						success(resp) {
+							console.log('res--uni.chooseMedia', resp);
+							resp.tempFiles.forEach((item, index) => {
+								const task = uni.uploadFile({
+									url: _this.$HTTP.webUrl + `/obs`,
+									filePath: item.path,
+									name: 'file',
+									formData: {},
+									header: _this.headers,
+									success: res => {
+										// 判断是否json字符串,将其转为json格式
+										let data = _this.$u.test.jsonString(res
+											.data) ? JSON.parse(res.data) : res.data;
+										if (![200, 201, 204].includes(res.statusCode)) {
+											// this.uploadError(index, data);
+											_this.$modal.msg('上传失败!')
+										} else {
+											if (_this.progress === 100) {
+												console.log('_this.progress', _this.progress)
+												console.log('data----', data)
+												console.log('res--', res)
+												_this.imgArr.push(data.data.url)
+												console.log('imgArr', _this.imgArr)
+												_this.$modal.msg('上传成功!')
+												_this.photo = false;
+											}
+										}
+									},
+									fail: e => {
+										_this.$modal.msg('上传失败!')
+										this.uploadError(index, e);
+									},
+									complete: res => {
+										uni.hideLoading();
+										_this.uploading = false;
+
+									}
+								});
+								task.onProgressUpdate(res => {
+									_this.progress = res.progress;
+									console.log('onProgressUpdate', res)
+									console.log('task.onProgressUpdate', _this.progress)
+									uni.showLoading({
+										title: '上传中'
+									})
+									if (_this.progress != 100) {
+										_this.loading = false
+										console.log('_this.loading false', _this.loading)
+									} else {
+										_this.loading = true
+										console.log('_this.loading true', _this.loading)
+									}
+								});
+
+							})
+
+						},
+					})
+				},
+				pickerShow(e) {
+
+
+					this.type = e; //赋值类型
+					if (e == 'xzq') { //行政区
+						this.openDict = true;
+						//this.selectList = this.dictOptions;
+
+					} else if (e == 'xq') { //小区
+						if (this.isEmpty(this.XZQValue.dictValue)) {
+							this.$modal.msg('请选择行政区')
+
+						} else {
+							this.open = true;
+							this.selectList = this.XQList;
+						}
+					} else if (e == 'ld') { //楼栋
+
+						if (this.isEmpty(this.XQValue.id)) {
+							this.$modal.msg('请选择小区')
+
+						} else {
+							this.open = true;
+							this.selectList = this.LDList;
+						}
+
+					} else if (e == 'dy') { //单元
+						if (this.isEmpty(this.LDValue.id)) {
+							this.$modal.msg('请选择楼栋')
+
+						} else {
+							this.open = true;
+							this.selectList = this.DYList;
+						}
+					} else if (e == 'fj') { //房间
+						if (this.isEmpty(this.DYValue.id)) {
+							this.$modal.msg('请选择单元')
+
+						} else {
+							this.open = true;
+							this.selectList = this.FJList;
+						}
+					}
+
+				},
+
+
+				switch2Change(e) {
+					console.log('switch2 发生 change 事件,携带值为', e.detail.value)
+				},
+				changeSelectDict(item, index) {
+					this.openDict = false;
+					this.XZQValue = item;
+
+					//根据行政区id获取小区数据
+					this.XQValue.name = ''; //重置楼栋数据
+					this.LDValue.name = ''; //重置楼栋数据
+					this.DYValue.name = ''; //重置单元数据
+					this.FJValue.name = ''; //重置房间数据
+					getAreaList(item.dictValue).then(res => {
+						this.XQList = res;
+					})
+
+				},
+				changeSelect(item, index) {
+					// this.index = index;
+					// this.address = item.communityName;
+					this.open = false;
+
+					if (this.type == 'xq') {
+						this.XQValue = item;
+						//根据小区id 获取楼栋数据
+						this.LDValue.name = ''; //重置楼栋数据
+						this.DYValue.name = ''; //重置单元数据
+						this.FJValue.name = ''; //重置房间数据
+						getBuildingList(item.id).then(res => {
+							this.LDList = res
+							// console.log("楼栋=", res)
+						})
+					} else if (this.type == 'ld') {
+						this.LDValue = item;
+						//根据楼栋ID 获取单元数据
+						this.DYValue.name = ''; //重置单元数据
+						this.FJValue.name = ''; //重置房间数据
+						getUnitList(item.id).then(res => {
+							this.DYList = res
+							// console.log("单元=", res)
+						})
+					} else if (this.type == 'dy') {
+						this.DYValue = item;
+						//根据单元数据 获取房间数据 
+						this.FJValue.name = ''; //重置房间数据
+						getHousesList(item.id).then(res => {
+							this.FJList = res
+							// console.log("房间=", res)
+						})
+					} else if (this.type == 'fj') {
+						this.FJValue = item;
+					}
+
+				},
+				//关闭弹窗
+				close(e) {
+					this.open = false
+				},
+				//关闭弹窗
+				closeDict(e) {
+					this.openDict = false
+				},
+				//提交数据
+				submit() {
+					if (this.isEmpty(this.XZQValue.dictValue)) {
+						this.$modal.msg("请选择行政区")
+					} else if (this.isEmpty(this.XQValue.id)) {
+						this.$modal.msg("请选择小区")
+					} else if (this.isEmpty(this.LDValue.id)) {
+						this.$modal.msg("请选择楼栋")
+					} else if (this.isEmpty(this.DYValue.id)) {
+						this.$modal.msg("请选择单元")
+					} else if (this.isEmpty(this.FJValue.id)) {
+						this.$modal.msg("请选择房间")
+					} else if (this.imgArr.length <= 0) {
+						this.$modal.msg('请上传照片')
+					} else if (this.loading == false) {
+						this.$modal.msg('照片未上传完毕,无法提交!')
+					}
+				}
+
 			}
-		},
-		methods: {
-			
 		}
-	}
-</script>
+	</script>
+
+	<style>
+		.container {
+			display: flex;
+			margin-left: 10px;
+			margin-top: 10px;
+			margin-right: 10px;
+			align-items: flex-start;
+			justify-content: space-between;
+		}
 
-<style>
+		.number {
+			display: flex;
+			/* 水平居中显示子元素 */
+			align-items: flex-start;
+			/* 垂直居中显示子元素 */
+			justify-content: space-between;
+			/* 左右间距等于间距大小 */
+			padding: 10px;
+			/* 设置padding以提高视觉效果 */
+		}
+
+		.text {
+			font-size: 16px;
+			color: #333;
+		}
+
+		.background {
+			border: 15px solid hsla(0, 0%, 100%, .5);
+			background: white;
+			background-clip: padding-box;
+			/*从padding开始往外面裁剪背景*/
 
-</style>
+		}
+
+		.btn {
+			margin-top: 40px;
+			margin-right: 20px;
+			margin-bottom: 20px;
+			margin-left: 20px;
+			height: 45px;
+		}
+	</style>

+ 586 - 105
pages/oldrenovation/indoor/tearOldPipe.vue

@@ -1,53 +1,204 @@
 	<template>
-		<view class="background">
-			<view class="uni-list">
-				<view class="container">
-					<view>
-						小区
+		<view>
+			<view class="background">
+				<view class="uni-list">
+					<view class="container">
+						<view>
+							工程周期
+						</view>
+						<view v-if="this.isEmpty(this.projectValue.dictValue)" style="margin-top: 10;"
+							@click="pickerShow('gczq')">
+							<span style="color: darkgray;">请选择工程周期</span>
+						</view>
+						<view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('gczq')">
+							<span style="color: black;">{{projectValue.dictLabel}}</span>
+						</view>
+
 					</view>
-					<view class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('xq')">
-						<span>{{attributeXQ}}</span>
+				</view>
+				<view class="uni-list">
+					<view class="container">
+						<view>
+							行政区
+						</view>
+						<view v-if="this.isEmpty(this.XZQValue.dictValue)" style="margin-top: 10;"
+							@click="pickerShow('xzq')">
+							<span style="color: darkgray;">请选择行政区</span>
+						</view>
+						<view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('xzq')">
+							<span style="color: black;">{{XZQValue.dictLabel}}</span>
+						</view>
+
 					</view>
 				</view>
-			</view>
-			<view class="uni-list">
-				<view class="container">
-					<view class="uni-list-cell-left">
-						楼栋
+				<view class="uni-list">
+					<view class="container">
+						<view>
+							小区
+						</view>
+
+						<view v-if="this.isEmpty(this.XQValue.id)" class="uni-list-cell-db" style="margin-top: 10;"
+							@click="pickerShow('xq')">
+							<span style="color: darkgray;">请选择小区</span>
+						</view>
+						<view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('xq')">
+							<span style="color: black;">{{XQValue.name}}</span>
+						</view>
 					</view>
-					<view class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('ld')">
-						<span>{{attributeLD}}</span>
+				</view>
+				<view class="uni-list">
+					<view class="container">
+						<view class="uni-list-cell-left">
+							楼栋
+						</view>
+						<view v-if="this.isEmpty(this.LDValue.id)" class="uni-list-cell-db" style="margin-top: 10;"
+							@click="pickerShow('ld')">
+							<span style="color: darkgray;">请选择楼栋</span>
+						</view>
+						<view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('ld')">
+							<span style="color: black;">{{LDValue.name}}</span>
+						</view>
 					</view>
 				</view>
-			</view>
-			<view class="uni-list" style="margin-top: 10;">
-				<view class="container">
-					<view class="uni-list-cell-left">
-						单元
+				<view class="uni-list" style="margin-top: 10;">
+					<view class="container">
+						<view class="uni-list-cell-left">
+							单元
+						</view>
+						<view v-if="this.isEmpty(this.DYValue.id)" class="uni-list-cell-db" style="margin-top: 10;"
+							@click="pickerShow('dy')">
+							<span style="color: darkgray;">请选择单元</span>
+						</view>
+						<view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('dy')">
+							<span style="color: black;">{{DYValue.name}}</span>
+						</view>
 					</view>
-					<view class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('dy')">
-						<span>{{attributeDY}}</span>
+				</view>
+				<view class="uni-list">
+					<view class="container">
+						<view class="uni-list-cell-left">
+							房间
+						</view>
+						<view v-if="this.isEmpty(this.FJValue.id)" class="uni-list-cell-db" style="margin-top: 10;"
+							@click="pickerShow('fj')">
+							<span style="color: darkgray;">请选择房间</span>
+						</view>
+						<view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('fj')">
+							<span style="color: black;">{{FJValue.name}}</span>
+						</view>
 					</view>
 				</view>
-			</view>
-			<view class="uni-list">
 				<view class="container">
-					<view class="uni-list-cell-left">
-						房间
-					</view>
-					<view class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('fj')">
-						<span>{{attributeFJ}}</span>
-					</view>
+
+					<view class="title">是否按照施工图纸施工</view>
+					<span style="color: black;">{{this.form}}</span>
+					<switch style="transform: scale(0.6,0.6);" @change="switchChange" checked="isChick" />
+
 				</view>
+
+				<SelectPicker :list="selectList" @change="changeSelect" v-if="open" @close="close" titleKey="name"
+					subtitleKey="id" v-model="name"></SelectPicker>
+
+
+				<SelectPicker :list="dictOptions" @change="changeSelectDict" v-if="openDict" @close="closeDict"
+					titleKey="dictLabel" subtitleKey="dictValue" v-model="dictLabel"></SelectPicker>
 			</view>
-			<view class="container">
 
-				<view class="title">是否按照施工图纸施工</view>
-				<switch checked @change="switch2Change" />
+			<view class="background">
+				<view v-if="objValue.enginClassValue=='dismantling_old_pipe'">
+					<view class="uni-list">
+						<view style="font-size: 16px;margin-left: 10px;margin-top: 10px;">
+							拆旧管
+
+							<span
+								style="color: blue;font-size: 14px;  display: flex;justify-content:flex-end; margin-right: 15px;">历史</span>
+						</view>
+
+						<view class="container" style="margin-bottom: 20PX;">
+
+							<view>
+								腐蚀等级
+							</view>
+							<view v-if="this.isEmpty(this.LevelValue.dictValue)" style="margin-top: 10;"
+								@click="pickerShow('fsdj')">
+								<span style="color: darkgray;">请选择腐蚀等级</span>
+							</view>
+							<view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('fsdj')">
+								<span style="color: black;">{{LevelValue.dictLabel}}</span>
+							</view>
+						</view>
+					</view>
+				</view>
+				<view v-if="objValue.enginClassValue=='vertical_bar'">
+					<view class="uni-list" style="margin-bottom: 20px;">
+						<view style="font-size: 16px;margin-left: 10px;margin-top: 10px;">
+							立杠
 
+							<span
+								style="color: blue;font-size: 14px;  display: flex;justify-content:flex-end; margin-right: 15px;">历史</span>
+						</view>
+
+						<view class="container">
+
+							<view>
+								材 质
+							</view>
+							<view v-if="this.isEmpty(this.materialValue.id)" style="margin-top: 10;"
+								@click="pickerShow('cz')">
+								<span style="color: darkgray;">请选择材质</span>
+							</view>
+							<view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('cz')">
+								<span style="color: black;">{{materialValue.name}}</span>
+							</view>
+						</view>
+						<view class="container">
+
+							<view>
+								规 格
+							</view>
+							<view v-if="this.isEmpty(this.specificationValue.id)" style="margin-top: 10;"
+								@click="pickerShow('gg')">
+								<span style="color: darkgray;">请选择规格</span>
+							</view>
+							<view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('gg')">
+								<span style="color: black;">{{specificationValue.name}}</span>
+							</view>
+						</view>
+						<view class="container">
+
+							<text>数 量</text>
+							<input class="uni-input" type="number" v-model="number" placeholder="请填写数量"
+								style="margin-left: 10px;text-align: right;"></input>
+						</view>
+					</view>
+				</view>
+				<view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
+					<view class="container" style="color: gainsboro;">*请上传照片</view>
+					<view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
+						<image src="/static/images/chooseimg.png" mode=""
+							style="width: 100rpx; height: 100rpx; margin: 0 12rpx;; " @click="choose()"></image>
+						<view v-for="(item,index) in imgArr" :key="index" style="position: relative;">
+							<view
+								v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' ">
+								<image :src="item" mode="" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
+									@click="showPhoto(index)">
+								</image>
+							</view>
+							<view v-else>
+								<video :src="item" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
+							</view>
+							<view @click="remove(index)"
+								style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
+								<uni-icons type="close" color="darkgray" size="18"></uni-icons>
+							</view>
+						</view>
+					</view>
+
+				</view>
+			</view>
+			<view class="action-btn">
+				<button @click="submit" class="btn cu-btn block bg-blue lg round">确认上传</button>
 			</view>
-			<SelectPicker :list="selectList" @change="changeSelect" v-if="open" @close="close" titleKey="name"
-				subtitleKey="id" v-model="name"></SelectPicker>
 		</view>
 	</template>
 
@@ -55,116 +206,334 @@
 
 	<script>
 		import SelectPicker from '../../../components/selectPicker/select_picker.vue'
+
+		import uniIcons from '../../../uni_modules/uni-icons/components/uni-icons/uni-icons.vue'
+		import {
+			getDicts
+		} from "@/api/system/dict/data";
 		import {
 			getAreaList,
 			getBuildingList,
 			getUnitList,
-			getHousesList
+			getHousesList,
+			addTearOldPipe,
+			getEnginMaterialQualityList,
+			getEnginSpecificationsList,
 		} from '@/api/common'
+		import {
+			getToken
+		} from '../../../utils/auth';
 
 		export default {
 			components: {
-				SelectPicker
+				SelectPicker,
+				uniIcons
 			},
 			data() {
 
 				return {
-
+					headers: {
+						Authorization: "Bearer " + getToken()
+					},
 					type: '',
 					open: false,
+					objValue: '', //上一页面传过来的值  新增接口用
+					openDict: false,
 					selectList: [],
-
+					dictOptions: [],
+					imgArr: [],
 					XQValue: {},
+					XZQValue: {},
+					projectValue: {},
+					LevelValue: {},
 					LDValue: {},
 					DYValue: {},
 					FJValue: {},
+					FSValue: {},
+					specificationValue: {}, //规格
+					materialValue: {}, //材质
+					materialList: '', //材质list
 					XQList: '',
-					index: 0,
-					address: null,
-					title: 'picker',
-					transformerValue: '请选择楼栋',
-
 					LDList: '',
 					DYList: '',
 					FJList: '',
-
+					progress: 0, //上传图片进度百分比
+					loading: false,
+					isCheck: true, //是否按照施工图纸施工
+					number: '',
+					title: '',
 
 				}
 			},
+
 			created() {
-				getAreaList().then(res => {
-					this.XQList = res;
-				})
 
 			},
-			onLoad() {
-				uni.setNavigationBarTitle({
-					title: '旧改工程-室内'
-				})
-			},
-			computed: {
-				attributeXQ() {
-					return this.XQValue.name ? this.XQValue.name : "请选择小区"
 
-				},
-				attributeLD() {
-					return this.LDValue.name ? this.LDValue.name : "请选择楼栋"
-				},
-				attributeDY() {
-					return this.DYValue.name ? this.DYValue.name : "请选择单元"
-				},
-				attributeFJ() {
-					return this.FJValue.name ? this.FJValue.name : "请选择房间"
+			onLoad(options) {
+				if ('params' in options) {
+					this.objValue = JSON.parse(decodeURIComponent(options.params));
+
+					if (this.objValue.enginType == `old_renovation` && this.objValue.enginClassification == 'indoor_engin') {
+						this.title = '旧改工程-室内'
+
+					} else {
+						this.title = '新建工程-室内'
+
+					}
+					uni.setNavigationBarTitle({
+						title: this.title
+					})
 				}
+
+
 			},
 			methods: {
 				//判断是否选择
+
 				isEmpty(str) {
 
 					return (!str || 0 === str.length);
 
 				},
-				pickerShow(e) {
+				showPhoto(index) {
+					uni.previewImage({
+						current: index,
+						urls: this.imgArr,
+					})
+
+				},
+				remove(index) {
+					uni.showModal({
+						title: '提示',
+						content: '是否删除该图片或视频?',
+						success: (res) => {
+							if (res.confirm) {
+								this.imgArr.splice(index, 1)
+								console.log('this.imgarr', this.imgArr)
+								if (this.imgArr.length <= 0) {
+									this.photo = true;
+								}
+							}
+						}
+					})
+				},
+				choose() {
+					let _this = this;
+					uni.showActionSheet({
+						title: '上传',
+						itemList: ['图片', '视频'],
+						success: (res) => {
+							console.log(res)
+							if (res.tapIndex == 0) {
+								this.chooseimage()
+							} else {
+								this.choosevideo()
+							}
+						}
+					})
+				},
+				chooseimage() {
+
+					let _this = this;
+					console.log('图片', _this.headers)
+					uni.chooseImage({
+						sizeType: ['album', 'camera'],
+						success(resp) {
+							resp.tempFiles.forEach((item, index) => {
+								const task = uni.uploadFile({
+									url: _this.$HTTP + `/obs`,
+									filePath: item.path,
+									name: 'file',
+									formData: {},
+									header: _this.headers,
 
+									success: res => {
+										// 判断是否json字符串,将其转为json格式
+										console.log("结果", res)
+										// let data = _this.$u.test.jsonString(res
+										// 	.data) ? JSON.parse(res.data) : res.data;
+										let data = JSON.parse(res.data);
+										if (![200].includes(data.code)) {
+											// this.uploadError(index, data);
+											_this.$modal.msg(data.msg)
+										} else {
+											if (_this.progress === 100) {
+												console.log('_this.progress', _this.progress)
+												//console.log('data----', data)data
+												console.log('res--', res)
+												_this.imgArr.push(data.data.url)
+												console.log('imgArr', _this.imgArr)
+												_this.$modal.msg('上传成功!')
+												_this.photo = false;
+											}
+										}
+									},
+									fail: e => {
+										console.log(e)
+										_this.$modal.msg('上传失败!')
+										//_this.uploadError(index, e);
+									},
+									complete: res => {
+										uni.hideLoading();
+										_this.uploading = false;
 
+									}
+								});
+								task.onProgressUpdate(res => {
+									_this.progress = res.progress;
+									console.log('onProgressUpdate', res)
+									console.log('task.onProgressUpdate', _this.progress)
+									uni.showLoading({
+										title: '上传中'
+									})
+									if (_this.progress != 100) {
+										_this.loading = false
+										console.log('_this.loading false', _this.loading)
+									} else {
+										_this.loading = true
+										console.log('_this.loading true', _this.loading)
+									}
+								});
+
+							})
+
+						},
+					})
+				},
+
+				choosevideo() {
+					let _this = this;
+					console.log('视频')
+					uni.chooseVideo({
+						sourceType: ['album', 'camera'],
+						maxDuration: 30,
+						success(resp) {
+							const task = uni.uploadFile({
+								url: _this.$HTTP + `/obs`,
+								filePath: resp.tempFilePath,
+								name: 'file',
+								formData: {},
+								header: _this.headers,
+								success: res => {
+									// 判断是否json字符串,将其转为json格式
+									let data = JSON.parse(res.data);
+									if (![200].includes(res.statusCode)) {
+										this.uploadError(index, data);
+									} else {
+										//上传成功
+										if (_this.progress === 100) {
+											console.log('_this.progress', _this.progress)
+											_this.imgArr.push(data.data.url)
+											console.log('imgArr', _this.imgArr)
+											_this.$UTILS.showPrompt('上传成功!')
+											_this.photo = false;
+										}
+									}
+								},
+								fail: e => {
+									_this.$UTILS.showPrompt('上传失败!')
+									this.uploadError(index, e);
+								},
+								complete: res => {
+									uni.hideLoading();
+									_this.uploading = false;
+								}
+							});
+							task.onProgressUpdate(res => {
+								_this.progress = res.progress;
+								console.log('onProgressUpdate', res)
+								uni.showLoading({
+									title: '上传中'
+								})
+								if (_this.progress != 100) {
+									_this.loading = false
+									console.log('_this.loading false', _this.loading)
+								} else {
+									_this.loading = true
+									console.log('_this.loading true', _this.loading)
+								}
+							});
+
+						},
+					})
+				},
+				pickerShow(e) {
 					this.type = e; //赋值类型
-					if (e == 'xq') {
+
+					if (e == 'cz') { //材质
 						this.open = true;
-						this.selectList = this.XQList;
-					} else if (e == 'ld') {
+						getEnginMaterialQualityList("0").then(response => {
+							console.log(response.data)
+							this.selectList = response.data;
+						});
 
-						if (this.isEmpty(this.XQValue.id)) {
-							uni.showToast({
-								title: '请选择小区',
-								icon: 'error',
-								duration: 1000
+					} else if (e == 'gg') { //规格
+						if (this.isEmpty(this.materialValue.id)) {
+							this.$modal.msg('请选择材质')
+
+						} else {
+							this.open = true;
+							this.selectList = this.materialList;
+
+						}
+
+					} else if (e == 'fsdj') {
+						//腐蚀等级
+						this.openDict = true;
+						//腐蚀等级
+						getDicts("corrosion_level").then(response => {
+							console.log(response)
+							this.dictOptions = response.data;
+						});
+
+					} else if (e == 'gczq') { //工程周期
+						this.openDict = true;
+						getDicts("engin_cycle").then(response => {
+							this.dictOptions = response.data;
+						});
+					} else if (e == 'xzq') { //行政区
+						if (this.isEmpty(this.projectValue.dictValue)) {
+							this.$modal.msg('请选择工程周期')
+
+						} else {
+							this.openDict = true;
+							getDicts("district").then(response => {
+								this.dictOptions = response.data;
 							});
+						}
+						//this.selectList = this.dictOptions;
+
+					} else if (e == 'xq') { //小区
+						if (this.isEmpty(this.XZQValue.dictValue)) {
+							this.$modal.msg('请选择行政区')
+
+						} else {
+							this.open = true;
+							this.selectList = this.XQList;
+						}
+					} else if (e == 'ld') { //楼栋
+
+						if (this.isEmpty(this.XQValue.id)) {
+							this.$modal.msg('请选择小区')
 
 						} else {
 							this.open = true;
 							this.selectList = this.LDList;
 						}
 
-					} else if (e == 'dy') {
+					} else if (e == 'dy') { //单元
 						if (this.isEmpty(this.LDValue.id)) {
-							uni.showToast({
-								title: '请选择楼栋',
-								icon: 'error',
-								duration: 1000
+							this.$modal.msg('请选择楼栋')
 
-							});
 						} else {
 							this.open = true;
 							this.selectList = this.DYList;
 						}
-					} else if (e == 'fj') {
+					} else if (e == 'fj') { //房间
 						if (this.isEmpty(this.DYValue.id)) {
-							uni.showToast({
-								title: '请选择单元',
-								icon: 'error',
-								duration: 1000
+							this.$modal.msg('请选择单元')
 
-							});
 						} else {
 							this.open = true;
 							this.selectList = this.FJList;
@@ -172,45 +541,74 @@
 					}
 
 				},
-				bindPickerChange(e) {
-					console.log('picker发送选择改变,携带值为', e.detail.value)
-					this.index = e.detail.value
-				},
-				bindDateChange(e) {
-					this.date = e.detail.value
-				},
-				switch2Change(e) {
+
+
+				switchChange(e) {
 					console.log('switch2 发生 change 事件,携带值为', e.detail.value)
+					this.isCheck = e.detail.value;
+				},
+				changeSelectDict(item, index) {
+					this.openDict = false;
+					if (this.type == 'gczq') {
+						this.projectValue = item
+
+					} else if (this.type == 'xzq') {
+						this.XZQValue = item;
+
+						//根据行政区id获取小区数据
+						this.XQValue = ''; //重置小区数据
+						this.LDValue = ''; //重置楼栋数据
+						this.DYValue = ''; //重置单元数据
+						this.FJValue = ''; //重置房间数据
+						getAreaList(item.dictValue).then(res => {
+							this.XQList = res.data;
+						})
+					} else {
+						this.LevelValue = item;
+					}
 				},
 				changeSelect(item, index) {
-					this.index = index;
-					this.address = item.communityName;
+					// this.index = index;
+					// this.address = item.communityName;
 					this.open = false;
-					if (this.type == 'xq') {
+
+					if (this.type == 'cz') {
+						this.materialValue = item;
+						this.specificationValue = ''; //重置规格
+						//根据材质ID 获取规格数据
+						console.log('材质id', item.id)
+						getEnginSpecificationsList(item.id).then(res => {
+							console.log("规格数据", res.data)
+							this.materialList = res.data
+						})
+					} else if (this.type == 'gg') {
+						this.specificationValue = item;
+
+					} else if (this.type == 'xq') {
 						this.XQValue = item;
 						//根据小区id 获取楼栋数据
-						this.LDValue.name = ''; //重置楼栋数据
-						this.DYValue.name = ''; //重置单元数据
-						this.FJValue.name = ''; //重置房间数据
+						this.LDValue = ''; //重置楼栋数据
+						this.DYValue = ''; //重置单元数据
+						this.FJValue = ''; //重置房间数据
 						getBuildingList(item.id).then(res => {
-							this.LDList = res
+							this.LDList = res.data
 							// console.log("楼栋=", res)
 						})
 					} else if (this.type == 'ld') {
 						this.LDValue = item;
 						//根据楼栋ID 获取单元数据
-						this.DYValue.name = ''; //重置单元数据
-						this.FJValue.name = ''; //重置房间数据
+						this.DYValue = ''; //重置单元数据
+						this.FJValue = ''; //重置房间数据
 						getUnitList(item.id).then(res => {
-							this.DYList = res
+							this.DYList = res.data
 							// console.log("单元=", res)
 						})
 					} else if (this.type == 'dy') {
 						this.DYValue = item;
 						//根据单元数据 获取房间数据 
-						this.FJValue.name = ''; //重置房间数据
+						this.FJValue = ''; //重置房间数据
 						getHousesList(item.id).then(res => {
-							this.FJList = res
+							this.FJList = res.data
 							// console.log("房间=", res)
 						})
 					} else if (this.type == 'fj') {
@@ -221,7 +619,72 @@
 				//关闭弹窗
 				close(e) {
 					this.open = false
+				},
+				//关闭弹窗
+				closeDict(e) {
+					this.openDict = false
+				},
+				//提交数据
+				submit() {
+
+					if (this.isEmpty(this.projectValue.dictValue)) {
+						this.$modal.msg("请选择工程周期")
+					} else if (this.isEmpty(this.XZQValue.dictValue)) {
+						this.$modal.msg("请选择行政区")
+					} else if (this.isEmpty(this.XQValue.id)) {
+						this.$modal.msg("请选择小区")
+					} else if (this.isEmpty(this.LDValue.id)) {
+						this.$modal.msg("请选择楼栋")
+					} else if (this.isEmpty(this.DYValue.id)) {
+						this.$modal.msg("请选择单元")
+					} else if (this.isEmpty(this.FJValue.id)) {
+						this.$modal.msg("请选择房间")
+					} else if (this.isEmpty(this.LevelValue.dictValue)) {
+						this.$modal.msg("请选择腐蚀等级")
+					} else if (this.imgArr.length <= 0) {
+						this.$modal.msg('请上传照片')
+					} else if (this.loading == false) {
+						this.$modal.msg('照片未上传完毕,无法提交!')
+					} else {
+						//提交
+						let param = {
+							district: this.XZQValue.dictValue,
+							areaId: this.XQValue.id,
+							buildingId: this.LDValue.id,
+							unitId: this.DYValue.id,
+							houseId: this.FJValue.id,
+							enginType: this.objValue.enginType, //写死 上一页面传过来的 
+							enginClassification: this.objValue.enginClassification, //写死  上一页面传过来的  //室内 - 庭院 - 架空
+							enginCycle: this.projectValue.dictValue, //工程周期
+							zEngineeringNodeBo: {
+								type: this.objValue.enginClassValue, //写死 上一页面传过来的  (拆旧管等 字典值)
+								zEngineeringInfoBo: {
+									constructAccordingDrawings: this.isCheck, //是否按图纸施工
+									zEngiineeringPhotoBoList: this.imgArr, //照片集合
+									zEngineeringMaterialBo: [{
+										corrosionLevel: this.LevelValue.dictValue
+									}]
+								}
+							}
+
+						}
+
+
+						addTearOldPipe(param).then(res => {
+							if (res.code == '200') {
+								uni.navigateBack();
+								uni.showToast({
+									title: res.msg,
+									icon: 'none',
+									//显示持续时间为 1秒
+									duration: 1000
+								});
+
+							}
+						})
+					}
 				}
+
 			}
 		}
 	</script>
@@ -247,6 +710,24 @@
 			background-clip: padding-box;
 			/*从padding开始往外面裁剪背景*/
 
+		}
+
+		.btn {
+			margin-top: 40px;
+			margin-right: 20px;
+			margin-bottom: 120px;
+			margin-left: 20px;
+			height: 45px;
+		}
 
+		.number {
+			display: flex;
+			/* 水平居中显示子元素 */
+			align-items: flex-start;
+			/* 垂直居中显示子元素 */
+			justify-content: space-between;
+			/* 左右间距等于间距大小 */
+			padding: 10px;
+			/* 设置padding以提高视觉效果 */
 		}
 	</style>

+ 473 - 18
pages/oldrenovation/indoor/verticalBar.vue

@@ -1,22 +1,477 @@
-<template>
-	<view>
-		
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				
+	<template>
+		<view>
+			<view class="background">
+				<view class="uni-list">
+					<view class="container">
+						<view>
+							行政区
+						</view>
+						<view v-if="this.isEmpty(this.XZQValue.dictValue)" style="margin-top: 10;"
+							@click="pickerShow('xzq')">
+							<span style="color: darkgray;">请选择行政区</span>
+						</view>
+						<view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('xzq')">
+							<span style="color: black;">{{XZQValue.dictLabel}}</span>
+						</view>
+
+					</view>
+				</view>
+				<view class="uni-list">
+					<view class="container">
+						<view>
+							小区
+						</view>
+
+						<view v-if="this.isEmpty(this.XQValue.id)" class="uni-list-cell-db" style="margin-top: 10;"
+							@click="pickerShow('xq')">
+							<span style="color: darkgray;">请选择小区</span>
+						</view>
+						<view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('xq')">
+							<span style="color: black;">{{XQValue.name}}</span>
+						</view>
+					</view>
+				</view>
+				<view class="uni-list">
+					<view class="container">
+						<view class="uni-list-cell-left">
+							楼栋
+						</view>
+						<view v-if="this.isEmpty(this.LDValue.id)" class="uni-list-cell-db" style="margin-top: 10;"
+							@click="pickerShow('ld')">
+							<span style="color: darkgray;">请选择楼栋</span>
+						</view>
+						<view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('ld')">
+							<span style="color: black;">{{LDValue.name}}</span>
+						</view>
+					</view>
+				</view>
+				<view class="uni-list" style="margin-top: 10;">
+					<view class="container">
+						<view class="uni-list-cell-left">
+							单元
+						</view>
+						<view v-if="this.isEmpty(this.DYValue.id)" class="uni-list-cell-db" style="margin-top: 10;"
+							@click="pickerShow('dy')">
+							<span style="color: darkgray;">请选择单元</span>
+						</view>
+						<view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('dy')">
+							<span style="color: black;">{{DYValue.name}}</span>
+						</view>
+					</view>
+				</view>
+				<view class="uni-list">
+					<view class="container">
+						<view class="uni-list-cell-left">
+							房间
+						</view>
+						<view v-if="this.isEmpty(this.FJValue.id)" class="uni-list-cell-db" style="margin-top: 10;"
+							@click="pickerShow('fj')">
+							<span style="color: darkgray;">请选择房间</span>
+						</view>
+						<view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('fj')">
+							<span style="color: black;">{{FJValue.name}}</span>
+						</view>
+					</view>
+				</view>
+				<view class="container">
+
+					<view class="title">是否按照施工图纸施工</view>
+					<switch style="transform: scale(0.6,0.6);" @change="switch2Change" />
+
+				</view>
+
+				<SelectPicker :list="selectList" @change="changeSelect" v-if="open" @close="close" titleKey="name"
+					subtitleKey="id" v-model="name"></SelectPicker>
+
+
+				<SelectPicker :list="dictOptions" @change="changeSelectDict" v-if="openDict" @close="closeDict"
+					titleKey="dictLabel" subtitleKey="dictValue" v-model="dictLabel"></SelectPicker>
+			</view>
+
+
+			<view class="background">
+				<view class="uni-list">
+					<view style="font-size: 16px;margin-left: 10px;margin-top: 10px;">
+						立杠
+
+						<span
+							style="color: blue;font-size: 14px;  display: flex;justify-content:flex-end; margin-right: 15px;">历史</span>
+					</view>
+
+					<view class="container">
+
+						<view>
+							材 质
+						</view>
+						<view class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('xzq')">
+							<span>{{attributeXZQ}}</span>
+						</view>
+					</view>
+					<view class="container">
+
+						<view>
+							规 格
+						</view>
+						<view class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('xzq')">
+							<span>{{attributeXZQ}}</span>
+						</view>
+					</view>
+					<view class="number">
+						<text>数 量</text> <!-- 左边文字 -->
+						<input type="number" v-model="number"class="input" placeholder="请填写数量" style="margin-left: 10px;"></input>
+						<!-- 右边输入框 -->
+					</view>
+				</view>
+
+				<view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
+					<view class="container" style="color: gainsboro;">*请上传照片</view>
+					<view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
+						<image src="/static/images/chooseimg.png" mode=""
+							style="width: 190rpx; height: 190rpx; margin: 0 12rpx;; " @click="chooseimage()"></image>
+						<view v-for="(item,index) in imgArr" :key="index" style="position: relative;">
+							<view>
+								<image :src="item" mode="" style="width: 190rpx; height: 190rpx; margin: 0 12rpx;"
+									@click="showPhoto(index)">
+								</image>
+							</view>
+
+							<view @click="remove(index)"
+								style="position: absolute; top: 0; right: 14rpx; border-radius: 50%; background-color: #FF0000;">
+								<u-icon name="close" color="#FFFFFF" size="35"></u-icon>
+							</view>
+						</view>
+					</view>
+
+				</view>
+			</view>
+
+			<view class="action-btn">
+				<button @click="submit" class="btn cu-btn block bg-blue lg round">确认上传</button>
+			</view>
+		</view>
+	</template>
+
+
+
+	<script>
+		import SelectPicker from '../../../components/selectPicker/select_picker.vue'
+		import {
+			getDicts
+		} from "@/api/system/dict/data";
+		import {
+			getAreaList,
+			getBuildingList,
+			getUnitList,
+			getHousesList
+		} from '@/api/common'
+
+		export default {
+			components: {
+				SelectPicker
+			},
+			data() {
+
+				return {
+					number: '',
+					type: '',
+					open: false,
+					openDict: false,
+					selectList: [],
+					dictOptions: [],
+					imgArr: [],
+					XQValue: {},
+					XZQValue: {},
+					LDValue: {},
+					DYValue: {},
+					FJValue: {},
+					FSValue: {},
+					XQList: '',
+					LDList: '',
+					DYList: '',
+					FJList: '',
+					progress: 0, //上传图片进度百分比
+					loading: false
+
+
+				}
+			},
+
+			created() {
+				getDicts("district").then(response => {
+					this.dictOptions = response;
+				});
+
+
+			},
+			onLoad() {
+				uni.setNavigationBarTitle({
+					title: '旧改工程-室内'
+				})
+			},
+			methods: {
+				//判断是否选择
+				isEmpty(str) {
+
+					return (!str || 0 === str.length);
+
+				},
+				showPhoto(index) {
+					uni.previewImage({
+						current: index,
+						urls: this.imgArr,
+					})
+					console.log('sss')
+				},
+				remove(index) {
+					uni.showModal({
+						title: '提示',
+						content: '是否删除该图片或视频?',
+						success: (res) => {
+							if (res.confirm) {
+								this.imgArr.splice(index, 1)
+								console.log('this.imgarr', this.imgArr)
+								if (this.imgArr.length <= 0) {
+									this.photo = true;
+								}
+							}
+						}
+					})
+				},
+				chooseimage() {
+					console.log('图片')
+					let _this = this;
+					uni.chooseImage({
+						sizeType: ['album', 'camera'],
+						success(resp) {
+							console.log('res--uni.chooseMedia', resp);
+							resp.tempFiles.forEach((item, index) => {
+								const task = uni.uploadFile({
+									url: _this.$HTTP.webUrl + `/obs`,
+									filePath: item.path,
+									name: 'file',
+									formData: {},
+									header: _this.headers,
+									success: res => {
+										// 判断是否json字符串,将其转为json格式
+										let data = _this.$u.test.jsonString(res
+											.data) ? JSON.parse(res.data) : res.data;
+										if (![200, 201, 204].includes(res.statusCode)) {
+											// this.uploadError(index, data);
+											_this.$modal.msg('上传失败!')
+										} else {
+											if (_this.progress === 100) {
+												console.log('_this.progress', _this.progress)
+												console.log('data----', data)
+												console.log('res--', res)
+												_this.imgArr.push(data.data.url)
+												console.log('imgArr', _this.imgArr)
+												_this.$modal.msg('上传成功!')
+												_this.photo = false;
+											}
+										}
+									},
+									fail: e => {
+										_this.$modal.msg('上传失败!')
+										this.uploadError(index, e);
+									},
+									complete: res => {
+										uni.hideLoading();
+										_this.uploading = false;
+
+									}
+								});
+								task.onProgressUpdate(res => {
+									_this.progress = res.progress;
+									console.log('onProgressUpdate', res)
+									console.log('task.onProgressUpdate', _this.progress)
+									uni.showLoading({
+										title: '上传中'
+									})
+									if (_this.progress != 100) {
+										_this.loading = false
+										console.log('_this.loading false', _this.loading)
+									} else {
+										_this.loading = true
+										console.log('_this.loading true', _this.loading)
+									}
+								});
+
+							})
+
+						},
+					})
+				},
+				pickerShow(e) {
+
+
+					this.type = e; //赋值类型
+					if (e == 'xzq') { //行政区
+						this.openDict = true;
+						//this.selectList = this.dictOptions;
+
+					} else if (e == 'xq') { //小区
+						if (this.isEmpty(this.XZQValue.dictValue)) {
+							this.$modal.msg('请选择行政区')
+
+						} else {
+							this.open = true;
+							this.selectList = this.XQList;
+						}
+					} else if (e == 'ld') { //楼栋
+
+						if (this.isEmpty(this.XQValue.id)) {
+							this.$modal.msg('请选择小区')
+
+						} else {
+							this.open = true;
+							this.selectList = this.LDList;
+						}
+
+					} else if (e == 'dy') { //单元
+						if (this.isEmpty(this.LDValue.id)) {
+							this.$modal.msg('请选择楼栋')
+
+						} else {
+							this.open = true;
+							this.selectList = this.DYList;
+						}
+					} else if (e == 'fj') { //房间
+						if (this.isEmpty(this.DYValue.id)) {
+							this.$modal.msg('请选择单元')
+
+						} else {
+							this.open = true;
+							this.selectList = this.FJList;
+						}
+					}
+
+				},
+
+
+				switch2Change(e) {
+					console.log('switch2 发生 change 事件,携带值为', e.detail.value)
+				},
+				changeSelectDict(item, index) {
+					this.openDict = false;
+					this.XZQValue = item;
+
+					//根据行政区id获取小区数据
+					this.XQValue.name = ''; //重置楼栋数据
+					this.LDValue.name = ''; //重置楼栋数据
+					this.DYValue.name = ''; //重置单元数据
+					this.FJValue.name = ''; //重置房间数据
+					getAreaList(item.dictValue).then(res => {
+						this.XQList = res;
+					})
+
+				},
+				changeSelect(item, index) {
+					// this.index = index;
+					// this.address = item.communityName;
+					this.open = false;
+
+					if (this.type == 'xq') {
+						this.XQValue = item;
+						//根据小区id 获取楼栋数据
+						this.LDValue.name = ''; //重置楼栋数据
+						this.DYValue.name = ''; //重置单元数据
+						this.FJValue.name = ''; //重置房间数据
+						getBuildingList(item.id).then(res => {
+							this.LDList = res
+							// console.log("楼栋=", res)
+						})
+					} else if (this.type == 'ld') {
+						this.LDValue = item;
+						//根据楼栋ID 获取单元数据
+						this.DYValue.name = ''; //重置单元数据
+						this.FJValue.name = ''; //重置房间数据
+						getUnitList(item.id).then(res => {
+							this.DYList = res
+							// console.log("单元=", res)
+						})
+					} else if (this.type == 'dy') {
+						this.DYValue = item;
+						//根据单元数据 获取房间数据 
+						this.FJValue.name = ''; //重置房间数据
+						getHousesList(item.id).then(res => {
+							this.FJList = res
+							// console.log("房间=", res)
+						})
+					} else if (this.type == 'fj') {
+						this.FJValue = item;
+					}
+
+				},
+				//关闭弹窗
+				close(e) {
+					this.open = false
+				},
+				//关闭弹窗
+				closeDict(e) {
+					this.openDict = false
+				},
+				//提交数据
+				submit() {
+					if (this.isEmpty(this.XZQValue.dictValue)) {
+						this.$modal.msg("请选择行政区")
+					} else if (this.isEmpty(this.XQValue.id)) {
+						this.$modal.msg("请选择小区")
+					} else if (this.isEmpty(this.LDValue.id)) {
+						this.$modal.msg("请选择楼栋")
+					} else if (this.isEmpty(this.DYValue.id)) {
+						this.$modal.msg("请选择单元")
+					} else if (this.isEmpty(this.FJValue.id)) {
+						this.$modal.msg("请选择房间")
+					} else if (this.imgArr.length <= 0) {
+						this.$modal.msg('请上传照片')
+					} else if (this.loading == false) {
+						this.$modal.msg('照片未上传完毕,无法提交!')
+					}
+				}
+
 			}
-		},
-		methods: {
-			
 		}
-	}
-</script>
+	</script>
+
+	<style>
+		.container {
+			display: flex;
+			margin-left: 10px;
+			margin-top: 10px;
+			margin-right: 10px;
+			align-items: flex-start;
+			justify-content: space-between;
+		}
 
-<style>
+		.number {
+			display: flex;
+			/* 水平居中显示子元素 */
+			align-items: flex-start;
+			/* 垂直居中显示子元素 */
+			justify-content: space-between;
+			/* 左右间距等于间距大小 */
+			padding: 10px;
+			/* 设置padding以提高视觉效果 */
+		}
+
+		.text {
+			font-size: 16px;
+			color: #333;
+		}
+
+		.background {
+			border: 15px solid hsla(0, 0%, 100%, .5);
+			background: white;
+			background-clip: padding-box;
+			/*从padding开始往外面裁剪背景*/
 
-</style>
+		}
+
+		.btn {
+			margin-top: 40px;
+			margin-right: 20px;
+			margin-bottom: 20px;
+			margin-left: 20px;
+			height: 45px;
+		}
+	</style>

+ 245 - 73
pages/work/index.vue

@@ -62,19 +62,20 @@
 					<view class="line1">
 						<view>旧改工程</view>
 					</view>
-					<view class="line2">
-						<view @click="Indoor(0)">室内</view>
-						<view @click="Courtyard(0)">庭院</view>
-						<view @click="Overhead(0)">架空</view>
+					<view class="line2" v-for="(item, index) in OldProjectList" :key="index">
+						<view @click="OldProject(item.dictValue)">{{item.dictLabel}}</view>
+						<!-- <view @click="Courtyard(0)">庭院</view>
+						<view @click="Overhead(0)">架空</view> -->
 
 					</view>
 					<view class="line1">
 						<view>新建工程</view>
 					</view>
-					<view class="line2">
-						<view @click="Indoor(1)">室内</view>
-						<view @click="Courtyard(1)">庭院</view>
-						<view @click="Overhead(1)">架空</view>
+					<view class="line2" v-for="(item, index) in NewProjectList" :key="index">
+						<view @click="NewProject(item.dictValue)">{{item.dictLabel}}</view>
+						<!-- <view @click="Courtyard(0)">庭院</view>
+						<view @click="Overhead(0)">架空</view> -->
+
 					</view>
 				</view>
 
@@ -86,16 +87,47 @@
 			</view>
 			<view v-if="showPopup" class="mask" @click="showMinYong"></view>
 		</view>
+
+
+		<view class="share">
+			<view :class="{'share-box': shareState}" @click="handleHiddenShare">
+			</view>
+			<view class="share-item" :class="{'share-show': shareState}">
+				<view class="share-to">
+					<text>请选择</text>
+				</view>
+				<view class="content">
+					<view class="block" v-for="(item, index) in typeList" :key="index" @click="showTypeSheet(item)">
+						<!-- <image :src="item.image" mode="aspectFill"></image> -->
+						<text>{{item.dictLabel}}</text>
+					</view>
+				</view>
+				<view class="cancel" @click.stop="handleHiddenShare">
+					<text>取消</text>
+				</view>
+			</view>
+		</view>
 	</view>
 	</view>
 </template>
 
 <script>
+	import {
+		getDicts
+	} from "@/api/system/dict/data";
 	export default {
+
 		data() {
 			return {
 				showPopup: false,
-
+				shareState: false,
+				array: [],
+				OldProjectList: '', //旧改工程
+				NewProjectList: '', //民用工程
+				typeList: '', //二次弹窗数据
+				enginType: '',
+				enginClassification: '', // 旧改节点 数据字典
+				enginClassValue: '', //二次节点  数据字典
 				current: 0,
 				swiperDotIndex: 0,
 				data: [{
@@ -111,6 +143,14 @@
 			}
 		},
 		methods: {
+			// 显示二次弹窗
+			handleShowSheet() {
+				this.shareState = true;
+			},
+			// 隐藏二次弹窗
+			handleHiddenShare() {
+				this.shareState = false;
+			},
 			clickBannerItem(item) {
 				console.info(item)
 			},
@@ -121,78 +161,112 @@
 				this.$modal.showToast('模块建设中~')
 			},
 			showMinYong() {
+				getDicts("old_renovation").then(response => {
+					console.log("旧改", response.data)
+					this.OldProjectList = response.data;
+				});
+				getDicts("new_built").then(response => {
+					this.NewProjectList = response.data;
+					console.log("新建", response.data)
+				});
 				this.showPopup = !this.showPopup;
 
 			},
-			//室内
-			Indoor(e) {
-				if (e == 0) {
-					//旧改
-					this.showTypeSheet(0);
-				} else if (e == 1) {
-					//新建
-					this.showTypeSheet(1);
-				}
-			},
-			//庭院
-			Courtyard(e) {
-				if (e === 0) {
-
-					this.showTypeSheet(0);
-					//旧改
-				} else if (e == 1) {
-					//新建
-					this.showTypeSheet(1);
-				}
+
+			NewProject(e) {
+				this.enginType = 'new_built'; //写死
+
 			},
-			//架空
-			Overhead(e) {
-				if (e == 0) {
-					//旧改
-					this.showTypeSheet(0);
-				} else if (e == 1) {
-					//新建
-					this.showTypeSheet(1);
+			OldProject(e) {
+				this.enginType = 'old_renovation'; //写死
+				this.enginClassification = e;
+				this.typeList = ''; //置空
+				if (e == 'indoor_engin') {
+					//旧改室内
+					getDicts("old_renovation_indoor_engin").then(response => {
+
+						this.typeList = response.data;
+					});
+
+				} else if (e == 'courtyard') {
+					//旧改庭院
+					getDicts("old_renovation_courtyard_engin").then(response => {
+						console.log("庭院", response.data)
+						this.typeList = response.data;
+
+					});
+				} else if (e == 'overhead') {
+					//旧改架空
+					getDicts("old_renovation_overhead").then(response => {
+						console.log("架空", response.data)
+						this.typeList = response.data;
+
+
+					});
 				}
 
+				this.handleShowSheet();
 			},
-			//二次弹窗 选择类型
-			showTypeSheet(e) {
-				uni.showActionSheet({
-					itemList: ['拆旧管', '立杠', '挂表', '表后管', '阀管'],
-					success: (res) => {
-						console.log('选择了第' + (res.tapIndex + 1) + '个选项');
-						if (e == 0 && res.tapIndex == 0) {
-							uni.navigateTo({
-								url: '/pages/oldrenovation/indoor/tearOldPipe'
-							})
-						}
-						if (e == 0 && res.tapIndex == 1) {
-							uni.navigateTo({
-								url: '/pages/oldrenovation/indoor/verticalBar'
-							})
-						}
-						if (e == 0 && res.tapIndex == 2) {
-							uni.navigateTo({
-								url: '/pages/oldrenovation/indoor/putUpWatch'
-							})
-						}
-						if (e == 0 && res.tapIndex == 3) {
-							uni.navigateTo({
-								url: '/pages/oldrenovation/indoor/watchAfterPipe'
-							})
-						}
-						if (e == 0 && res.tapIndex == 4) {
-							uni.navigateTo({
-								url: '/pages/oldrenovation/indoor/valveTube'
-							})
-						}
 
-					},
-					fail: (err) => {
-						console.log('弹窗取消');
-					}
-				});
+
+
+
+
+
+			//二次弹窗 选择类型
+			showTypeSheet(item) {
+				this.showPopup = !this.showPopup; //隐藏第一次痰喘
+				console.log(item)
+				this.enginClassValue = item.dictValue; //二次节点赋值
+				const obj = {
+					enginClassValue: this.enginClassValue, //(拆旧管等 字典值)
+					enginType: this.enginType, //旧改 还是新建  写死
+					enginClassification: this.enginClassification //室内  庭院  架空
+
+				};
+
+				//拆旧管
+				this.handleHiddenShare();
+				uni.navigateTo({
+					url: '/pages/oldrenovation/indoor/tearOldPipe?params=' + encodeURIComponent(JSON.stringify(
+						obj))
+				})
+
+				// uni.showActionSheet({
+				// 	itemList: ['拆旧管', '立杠', '挂表', '表后管', '阀管'],
+				// 	success: (res) => {
+				// 		console.log('选择了第' + (res.tapIndex + 1) + '个选项');
+				// 		if (e == 0 && res.tapIndex == 0) {
+				// 			uni.navigateTo({
+				// 				url: '/pages/oldrenovation/indoor/tearOldPipe?description=OldIndoor&form=Pipe'
+				// 			})
+				// 		}
+				// 		if (e == 0 && res.tapIndex == 1) {
+				// 			uni.navigateTo({
+				// 				url: '/pages/oldrenovation/indoor/tearOldPipe?description=OldIndoor&form=verticalBar'
+				// 			})
+				// 		}
+				// 		if (e == 0 && res.tapIndex == 2) {
+				// 			uni.navigateTo({
+				// 				url: '/pages/oldrenovation/indoor/putUpWatch'
+				// 			})
+				// 		}
+				// 		if (e == 0 && res.tapIndex == 3) {
+				// 			uni.navigateTo({
+				// 				url: '/pages/oldrenovation/indoor/watchAfterPipe'
+				// 			})
+				// 		}
+				// 		if (e == 0 && res.tapIndex == 4) {
+				// 			uni.navigateTo({
+				// 				url: '/pages/oldrenovation/indoor/valveTube'
+				// 			})
+				// 		}
+
+				// 	},
+				// 	fail: (err) => {
+				// 		console.log('弹窗取消');
+				// 	}
+				// });
 
 			}
 		}
@@ -341,4 +415,102 @@
 		}
 
 	}
+
+	.share {
+		width: 100%;
+		height: 100%;
+	}
+
+	.share-box {
+		width: 100%;
+		height: 100%;
+		position: fixed;
+		top: 0rpx;
+		left: 0rpx;
+		bottom: 0rpx;
+		right: 0rpx;
+		background-color: rgba(0, 0, 0, 0.4);
+		transition: .3s;
+		z-index: 999;
+	}
+
+	// 进入分享动画
+	.share-show {
+		transition: all 0.3s ease;
+		transform: translateY(0%) !important;
+	}
+
+	// 离开分享动画
+	.share-item {
+		position: fixed;
+		left: 0;
+		bottom: 0;
+		width: 100%;
+		height: auto;
+		background-color: #FFFFFF;
+		transition: all 0.3s ease;
+		transform: translateY(100%);
+		z-index: 1999;
+
+		.share-to {
+			width: 100%;
+			height: 3rem;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+
+			&::after {
+				content: '';
+				width: 240rpx;
+				height: 0rpx;
+				border-top: 1px solid #E4E7ED;
+				-webkit-transform: scaleY(0.5);
+				transform: scaleY(0.5);
+				margin-left: 30rpx;
+			}
+
+			&::before {
+				content: '';
+				width: 240rpx;
+				height: 0rpx;
+				border-top: 1px solid #E4E7ED;
+				-webkit-transform: scaleY(0.5);
+				transform: scaleY(0.5);
+				margin-right: 30rpx;
+			}
+		}
+
+		.content {
+			width: 100%;
+			height: 50%;
+			display: flex;
+			flex-wrap: wrap;
+
+			.block {
+				width: 100%;
+				display: flex;
+				flex-direction: column;
+				justify-content: center;
+				align-items: center;
+				height: 80rpx;
+
+
+
+				text {
+					margin-top: 16rpx;
+					font-size: 28rpx;
+					color: #606266;
+				}
+			}
+		}
+
+		.cancel {
+			width: 100%;
+			height: 3rem;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			border-top: 1rpx solid #E4E7ED;
+		}
+	}
 </style>

BIN
static/images/chooseimg.png


BIN
static/images/icon_right.png


+ 6 - 6
store/modules/user.js

@@ -47,8 +47,8 @@ const user = {
 	  const type = userInfo.type
       return new Promise((resolve, reject) => {
         login(username, password, code, uuid,type).then(res => {
-          setToken(res.token)
-          commit('SET_TOKEN', res.token)
+          setToken(res.data.token)
+          commit('SET_TOKEN', res.data.token)
           resolve()
         }).catch(error => {
           reject(error)
@@ -60,12 +60,12 @@ const user = {
     GetInfo({ commit, state }) {
       return new Promise((resolve, reject) => {
         getInfo().then(res => {
-          const user = res.user
+          const user = res.data.user
           const avatar = (user == null || user.avatar == "" || user.avatar == null) ? require("@/static/images/profile.jpg") : baseUrl + user.avatar
           const username = (user == null || user.userName == "" || user.userName == null) ? "" : user.userName
-          if (res.roles && res.roles.length > 0) {
-            commit('SET_ROLES', res.roles)
-            commit('SET_PERMISSIONS', res.permissions)
+          if (res.data.roles && res.data.roles.length > 0) {
+            commit('SET_ROLES', res.data.roles)
+            commit('SET_PERMISSIONS', res.data.permissions)
           } else {
             commit('SET_ROLES', ['ROLE_DEFAULT'])
           }

+ 16 - 0
uni_modules/uni-icons/changelog.md

@@ -1,3 +1,19 @@
+## 2.0.8(2023-12-14)
+- 修复 项目未使用 ts 情况下,打包报错的bug
+## 2.0.7(2023-12-14)
+- 修复 size 属性为 string 时,不加单位导致尺寸异常的bug
+## 2.0.6(2023-12-11)
+- 优化 兼容老版本icon类型,如 top ,bottom 等
+## 2.0.5(2023-12-11)
+- 优化 兼容老版本icon类型,如 top ,bottom 等
+## 2.0.4(2023-12-06)
+- 优化 uni-app x 下示例项目图标排序
+## 2.0.3(2023-12-06)
+- 修复 nvue下引入组件报错的bug
+## 2.0.2(2023-12-05)
+-优化 size 属性支持单位
+## 2.0.1(2023-12-05)
+- 新增 uni-app x 支持定义图标
 ## 1.3.5(2022-01-24)
 - 优化 size 属性可以传入不带单位的字符串数值
 ## 1.3.4(2022-01-24)

+ 91 - 0
uni_modules/uni-icons/components/uni-icons/uni-icons.uvue

@@ -0,0 +1,91 @@
+<template>
+	<text class="uni-icons" :style="styleObj">
+		<slot>{{unicode}}</slot>
+	</text>
+</template>
+
+<script>
+	import { fontData, IconsDataItem } from './uniicons_file'
+
+	/**
+	 * Icons 图标
+	 * @description 用于展示 icon 图标
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=28
+	 * @property {Number} size 图标大小
+	 * @property {String} type 图标图案,参考示例
+	 * @property {String} color 图标颜色
+	 * @property {String} customPrefix 自定义图标
+	 * @event {Function} click 点击 Icon 触发事件
+	 */
+	export default {
+		name: "uni-icons",
+		props: {
+			type: {
+				type: String,
+				default: ''
+			},
+			color: {
+				type: String,
+				default: '#333333'
+			},
+			size: {
+				type: Object,
+				default: 24
+			},
+			fontFamily: {
+				type: String,
+				default: ''
+			}
+		},
+		data() {
+			return {};
+		},
+		computed: {
+			unicode() : string {
+				let codes = fontData.find((item : IconsDataItem) : boolean => { return item.font_class == this.type })
+				if (codes !== null) {
+					return codes.unicode
+				}
+				return ''
+			},
+			iconSize() : string {
+				const size = this.size
+				if (typeof size == 'string') {
+					const reg = /^[0-9]*$/g
+					return reg.test(size as string) ? '' + size + 'px' : '' + size;
+					// return '' + this.size
+				}
+				return this.getFontSize(size as number)
+			},
+			styleObj() : UTSJSONObject {
+				if (this.fontFamily !== '') {
+					return { color: this.color, fontSize: this.iconSize, fontFamily: this.fontFamily }
+				}
+				return { color: this.color, fontSize: this.iconSize }
+			}
+		},
+		created() { },
+		methods: {
+			/**
+			 * 字体大小
+			 */
+			getFontSize(size : number) : string {
+				return size + 'px';
+			},
+		},
+	}
+</script>
+
+<style scoped>
+	@font-face {
+		font-family: UniIconsFontFamily;
+		src: url('./uniicons.ttf');
+	}
+
+	.uni-icons {
+		font-family: UniIconsFontFamily;
+		font-size: 18px;
+		font-style: normal;
+		color: #333;
+	}
+</style>

+ 32 - 18
uni_modules/uni-icons/components/uni-icons/uni-icons.vue

@@ -1,24 +1,28 @@
 <template>
 	<!-- #ifdef APP-NVUE -->
-	<text :style="{ color: color, 'font-size': iconSize }" class="uni-icons" @click="_onClick">{{unicode}}</text>
+	<text :style="styleObj" class="uni-icons" @click="_onClick">{{unicode}}</text>
 	<!-- #endif -->
 	<!-- #ifndef APP-NVUE -->
-	<text :style="{ color: color, 'font-size': iconSize }" class="uni-icons" :class="['uniui-'+type,customPrefix,customPrefix?type:'']" @click="_onClick"></text>
+	<text :style="styleObj" class="uni-icons" :class="['uniui-'+type,customPrefix,customPrefix?type:'']" @click="_onClick">
+		<slot></slot>
+	</text>
 	<!-- #endif -->
 </template>
 
 <script>
-	import icons from './icons.js';
+	import { fontData } from './uniicons_file_vue.js';
+
 	const getVal = (val) => {
 		const reg = /^[0-9]*$/g
-		return (typeof val === 'number' || reg.test(val) )? val + 'px' : val;
-	} 
+		return (typeof val === 'number' || reg.test(val)) ? val + 'px' : val;
+	}
+
 	// #ifdef APP-NVUE
 	var domModule = weex.requireModule('dom');
 	import iconUrl from './uniicons.ttf'
 	domModule.addRule('fontFace', {
 		'fontFamily': "uniicons",
-		'src': "url('"+iconUrl+"')"
+		'src': "url('" + iconUrl + "')"
 	});
 	// #endif
 
@@ -34,7 +38,7 @@
 	 */
 	export default {
 		name: 'UniIcons',
-		emits:['click'],
+		emits: ['click'],
 		props: {
 			type: {
 				type: String,
@@ -46,28 +50,38 @@
 			},
 			size: {
 				type: [Number, String],
-				default: 16
+				default: 24
+			},
+			customPrefix: {
+				type: String,
+				default: ''
 			},
-			customPrefix:{
+			fontFamily: {
 				type: String,
 				default: ''
 			}
 		},
 		data() {
 			return {
-				icons: icons.glyphs
+				icons: fontData
 			}
 		},
-		computed:{
-			unicode(){
-				let code = this.icons.find(v=>v.font_class === this.type)
-				if(code){
-					return unescape(`%u${code.unicode}`)
+		computed: {
+			unicode() {
+				let code = this.icons.find(v => v.font_class === this.type)
+				if (code) {
+					return code.unicode
 				}
 				return ''
 			},
-			iconSize(){
+			iconSize() {
 				return getVal(this.size)
+			},
+			styleObj() {
+				if (this.fontFamily !== '') {
+					return `color: ${this.color}; font-size: ${this.iconSize}; font-family: ${this.fontFamily};`
+				}
+				return `color: ${this.color}; font-size: ${this.iconSize};`
 			}
 		},
 		methods: {
@@ -81,9 +95,10 @@
 <style lang="scss">
 	/* #ifndef APP-NVUE */
 	@import './uniicons.css';
+
 	@font-face {
 		font-family: uniicons;
-		src: url('./uniicons.ttf') format('truetype');
+		src: url('./uniicons.ttf');
 	}
 
 	/* #endif */
@@ -92,5 +107,4 @@
 		text-decoration: none;
 		text-align: center;
 	}
-
 </style>

+ 32 - 31
uni_modules/uni-icons/components/uni-icons/uniicons.css

@@ -1,3 +1,12 @@
+
+.uniui-cart-filled:before {
+  content: "\e6d0";
+}
+
+.uniui-gift-filled:before {
+  content: "\e6c4";
+}
+
 .uniui-color:before {
   content: "\e6cf";
 }
@@ -58,10 +67,6 @@
   content: "\e6c3";
 }
 
-.uniui-gift-filled:before {
-  content: "\e6c4";
-}
-
 .uniui-fire-filled:before {
   content: "\e6c5";
 }
@@ -82,6 +87,18 @@
   content: "\e698";
 }
 
+.uniui-arrowthinleft:before {
+  content: "\e6d2";
+}
+
+.uniui-arrowthinup:before {
+  content: "\e6d3";
+}
+
+.uniui-arrowthindown:before {
+  content: "\e6d4";
+}
+
 .uniui-back:before {
   content: "\e6b9";
 }
@@ -94,55 +111,43 @@
   content: "\e6bb";
 }
 
-.uniui-arrowthinright:before {
-  content: "\e6bb";
-}
-
 .uniui-arrow-left:before {
   content: "\e6bc";
 }
 
-.uniui-arrowthinleft:before {
-  content: "\e6bc";
-}
-
 .uniui-arrow-up:before {
   content: "\e6bd";
 }
 
-.uniui-arrowthinup:before {
-  content: "\e6bd";
-}
-
 .uniui-arrow-down:before {
   content: "\e6be";
 }
 
-.uniui-arrowthindown:before {
-  content: "\e6be";
+.uniui-arrowthinright:before {
+  content: "\e6d1";
 }
 
-.uniui-bottom:before {
+.uniui-down:before {
   content: "\e6b8";
 }
 
-.uniui-arrowdown:before {
+.uniui-bottom:before {
   content: "\e6b8";
 }
 
-.uniui-right:before {
-  content: "\e6b5";
+.uniui-arrowright:before {
+  content: "\e6d5";
 }
 
-.uniui-arrowright:before {
+.uniui-right:before {
   content: "\e6b5";
 }
 
-.uniui-top:before {
+.uniui-up:before {
   content: "\e6b6";
 }
 
-.uniui-arrowup:before {
+.uniui-top:before {
   content: "\e6b6";
 }
 
@@ -150,8 +155,8 @@
   content: "\e6b7";
 }
 
-.uniui-arrowleft:before {
-  content: "\e6b7";
+.uniui-arrowup:before {
+  content: "\e6d6";
 }
 
 .uniui-eye:before {
@@ -638,10 +643,6 @@
   content: "\e627";
 }
 
-.uniui-cart-filled:before {
-  content: "\e629";
-}
-
 .uniui-checkbox:before {
   content: "\e62b";
 }

BIN
uni_modules/uni-icons/components/uni-icons/uniicons.ttf


+ 664 - 0
uni_modules/uni-icons/components/uni-icons/uniicons_file.ts

@@ -0,0 +1,664 @@
+
+export type IconsData = {
+	id : string
+	name : string
+	font_family : string
+	css_prefix_text : string
+	description : string
+	glyphs : Array<IconsDataItem>
+}
+
+export type IconsDataItem = {
+	font_class : string
+	unicode : string
+}
+
+
+export const fontData = [
+  {
+    "font_class": "arrow-down",
+    "unicode": "\ue6be"
+  },
+  {
+    "font_class": "arrow-left",
+    "unicode": "\ue6bc"
+  },
+  {
+    "font_class": "arrow-right",
+    "unicode": "\ue6bb"
+  },
+  {
+    "font_class": "arrow-up",
+    "unicode": "\ue6bd"
+  },
+  {
+    "font_class": "auth",
+    "unicode": "\ue6ab"
+  },
+  {
+    "font_class": "auth-filled",
+    "unicode": "\ue6cc"
+  },
+  {
+    "font_class": "back",
+    "unicode": "\ue6b9"
+  },
+  {
+    "font_class": "bars",
+    "unicode": "\ue627"
+  },
+  {
+    "font_class": "calendar",
+    "unicode": "\ue6a0"
+  },
+  {
+    "font_class": "calendar-filled",
+    "unicode": "\ue6c0"
+  },
+  {
+    "font_class": "camera",
+    "unicode": "\ue65a"
+  },
+  {
+    "font_class": "camera-filled",
+    "unicode": "\ue658"
+  },
+  {
+    "font_class": "cart",
+    "unicode": "\ue631"
+  },
+  {
+    "font_class": "cart-filled",
+    "unicode": "\ue6d0"
+  },
+  {
+    "font_class": "chat",
+    "unicode": "\ue65d"
+  },
+  {
+    "font_class": "chat-filled",
+    "unicode": "\ue659"
+  },
+  {
+    "font_class": "chatboxes",
+    "unicode": "\ue696"
+  },
+  {
+    "font_class": "chatboxes-filled",
+    "unicode": "\ue692"
+  },
+  {
+    "font_class": "chatbubble",
+    "unicode": "\ue697"
+  },
+  {
+    "font_class": "chatbubble-filled",
+    "unicode": "\ue694"
+  },
+  {
+    "font_class": "checkbox",
+    "unicode": "\ue62b"
+  },
+  {
+    "font_class": "checkbox-filled",
+    "unicode": "\ue62c"
+  },
+  {
+    "font_class": "checkmarkempty",
+    "unicode": "\ue65c"
+  },
+  {
+    "font_class": "circle",
+    "unicode": "\ue65b"
+  },
+  {
+    "font_class": "circle-filled",
+    "unicode": "\ue65e"
+  },
+  {
+    "font_class": "clear",
+    "unicode": "\ue66d"
+  },
+  {
+    "font_class": "close",
+    "unicode": "\ue673"
+  },
+  {
+    "font_class": "closeempty",
+    "unicode": "\ue66c"
+  },
+  {
+    "font_class": "cloud-download",
+    "unicode": "\ue647"
+  },
+  {
+    "font_class": "cloud-download-filled",
+    "unicode": "\ue646"
+  },
+  {
+    "font_class": "cloud-upload",
+    "unicode": "\ue645"
+  },
+  {
+    "font_class": "cloud-upload-filled",
+    "unicode": "\ue648"
+  },
+  {
+    "font_class": "color",
+    "unicode": "\ue6cf"
+  },
+  {
+    "font_class": "color-filled",
+    "unicode": "\ue6c9"
+  },
+  {
+    "font_class": "compose",
+    "unicode": "\ue67f"
+  },
+  {
+    "font_class": "contact",
+    "unicode": "\ue693"
+  },
+  {
+    "font_class": "contact-filled",
+    "unicode": "\ue695"
+  },
+  {
+    "font_class": "down",
+    "unicode": "\ue6b8"
+  },
+	{
+	  "font_class": "bottom",
+	  "unicode": "\ue6b8"
+	},
+  {
+    "font_class": "download",
+    "unicode": "\ue68d"
+  },
+  {
+    "font_class": "download-filled",
+    "unicode": "\ue681"
+  },
+  {
+    "font_class": "email",
+    "unicode": "\ue69e"
+  },
+  {
+    "font_class": "email-filled",
+    "unicode": "\ue69a"
+  },
+  {
+    "font_class": "eye",
+    "unicode": "\ue651"
+  },
+  {
+    "font_class": "eye-filled",
+    "unicode": "\ue66a"
+  },
+  {
+    "font_class": "eye-slash",
+    "unicode": "\ue6b3"
+  },
+  {
+    "font_class": "eye-slash-filled",
+    "unicode": "\ue6b4"
+  },
+  {
+    "font_class": "fire",
+    "unicode": "\ue6a1"
+  },
+  {
+    "font_class": "fire-filled",
+    "unicode": "\ue6c5"
+  },
+  {
+    "font_class": "flag",
+    "unicode": "\ue65f"
+  },
+  {
+    "font_class": "flag-filled",
+    "unicode": "\ue660"
+  },
+  {
+    "font_class": "folder-add",
+    "unicode": "\ue6a9"
+  },
+  {
+    "font_class": "folder-add-filled",
+    "unicode": "\ue6c8"
+  },
+  {
+    "font_class": "font",
+    "unicode": "\ue6a3"
+  },
+  {
+    "font_class": "forward",
+    "unicode": "\ue6ba"
+  },
+  {
+    "font_class": "gear",
+    "unicode": "\ue664"
+  },
+  {
+    "font_class": "gear-filled",
+    "unicode": "\ue661"
+  },
+  {
+    "font_class": "gift",
+    "unicode": "\ue6a4"
+  },
+  {
+    "font_class": "gift-filled",
+    "unicode": "\ue6c4"
+  },
+  {
+    "font_class": "hand-down",
+    "unicode": "\ue63d"
+  },
+  {
+    "font_class": "hand-down-filled",
+    "unicode": "\ue63c"
+  },
+  {
+    "font_class": "hand-up",
+    "unicode": "\ue63f"
+  },
+  {
+    "font_class": "hand-up-filled",
+    "unicode": "\ue63e"
+  },
+  {
+    "font_class": "headphones",
+    "unicode": "\ue630"
+  },
+  {
+    "font_class": "heart",
+    "unicode": "\ue639"
+  },
+  {
+    "font_class": "heart-filled",
+    "unicode": "\ue641"
+  },
+  {
+    "font_class": "help",
+    "unicode": "\ue679"
+  },
+  {
+    "font_class": "help-filled",
+    "unicode": "\ue674"
+  },
+  {
+    "font_class": "home",
+    "unicode": "\ue662"
+  },
+  {
+    "font_class": "home-filled",
+    "unicode": "\ue663"
+  },
+  {
+    "font_class": "image",
+    "unicode": "\ue670"
+  },
+  {
+    "font_class": "image-filled",
+    "unicode": "\ue678"
+  },
+  {
+    "font_class": "images",
+    "unicode": "\ue650"
+  },
+  {
+    "font_class": "images-filled",
+    "unicode": "\ue64b"
+  },
+  {
+    "font_class": "info",
+    "unicode": "\ue669"
+  },
+  {
+    "font_class": "info-filled",
+    "unicode": "\ue649"
+  },
+  {
+    "font_class": "left",
+    "unicode": "\ue6b7"
+  },
+  {
+    "font_class": "link",
+    "unicode": "\ue6a5"
+  },
+  {
+    "font_class": "list",
+    "unicode": "\ue644"
+  },
+  {
+    "font_class": "location",
+    "unicode": "\ue6ae"
+  },
+  {
+    "font_class": "location-filled",
+    "unicode": "\ue6af"
+  },
+  {
+    "font_class": "locked",
+    "unicode": "\ue66b"
+  },
+  {
+    "font_class": "locked-filled",
+    "unicode": "\ue668"
+  },
+  {
+    "font_class": "loop",
+    "unicode": "\ue633"
+  },
+  {
+    "font_class": "mail-open",
+    "unicode": "\ue643"
+  },
+  {
+    "font_class": "mail-open-filled",
+    "unicode": "\ue63a"
+  },
+  {
+    "font_class": "map",
+    "unicode": "\ue667"
+  },
+  {
+    "font_class": "map-filled",
+    "unicode": "\ue666"
+  },
+  {
+    "font_class": "map-pin",
+    "unicode": "\ue6ad"
+  },
+  {
+    "font_class": "map-pin-ellipse",
+    "unicode": "\ue6ac"
+  },
+  {
+    "font_class": "medal",
+    "unicode": "\ue6a2"
+  },
+  {
+    "font_class": "medal-filled",
+    "unicode": "\ue6c3"
+  },
+  {
+    "font_class": "mic",
+    "unicode": "\ue671"
+  },
+  {
+    "font_class": "mic-filled",
+    "unicode": "\ue677"
+  },
+  {
+    "font_class": "micoff",
+    "unicode": "\ue67e"
+  },
+  {
+    "font_class": "micoff-filled",
+    "unicode": "\ue6b0"
+  },
+  {
+    "font_class": "minus",
+    "unicode": "\ue66f"
+  },
+  {
+    "font_class": "minus-filled",
+    "unicode": "\ue67d"
+  },
+  {
+    "font_class": "more",
+    "unicode": "\ue64d"
+  },
+  {
+    "font_class": "more-filled",
+    "unicode": "\ue64e"
+  },
+  {
+    "font_class": "navigate",
+    "unicode": "\ue66e"
+  },
+  {
+    "font_class": "navigate-filled",
+    "unicode": "\ue67a"
+  },
+  {
+    "font_class": "notification",
+    "unicode": "\ue6a6"
+  },
+  {
+    "font_class": "notification-filled",
+    "unicode": "\ue6c1"
+  },
+  {
+    "font_class": "paperclip",
+    "unicode": "\ue652"
+  },
+  {
+    "font_class": "paperplane",
+    "unicode": "\ue672"
+  },
+  {
+    "font_class": "paperplane-filled",
+    "unicode": "\ue675"
+  },
+  {
+    "font_class": "person",
+    "unicode": "\ue699"
+  },
+  {
+    "font_class": "person-filled",
+    "unicode": "\ue69d"
+  },
+  {
+    "font_class": "personadd",
+    "unicode": "\ue69f"
+  },
+  {
+    "font_class": "personadd-filled",
+    "unicode": "\ue698"
+  },
+  {
+    "font_class": "personadd-filled-copy",
+    "unicode": "\ue6d1"
+  },
+  {
+    "font_class": "phone",
+    "unicode": "\ue69c"
+  },
+  {
+    "font_class": "phone-filled",
+    "unicode": "\ue69b"
+  },
+  {
+    "font_class": "plus",
+    "unicode": "\ue676"
+  },
+  {
+    "font_class": "plus-filled",
+    "unicode": "\ue6c7"
+  },
+  {
+    "font_class": "plusempty",
+    "unicode": "\ue67b"
+  },
+  {
+    "font_class": "pulldown",
+    "unicode": "\ue632"
+  },
+  {
+    "font_class": "pyq",
+    "unicode": "\ue682"
+  },
+  {
+    "font_class": "qq",
+    "unicode": "\ue680"
+  },
+  {
+    "font_class": "redo",
+    "unicode": "\ue64a"
+  },
+  {
+    "font_class": "redo-filled",
+    "unicode": "\ue655"
+  },
+  {
+    "font_class": "refresh",
+    "unicode": "\ue657"
+  },
+  {
+    "font_class": "refresh-filled",
+    "unicode": "\ue656"
+  },
+  {
+    "font_class": "refreshempty",
+    "unicode": "\ue6bf"
+  },
+  {
+    "font_class": "reload",
+    "unicode": "\ue6b2"
+  },
+  {
+    "font_class": "right",
+    "unicode": "\ue6b5"
+  },
+  {
+    "font_class": "scan",
+    "unicode": "\ue62a"
+  },
+  {
+    "font_class": "search",
+    "unicode": "\ue654"
+  },
+  {
+    "font_class": "settings",
+    "unicode": "\ue653"
+  },
+  {
+    "font_class": "settings-filled",
+    "unicode": "\ue6ce"
+  },
+  {
+    "font_class": "shop",
+    "unicode": "\ue62f"
+  },
+  {
+    "font_class": "shop-filled",
+    "unicode": "\ue6cd"
+  },
+  {
+    "font_class": "smallcircle",
+    "unicode": "\ue67c"
+  },
+  {
+    "font_class": "smallcircle-filled",
+    "unicode": "\ue665"
+  },
+  {
+    "font_class": "sound",
+    "unicode": "\ue684"
+  },
+  {
+    "font_class": "sound-filled",
+    "unicode": "\ue686"
+  },
+  {
+    "font_class": "spinner-cycle",
+    "unicode": "\ue68a"
+  },
+  {
+    "font_class": "staff",
+    "unicode": "\ue6a7"
+  },
+  {
+    "font_class": "staff-filled",
+    "unicode": "\ue6cb"
+  },
+  {
+    "font_class": "star",
+    "unicode": "\ue688"
+  },
+  {
+    "font_class": "star-filled",
+    "unicode": "\ue68f"
+  },
+  {
+    "font_class": "starhalf",
+    "unicode": "\ue683"
+  },
+  {
+    "font_class": "trash",
+    "unicode": "\ue687"
+  },
+  {
+    "font_class": "trash-filled",
+    "unicode": "\ue685"
+  },
+  {
+    "font_class": "tune",
+    "unicode": "\ue6aa"
+  },
+  {
+    "font_class": "tune-filled",
+    "unicode": "\ue6ca"
+  },
+  {
+    "font_class": "undo",
+    "unicode": "\ue64f"
+  },
+  {
+    "font_class": "undo-filled",
+    "unicode": "\ue64c"
+  },
+  {
+    "font_class": "up",
+    "unicode": "\ue6b6"
+  },
+	{
+	  "font_class": "top",
+	  "unicode": "\ue6b6"
+	},
+  {
+    "font_class": "upload",
+    "unicode": "\ue690"
+  },
+  {
+    "font_class": "upload-filled",
+    "unicode": "\ue68e"
+  },
+  {
+    "font_class": "videocam",
+    "unicode": "\ue68c"
+  },
+  {
+    "font_class": "videocam-filled",
+    "unicode": "\ue689"
+  },
+  {
+    "font_class": "vip",
+    "unicode": "\ue6a8"
+  },
+  {
+    "font_class": "vip-filled",
+    "unicode": "\ue6c6"
+  },
+  {
+    "font_class": "wallet",
+    "unicode": "\ue6b1"
+  },
+  {
+    "font_class": "wallet-filled",
+    "unicode": "\ue6c2"
+  },
+  {
+    "font_class": "weibo",
+    "unicode": "\ue68b"
+  },
+  {
+    "font_class": "weixin",
+    "unicode": "\ue691"
+  }
+] as IconsDataItem[]
+
+// export const fontData = JSON.parse<IconsDataItem>(fontDataJson)

+ 649 - 0
uni_modules/uni-icons/components/uni-icons/uniicons_file_vue.js

@@ -0,0 +1,649 @@
+
+export const fontData = [
+  {
+    "font_class": "arrow-down",
+    "unicode": "\ue6be"
+  },
+  {
+    "font_class": "arrow-left",
+    "unicode": "\ue6bc"
+  },
+  {
+    "font_class": "arrow-right",
+    "unicode": "\ue6bb"
+  },
+  {
+    "font_class": "arrow-up",
+    "unicode": "\ue6bd"
+  },
+  {
+    "font_class": "auth",
+    "unicode": "\ue6ab"
+  },
+  {
+    "font_class": "auth-filled",
+    "unicode": "\ue6cc"
+  },
+  {
+    "font_class": "back",
+    "unicode": "\ue6b9"
+  },
+  {
+    "font_class": "bars",
+    "unicode": "\ue627"
+  },
+  {
+    "font_class": "calendar",
+    "unicode": "\ue6a0"
+  },
+  {
+    "font_class": "calendar-filled",
+    "unicode": "\ue6c0"
+  },
+  {
+    "font_class": "camera",
+    "unicode": "\ue65a"
+  },
+  {
+    "font_class": "camera-filled",
+    "unicode": "\ue658"
+  },
+  {
+    "font_class": "cart",
+    "unicode": "\ue631"
+  },
+  {
+    "font_class": "cart-filled",
+    "unicode": "\ue6d0"
+  },
+  {
+    "font_class": "chat",
+    "unicode": "\ue65d"
+  },
+  {
+    "font_class": "chat-filled",
+    "unicode": "\ue659"
+  },
+  {
+    "font_class": "chatboxes",
+    "unicode": "\ue696"
+  },
+  {
+    "font_class": "chatboxes-filled",
+    "unicode": "\ue692"
+  },
+  {
+    "font_class": "chatbubble",
+    "unicode": "\ue697"
+  },
+  {
+    "font_class": "chatbubble-filled",
+    "unicode": "\ue694"
+  },
+  {
+    "font_class": "checkbox",
+    "unicode": "\ue62b"
+  },
+  {
+    "font_class": "checkbox-filled",
+    "unicode": "\ue62c"
+  },
+  {
+    "font_class": "checkmarkempty",
+    "unicode": "\ue65c"
+  },
+  {
+    "font_class": "circle",
+    "unicode": "\ue65b"
+  },
+  {
+    "font_class": "circle-filled",
+    "unicode": "\ue65e"
+  },
+  {
+    "font_class": "clear",
+    "unicode": "\ue66d"
+  },
+  {
+    "font_class": "close",
+    "unicode": "\ue673"
+  },
+  {
+    "font_class": "closeempty",
+    "unicode": "\ue66c"
+  },
+  {
+    "font_class": "cloud-download",
+    "unicode": "\ue647"
+  },
+  {
+    "font_class": "cloud-download-filled",
+    "unicode": "\ue646"
+  },
+  {
+    "font_class": "cloud-upload",
+    "unicode": "\ue645"
+  },
+  {
+    "font_class": "cloud-upload-filled",
+    "unicode": "\ue648"
+  },
+  {
+    "font_class": "color",
+    "unicode": "\ue6cf"
+  },
+  {
+    "font_class": "color-filled",
+    "unicode": "\ue6c9"
+  },
+  {
+    "font_class": "compose",
+    "unicode": "\ue67f"
+  },
+  {
+    "font_class": "contact",
+    "unicode": "\ue693"
+  },
+  {
+    "font_class": "contact-filled",
+    "unicode": "\ue695"
+  },
+  {
+    "font_class": "down",
+    "unicode": "\ue6b8"
+  },
+	{
+	  "font_class": "bottom",
+	  "unicode": "\ue6b8"
+	},
+  {
+    "font_class": "download",
+    "unicode": "\ue68d"
+  },
+  {
+    "font_class": "download-filled",
+    "unicode": "\ue681"
+  },
+  {
+    "font_class": "email",
+    "unicode": "\ue69e"
+  },
+  {
+    "font_class": "email-filled",
+    "unicode": "\ue69a"
+  },
+  {
+    "font_class": "eye",
+    "unicode": "\ue651"
+  },
+  {
+    "font_class": "eye-filled",
+    "unicode": "\ue66a"
+  },
+  {
+    "font_class": "eye-slash",
+    "unicode": "\ue6b3"
+  },
+  {
+    "font_class": "eye-slash-filled",
+    "unicode": "\ue6b4"
+  },
+  {
+    "font_class": "fire",
+    "unicode": "\ue6a1"
+  },
+  {
+    "font_class": "fire-filled",
+    "unicode": "\ue6c5"
+  },
+  {
+    "font_class": "flag",
+    "unicode": "\ue65f"
+  },
+  {
+    "font_class": "flag-filled",
+    "unicode": "\ue660"
+  },
+  {
+    "font_class": "folder-add",
+    "unicode": "\ue6a9"
+  },
+  {
+    "font_class": "folder-add-filled",
+    "unicode": "\ue6c8"
+  },
+  {
+    "font_class": "font",
+    "unicode": "\ue6a3"
+  },
+  {
+    "font_class": "forward",
+    "unicode": "\ue6ba"
+  },
+  {
+    "font_class": "gear",
+    "unicode": "\ue664"
+  },
+  {
+    "font_class": "gear-filled",
+    "unicode": "\ue661"
+  },
+  {
+    "font_class": "gift",
+    "unicode": "\ue6a4"
+  },
+  {
+    "font_class": "gift-filled",
+    "unicode": "\ue6c4"
+  },
+  {
+    "font_class": "hand-down",
+    "unicode": "\ue63d"
+  },
+  {
+    "font_class": "hand-down-filled",
+    "unicode": "\ue63c"
+  },
+  {
+    "font_class": "hand-up",
+    "unicode": "\ue63f"
+  },
+  {
+    "font_class": "hand-up-filled",
+    "unicode": "\ue63e"
+  },
+  {
+    "font_class": "headphones",
+    "unicode": "\ue630"
+  },
+  {
+    "font_class": "heart",
+    "unicode": "\ue639"
+  },
+  {
+    "font_class": "heart-filled",
+    "unicode": "\ue641"
+  },
+  {
+    "font_class": "help",
+    "unicode": "\ue679"
+  },
+  {
+    "font_class": "help-filled",
+    "unicode": "\ue674"
+  },
+  {
+    "font_class": "home",
+    "unicode": "\ue662"
+  },
+  {
+    "font_class": "home-filled",
+    "unicode": "\ue663"
+  },
+  {
+    "font_class": "image",
+    "unicode": "\ue670"
+  },
+  {
+    "font_class": "image-filled",
+    "unicode": "\ue678"
+  },
+  {
+    "font_class": "images",
+    "unicode": "\ue650"
+  },
+  {
+    "font_class": "images-filled",
+    "unicode": "\ue64b"
+  },
+  {
+    "font_class": "info",
+    "unicode": "\ue669"
+  },
+  {
+    "font_class": "info-filled",
+    "unicode": "\ue649"
+  },
+  {
+    "font_class": "left",
+    "unicode": "\ue6b7"
+  },
+  {
+    "font_class": "link",
+    "unicode": "\ue6a5"
+  },
+  {
+    "font_class": "list",
+    "unicode": "\ue644"
+  },
+  {
+    "font_class": "location",
+    "unicode": "\ue6ae"
+  },
+  {
+    "font_class": "location-filled",
+    "unicode": "\ue6af"
+  },
+  {
+    "font_class": "locked",
+    "unicode": "\ue66b"
+  },
+  {
+    "font_class": "locked-filled",
+    "unicode": "\ue668"
+  },
+  {
+    "font_class": "loop",
+    "unicode": "\ue633"
+  },
+  {
+    "font_class": "mail-open",
+    "unicode": "\ue643"
+  },
+  {
+    "font_class": "mail-open-filled",
+    "unicode": "\ue63a"
+  },
+  {
+    "font_class": "map",
+    "unicode": "\ue667"
+  },
+  {
+    "font_class": "map-filled",
+    "unicode": "\ue666"
+  },
+  {
+    "font_class": "map-pin",
+    "unicode": "\ue6ad"
+  },
+  {
+    "font_class": "map-pin-ellipse",
+    "unicode": "\ue6ac"
+  },
+  {
+    "font_class": "medal",
+    "unicode": "\ue6a2"
+  },
+  {
+    "font_class": "medal-filled",
+    "unicode": "\ue6c3"
+  },
+  {
+    "font_class": "mic",
+    "unicode": "\ue671"
+  },
+  {
+    "font_class": "mic-filled",
+    "unicode": "\ue677"
+  },
+  {
+    "font_class": "micoff",
+    "unicode": "\ue67e"
+  },
+  {
+    "font_class": "micoff-filled",
+    "unicode": "\ue6b0"
+  },
+  {
+    "font_class": "minus",
+    "unicode": "\ue66f"
+  },
+  {
+    "font_class": "minus-filled",
+    "unicode": "\ue67d"
+  },
+  {
+    "font_class": "more",
+    "unicode": "\ue64d"
+  },
+  {
+    "font_class": "more-filled",
+    "unicode": "\ue64e"
+  },
+  {
+    "font_class": "navigate",
+    "unicode": "\ue66e"
+  },
+  {
+    "font_class": "navigate-filled",
+    "unicode": "\ue67a"
+  },
+  {
+    "font_class": "notification",
+    "unicode": "\ue6a6"
+  },
+  {
+    "font_class": "notification-filled",
+    "unicode": "\ue6c1"
+  },
+  {
+    "font_class": "paperclip",
+    "unicode": "\ue652"
+  },
+  {
+    "font_class": "paperplane",
+    "unicode": "\ue672"
+  },
+  {
+    "font_class": "paperplane-filled",
+    "unicode": "\ue675"
+  },
+  {
+    "font_class": "person",
+    "unicode": "\ue699"
+  },
+  {
+    "font_class": "person-filled",
+    "unicode": "\ue69d"
+  },
+  {
+    "font_class": "personadd",
+    "unicode": "\ue69f"
+  },
+  {
+    "font_class": "personadd-filled",
+    "unicode": "\ue698"
+  },
+  {
+    "font_class": "personadd-filled-copy",
+    "unicode": "\ue6d1"
+  },
+  {
+    "font_class": "phone",
+    "unicode": "\ue69c"
+  },
+  {
+    "font_class": "phone-filled",
+    "unicode": "\ue69b"
+  },
+  {
+    "font_class": "plus",
+    "unicode": "\ue676"
+  },
+  {
+    "font_class": "plus-filled",
+    "unicode": "\ue6c7"
+  },
+  {
+    "font_class": "plusempty",
+    "unicode": "\ue67b"
+  },
+  {
+    "font_class": "pulldown",
+    "unicode": "\ue632"
+  },
+  {
+    "font_class": "pyq",
+    "unicode": "\ue682"
+  },
+  {
+    "font_class": "qq",
+    "unicode": "\ue680"
+  },
+  {
+    "font_class": "redo",
+    "unicode": "\ue64a"
+  },
+  {
+    "font_class": "redo-filled",
+    "unicode": "\ue655"
+  },
+  {
+    "font_class": "refresh",
+    "unicode": "\ue657"
+  },
+  {
+    "font_class": "refresh-filled",
+    "unicode": "\ue656"
+  },
+  {
+    "font_class": "refreshempty",
+    "unicode": "\ue6bf"
+  },
+  {
+    "font_class": "reload",
+    "unicode": "\ue6b2"
+  },
+  {
+    "font_class": "right",
+    "unicode": "\ue6b5"
+  },
+  {
+    "font_class": "scan",
+    "unicode": "\ue62a"
+  },
+  {
+    "font_class": "search",
+    "unicode": "\ue654"
+  },
+  {
+    "font_class": "settings",
+    "unicode": "\ue653"
+  },
+  {
+    "font_class": "settings-filled",
+    "unicode": "\ue6ce"
+  },
+  {
+    "font_class": "shop",
+    "unicode": "\ue62f"
+  },
+  {
+    "font_class": "shop-filled",
+    "unicode": "\ue6cd"
+  },
+  {
+    "font_class": "smallcircle",
+    "unicode": "\ue67c"
+  },
+  {
+    "font_class": "smallcircle-filled",
+    "unicode": "\ue665"
+  },
+  {
+    "font_class": "sound",
+    "unicode": "\ue684"
+  },
+  {
+    "font_class": "sound-filled",
+    "unicode": "\ue686"
+  },
+  {
+    "font_class": "spinner-cycle",
+    "unicode": "\ue68a"
+  },
+  {
+    "font_class": "staff",
+    "unicode": "\ue6a7"
+  },
+  {
+    "font_class": "staff-filled",
+    "unicode": "\ue6cb"
+  },
+  {
+    "font_class": "star",
+    "unicode": "\ue688"
+  },
+  {
+    "font_class": "star-filled",
+    "unicode": "\ue68f"
+  },
+  {
+    "font_class": "starhalf",
+    "unicode": "\ue683"
+  },
+  {
+    "font_class": "trash",
+    "unicode": "\ue687"
+  },
+  {
+    "font_class": "trash-filled",
+    "unicode": "\ue685"
+  },
+  {
+    "font_class": "tune",
+    "unicode": "\ue6aa"
+  },
+  {
+    "font_class": "tune-filled",
+    "unicode": "\ue6ca"
+  },
+  {
+    "font_class": "undo",
+    "unicode": "\ue64f"
+  },
+  {
+    "font_class": "undo-filled",
+    "unicode": "\ue64c"
+  },
+  {
+    "font_class": "up",
+    "unicode": "\ue6b6"
+  },
+	{
+	  "font_class": "top",
+	  "unicode": "\ue6b6"
+	},
+  {
+    "font_class": "upload",
+    "unicode": "\ue690"
+  },
+  {
+    "font_class": "upload-filled",
+    "unicode": "\ue68e"
+  },
+  {
+    "font_class": "videocam",
+    "unicode": "\ue68c"
+  },
+  {
+    "font_class": "videocam-filled",
+    "unicode": "\ue689"
+  },
+  {
+    "font_class": "vip",
+    "unicode": "\ue6a8"
+  },
+  {
+    "font_class": "vip-filled",
+    "unicode": "\ue6c6"
+  },
+  {
+    "font_class": "wallet",
+    "unicode": "\ue6b1"
+  },
+  {
+    "font_class": "wallet-filled",
+    "unicode": "\ue6c2"
+  },
+  {
+    "font_class": "weibo",
+    "unicode": "\ue68b"
+  },
+  {
+    "font_class": "weixin",
+    "unicode": "\ue691"
+  }
+]
+
+// export const fontData = JSON.parse<IconsDataItem>(fontDataJson)

+ 14 - 12
uni_modules/uni-icons/package.json

@@ -1,7 +1,7 @@
 {
   "id": "uni-icons",
   "displayName": "uni-icons 图标",
-  "version": "1.3.5",
+  "version": "2.0.8",
   "description": "图标组件,用于展示移动端常见的图标,可自定义颜色、大小。",
   "keywords": [
     "uni-ui",
@@ -16,11 +16,7 @@
   "directories": {
     "example": "../../temps/example_temps"
   },
-  "dcloudext": {
-    "category": [
-      "前端组件",
-      "通用组件"
-    ],
+"dcloudext": {
     "sale": {
       "regular": {
         "price": "0.00"
@@ -37,7 +33,8 @@
       "data": "无",
       "permissions": "无"
     },
-    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
+    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
+    "type": "component-vue"
   },
   "uni_modules": {
     "dependencies": ["uni-scss"],
@@ -50,7 +47,8 @@
       "client": {
         "App": {
           "app-vue": "y",
-          "app-nvue": "y"
+          "app-nvue": "y",
+          "app-uvue": "y"
         },
         "H5-mobile": {
           "Safari": "y",
@@ -70,11 +68,15 @@
           "阿里": "y",
           "百度": "y",
           "字节跳动": "y",
-          "QQ": "y"
+          "QQ": "y",
+					"钉钉": "y",
+					"快手": "y",
+					"飞书": "y",
+					"京东": "y"
         },
         "快应用": {
-          "华为": "u",
-          "联盟": "u"
+          "华为": "y",
+          "联盟": "y"
         },
         "Vue": {
             "vue2": "y",
@@ -83,4 +85,4 @@
       }
     }
   }
-}
+}

+ 2 - 1
utils/request.js

@@ -35,6 +35,7 @@ const request = config => {
           reject('后端接口连接异常')
           return
         }
+		//console.log("dddd",res)
         const code = res.data.code || 200
         const msg = errorCode[code] || res.data.msg || errorCode['default']
         if (code === 401) {
@@ -53,7 +54,7 @@ const request = config => {
           toast(msg)
           reject(code)
         }
-        resolve(res.data.data)
+        resolve(res.data)
       })
       .catch(error => {
         let { message } = error