zouling 4 kuukautta sitten
vanhempi
commit
7e3cdfd30b
40 muutettua tiedostoa jossa 3763 lisäystä ja 556 poistoa
  1. 184 3
      property_ui/api/work/manage.js
  2. 8 0
      property_ui/api/work/people.js
  3. 84 3
      property_ui/api/work/service.js
  4. 5 1
      property_ui/car/pages/illegalrecord.vue
  5. 174 77
      property_ui/manage/components/car/list.vue
  6. 8 0
      property_ui/manage/components/editor/editor.vue
  7. 1 1
      property_ui/manage/components/nodata/nodata.vue
  8. 391 39
      property_ui/manage/pages/community/newsadd.vue
  9. 399 28
      property_ui/manage/pages/community/newsadddj.vue
  10. 400 28
      property_ui/manage/pages/community/newsaddsq.vue
  11. 198 26
      property_ui/manage/pages/community/newsaddvideo.vue
  12. 76 16
      property_ui/manage/pages/community/newsdj.vue
  13. 75 10
      property_ui/manage/pages/community/newssq.vue
  14. 242 0
      property_ui/manage/pages/community/newssqdetail.vue
  15. 121 11
      property_ui/manage/pages/community/newsyg.vue
  16. 298 0
      property_ui/manage/pages/community/newsygdetail.vue
  17. 36 14
      property_ui/manage/pages/community/readcount.vue
  18. 25 14
      property_ui/manage/pages/community/readlist.vue
  19. 99 37
      property_ui/manage/pages/community/sqmoney.vue
  20. 253 64
      property_ui/manage/pages/community/sqmoneyadd.vue
  21. BIN
      property_ui/manage/static/news/eye.png
  22. BIN
      property_ui/manage/static/news/head.png
  23. BIN
      property_ui/manage/static/news/nicona.png
  24. BIN
      property_ui/manage/static/news/niconb.png
  25. BIN
      property_ui/manage/static/news/niconc.png
  26. BIN
      property_ui/manage/static/news/nicond.png
  27. BIN
      property_ui/manage/static/news/nicone.png
  28. BIN
      property_ui/manage/static/news/stara.png
  29. BIN
      property_ui/manage/static/news/starb.png
  30. 18 0
      property_ui/pages.json
  31. 7 7
      property_ui/pages/index/index.vue
  32. 38 26
      property_ui/service/components/car/list.vue
  33. 110 77
      property_ui/service/components/popup/popup.vue
  34. 59 10
      property_ui/service/pages/service/complaint.vue
  35. 203 14
      property_ui/service/pages/service/complaintdetail.vue
  36. 58 12
      property_ui/service/pages/service/warranty.vue
  37. 174 27
      property_ui/service/pages/service/warrantydetail.vue
  38. BIN
      property_ui/service/static/service/hline.png
  39. 8 0
      property_ui/static/style.css
  40. 11 11
      property_ui/utils/common.js

+ 184 - 3
property_ui/api/work/manage.js

@@ -5,7 +5,7 @@ export function assetTypeAdd(data) {
   return request({
     url: '/wuYe/assetType',
     method: 'post',
-    data: data
+    'data': data
   })
 }
 // 资产类型-修改wuYe:assetType:edit
@@ -13,7 +13,7 @@ export function assetTypePut(data) {
   return request({
     url: '/wuYe/assetType/put',
     method: 'post',
-    data: data
+    'data': data
   })
 }
 // 资产类型-删除wuYe:assetType:remove
@@ -28,7 +28,7 @@ export function assetTypeList(data) {
   return request({
     url: '/wuYe/assetType/list',
     method: 'get',
-    data: data
+    'data': data
   })
 }
 // 资产类型-详情wuYe:assetType:query
@@ -45,3 +45,184 @@ export function assetTypeTree(data) {
     method: 'get',
   })
 }
+
+// 社区资产-新增wuYe:assets:add
+export function assetsAdd(data) {
+  return request({
+    url: '/wuYe/assets',
+    method: 'post',
+    'data': data
+  })
+}
+// 社区资产-修改wuYe:assets:edit
+export function assetsPut(data) {
+  return request({
+    url: '/wuYe/assets/put',
+    method: 'post',
+    'data': data
+  })
+}
+// 社区资产-删除wuYe:assets:remove
+export function assetsDel(data) {
+  return request({
+    url: '/wuYe/assets/delete/'+data,
+    method: 'get',
+  })
+}
+// 社区资产-列表wuYe:assets:list
+export function assetsList(data) {
+  return request({
+    url: '/wuYe/assets/list',
+    method: 'get',
+    'data': data
+  })
+}
+//社区资产-详情wuYe:assets:query
+export function assetsDet(data) {
+  return request({
+    url: '/wuYe/assets/'+data,
+    method: 'get',
+  })
+}
+
+
+
+// 党建资讯-新增wuYe:partyNews:add
+export function partyNewsAdd(data) {
+  return request({
+    url: '/wuYe/partyNews',
+    method: 'post',
+    'data': data
+  })
+}
+// 党建资讯-修改wuye:partyNews:edit
+export function partyNewsPut(data) {
+  return request({
+    url: '/wuYe/partyNews/put',
+    method: 'post',
+    'data': data
+  })
+}
+// 党建资讯-删除wuYe:partyIds:remove
+export function partyNewsDel(data) {
+  return request({
+    url: '/wuYe/partyNews/delete/'+data,
+    method: 'get',
+  })
+}
+// 党建资讯-列表wuYe:partyNews:list
+export function partyNewsList(data) {
+  return request({
+    url: '/wuYe/partyNews/list',
+    method: 'get',
+    'data': data
+  })
+}
+// 党建资讯-详情wuYe:partyNews:query
+export function partyNewsDet(data) {
+  return request({
+    url: '/wuYe/partyNews/'+data,
+    method: 'get',
+  })
+}
+// 社区资讯-新增wuYe:news:add
+export function newsAdd(data) {
+  return request({
+    url: '/wuYe/news',
+    method: 'post',
+    'data': data
+  })
+}
+// 社区资讯-修改wuye:news:edit
+export function newsPut(data) {
+  return request({
+    url: '/wuYe/news/put',
+    method: 'post',
+    'data': data
+  })
+}
+// 社区资讯-删除wuYe:news:remove
+export function newsDel(data) {
+  return request({
+    url: '/wuYe/news/delete/'+data,
+    method: 'get',
+  })
+}
+// 社区资讯-列表wuYe:news:list
+export function newsList(data) {
+  return request({
+    url: '/wuYe/news/list',
+    method: 'get',
+    'data': data
+  })
+}
+// 社区资讯-详情wuYe:news:query
+export function newsDet(data) {
+  return request({
+    url: '/wuYe/news/'+data,
+    method: 'get',
+  })
+}
+
+// 员工培训手册-新增wuYe:manual:add
+export function manualAdd(data) {
+  return request({
+    url: '/wuYe/manual',
+    method: 'post',
+    'data': data
+  })
+}
+// 员工培训手册-修改wuYe:manual:edit
+export function manualPut(data) {
+  return request({
+    url: '/wuYe/manual/put',
+    method: 'post',
+    'data': data
+  })
+}
+// 员工培训手册-删除wuYe:manual:remove
+export function manualDel(data) {
+  return request({
+    url: '/wuYe/manual/delete/'+data,
+    method: 'get',
+  })
+}
+//员工培训手册-列表wuYe:manual:list
+export function manualList(data) {
+  return request({
+    url: '/wuYe/manual/list',
+    method: 'get',
+    'data': data
+  })
+}
+// 员工培训手册-详情wuYe:manual:query
+export function manualDet(data) {
+  return request({
+    url: '/wuYe/manual/'+data,
+    method: 'get',
+  })
+}
+//获取已读人员名单wuYe:getRead:add
+export function manualgetRead(data) {
+  return request({
+    url: '/wuYe/manual/getRead',
+    method: 'post',
+    'data': data
+  })
+}
+//员工培训时长-列表wuYe:staffTrainTime:list
+export function staffTrainTimeList(data) {
+  return request({
+    url: '/wuYe/staffTrainTime/list',
+    method: 'get',
+    'data': data
+  })
+}
+//员工培训时长-新增wuYe:staffTrainTime:add
+export function staffTrainTime(data) {
+  return request({
+    url: '/wuYe/staffTrainTime',
+    method: 'post',
+    'data': data
+  })
+}

+ 8 - 0
property_ui/api/work/people.js

@@ -116,4 +116,12 @@ export function staffDel(data) {
     url: '/wuYe/staffManage/delete/'+data,
     method: 'get',
   })
+}
+// 员工管理-列表不分页wuYe:staffManage:listNoPage
+export function stafflistNoPage(data) {
+  return request({
+    url: '/wuYe/staffManage/listNoPage',
+    method: 'get',
+	'data': data
+  })
 }

+ 84 - 3
property_ui/api/work/service.js

@@ -101,9 +101,90 @@ export function xgdjlCount(data) {
   })
 }
 
+// 投诉建议-新增wuYe:suggestion:add
+export function suggestionAdd(data) {
+  return request({
+    url: '/wuYe/suggestion',
+    method: 'post',
+    'data': data
+  })
+}
+// 投诉建议-修改wuYe:suggestion:edit
+export function suggestionlPut(data) {
+  return request({
+    url: '/wuYe/suggestion/put',
+    method: 'post',
+    'data': data
+  })
+}
+// 投诉建议-删除wuYe:suggestion:remove
+export function suggestionlDel(data) {
+  return request({
+    url: '/wuYe/suggestion/delete/'+data,
+    method: 'get',
+  })
+}
+// 投诉建议-列表wuYe:suggestion:list
+export function suggestionlList(data) {
+  return request({
+    url: '/wuYe/suggestion/list',
+    method: 'get',
+    'data': data
+  })
+}
+// 投诉建议-详情wuYe:suggestion:query
+export function suggestionlDet(data) {
+  return request({
+    url: '/wuYe/suggestion/'+data,
+    method: 'get',
+  })
+}
 
-
-
-
+// 物业报修-新增wuYe:repair:add
+export function repairAdd(data) {
+  return request({
+    url: '/wuYe/repair',
+    method: 'post',
+    'data': data
+  })
+}
+// 物业报修-修改wuYe:repair:edit
+export function repairPut(data) {
+  return request({
+    url: '/wuYe/repair/put',
+    method: 'post',
+    'data': data
+  })
+}
+// 物业报修-删除wuYe:repair:remove
+export function repairDel(data) {
+  return request({
+    url: '/wuYe/repair/delete/'+data,
+    method: 'get',
+  })
+}
+// 物业报修-列表wuYe:repair:list
+export function repairList(data) {
+  return request({
+    url: '/wuYe/repair/list',
+    method: 'get',
+    'data': data
+  })
+}
+// 物业报修-详情wuYe:repair:query
+export function repairDet(data) {
+  return request({
+    url: '/wuYe/repair/'+data,
+    method: 'get',
+  })
+}
+// 物业报修-指派物业报修人员wuYe:repair:assign
+export function repairAssign(data) {
+  return request({
+    url: '/wuYe/repair/assign',
+    method: 'post',
+    'data': data
+  })
+}
 
 

+ 5 - 1
property_ui/car/pages/illegalrecord.vue

@@ -134,8 +134,12 @@
 			},
 			getLiftFn(){
 				var that=this;
-				var params=JSON.parse(JSON.stringify(this.datainfo));
+				var info=JSON.parse(JSON.stringify(this.datainfo));
+				var params={};
+				params.plateNumber=info.plateNumber;
+				params.illegalParkingId=info.illegalParkingId;
 				params.isBlack="N"
+				// 车牌号,id,isblace
 				illegalParkingCancel(params).then(res=>{
 					if(res.code==200){
 						this.$toast("解除成功")

+ 174 - 77
property_ui/manage/components/car/list.vue

@@ -261,102 +261,114 @@
 				</view>
 			</view>
 		</block>
-		<!-- 投诉建议 -->
-		<block v-if="type=='complaint'">
-			<view class="walists" v-for="(ite,idx) in datainfo" :key="idx" @click="getDetail"
-				:data-idx="idx"
-				@touchstart="drawStart" @touchmove="drawMove" @touchend="drawEnd" :style="'right:'+ite.right+'px'"
-			>
-				<view class="watop watopcom">
-					<view class="watit">
-						<view class="tit">小区电梯老化</view>
-						<view class="txt co01" v-if="ite.type==1">待回复</view>
-						<view class="txt coa" v-if="ite.type==2">已回复</view>
-					</view>
-					<view class="watopcoma overtwo">小区电梯时常发生问题,请物业派维修人员进行安全检 查,若无法排除问题,建议更换小区的电梯设备,避…</view>
-					<view class="watopcomb">2024-11-18 08:16:54</view>
-				</view>
-				<!--  -->
-				<view class="spdel" v-if="ite.right>0" @click.stop="getDelFn()">删除</view>
-			</view>
-			<!-- checkPermi(['system:menuFood:remove'])&& -->
-			
-		</block>
 		<!-- 党建资讯 -->
 		<block v-if="type=='newsdj'">
-			<view class="newlists" v-for="(ite,idx) in datainfo" :key="idx" @click="getDetail" 
+			<view class="newlists pr" v-for="(ite,idx) in datainfo" :key="idx" @click="getDetail(ite.partyId)" 
+			:data-idx="idx"
+			@touchstart="drawStart" @touchmove="drawMove" @touchend="drawEnd" :style="'right:'+ite.right+'px'"
 			>
-				<view class="tit">潜山:多举措建优非公党建工作指导员队伍</view>
-				<view class="txt overtwo">如何不断激发非公企业和社会组织党建工作新活力?潜山市委社 会工作部发挥考核的指挥棒作用,“三点发力”推动党建工作部…</view>
-				<view class="stabox flexc">
-					<view class="time flex1">2024-11-18 08:16:54</view>
-					<view class="btns flexc">
-						<!-- <image :src="star" class="imga"></image>42 -->
-						<image :src="stara" class="imga"></image>42
+				<view class="watopcom">
+					<view class="tit">{{ite.partyTitle}}</view>
+					<view class="txt overtwo">
+						<rich-text :nodes="ite.partyContent"></rich-text>
+					<!-- {{ite.partyContent}} -->
 					</view>
-					<view class="btns flexc">
-						<image :src="eye" class="imgb"></image>1361
+					<view class="stabox flexc">
+						<view class="time flex1">{{ite.publishTime}}</view>
+						<view class="btns flexc">
+							<!-- <image :src="star" class="imga"></image>42 -->
+							<image :src="stara" class="imga"></image>42
+						</view>
+						<view class="btns flexc">
+							<image :src="eye" class="imgb"></image>{{ite.viewCount}}
+						</view>
 					</view>
 				</view>
-
+				<view class="spdel" v-if="ite.right>0&&checkPermi(['wuYe:partyIds:remove'])" @click.stop="getDelFn(ite.partyId)">删除</view>
 			</view>
 			<!-- checkPermi(['system:menuFood:remove'])&& -->
 		</block>
 		<!-- 社区资讯 -->
 		<block v-if="type=='newssq'">
-			<view class="walists" v-for="(ite,idx) in datainfo" :key="idx" @click="getDetail">
-				<view class="watop watopcom">
-					<view class="watit">
-						<view class="tit">物业服务费缴费公告<text class="cir"></text></view>
+			<view class="walists" v-for="(ite,idx) in datainfo" :key="idx" @click="getPut(ite.communityId)"
+				:data-idx="idx"
+				@touchstart="drawStart" @touchmove="drawMove" @touchend="drawEnd" :style="'right:'+ite.right+'px'"
+			>
+				<view class="watopcom">
+					<view class="watop ">
+						<view class="watit">
+							<view class="tit">{{ite.communityTitle}}<text class="cir"></text></view>
+						</view>
+						<view class="watopcoma overtwo">
+							<rich-text :nodes="ite.communityContent"></rich-text>
+						</view>
+						<view class="watopcomb">{{ite.publishTime}}</view>
+					</view>
+					<view class="wabtn" @click.stop="getDetail(ite.communityId)">
+						<view>查看详情</view>
+						<image :src="rimg"></image>
 					</view>
-					<view class="watopcoma overtwo">尊敬的各位业主:为更好地提供优质小区环境,保障小区 公共区域设施设备正常的运行,现收取2024年度物业…</view>
-					<view class="watopcomb">2024-11-18 08:16:54</view>
-				</view>
-				<view class="wabtn">
-					<view>查看详情</view>
-					<image :src="rimg"></image>
 				</view>
+				<view class="spdel" v-if="ite.right>0&&checkPermi(['wuYe:news:remove'])" @click.stop="getDelFn(ite.communityId)">删除</view>
 			</view>
 		</block>
 		<!-- 员工图文 -->
 		<block v-if="type=='ystv'">
-			<view class="walists" v-for="(ite,idx) in datainfo" :key="idx" @click="getDetail">
-				<view class="watop watopcom" style="padding-bottom: 22rpx !important;">
-					<view class="watit">
-						<view class="tit">1.3 业务流程与工作规范</view>
-					</view>
-					<view class="watopcoma overtwo">业主入住与退房流程、维修报修流程、安全防范措施与应
-急处理、公共区域维护与清洁、物业费收缴与开支管理…</view>
-						
-						<view class="flexcj">
-							<view class="watopcomb">2024-11-18 08:16:54</view>
-							<!-- 管理员 -->
-							<view class="f12 cofe fw5" @click="getReadlist">已读名单</view>
-							<!-- 员工 -->
-							<view class="f12 co27 fw5" >进度:100%</view>
+			<view class="walists" v-for="(ite,idx) in datainfo" :key="idx" @click="getPut(ite.manualId)"
+				:data-idx="idx"
+				@touchstart="drawStart" @touchmove="drawMove" @touchend="drawEnd" :style="'right:'+ite.right+'px'"
+			>
+				<view class="watopcom">
+					<view class="watop " style="padding-bottom: 22rpx !important;">
+						<view class="watit">
+							<view class="tit">{{ite.manualTitle}}</view>
+						</view>
+						<view class="watopcoma overtwo">
+							<rich-text :nodes="ite.manualContent"></rich-text>
 						</view>
-					
+							
+							<view class="flexcj">
+								<view class="watopcomb">{{ite.publishTime}}</view>
+								<!-- 管理员 -->
+								<view class="f12 cofe fw5" @click.stop="getReadlist" v-if="checkPermi(['wuYe:getRead:add'])">已读名单</view>
+								<!-- 员工 -->
+								<view class="f12 co27 fw5" >进度:{{ite.progress||0}}%</view>
+							</view>
+					</view>
+					<view class="wabtn" @click.stop="getDetail(ite.manualId)">
+						<view>查看详情</view>
+						<image :src="rimg"></image>
+					</view>
 				</view>
+				
+				<view class="spdel" v-if="ite.right>0&&checkPermi(['wuYe:news:remove'])" @click.stop="getDelFn(ite.manualId)">删除</view>
 			</view>
 		</block>
 		<!-- 员工视频 -->
 		<block v-if="type=='ygsp'">
-			<view class="videolists flex" v-for="(ite,idx) in datainfo" :key="idx" @click="getDetail">
-				<view class="flex0 mr12">
-					<video class="videos" id="myVideo" src="https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/2minute-demo.mp4"
-					      @error="videoErrorCallback" :danmu-list="danmuList" enable-danmu danmu-btn controls></video>
-				</view>
-				<view class="flex1 over	titbox">
-					<view class="tit over">1.3 业务流程与工作规范</view>
-					<view class="flexcj">
-						<view class="num">03:41</view>
-						<!-- 管理员 -->
-						<view class="f12 cofe fw5" @click="getReadlist">已读名单</view>
-						<!-- 员工 -->
-						<view class="f12 co27 fw5" >进度:100%</view>
+			<view class="videolists flex pr" v-for="(ite,idx) in datainfo" :key="idx" @click="getDetail(ite.manualId)"
+				:data-idx="idx"
+				@touchstart="drawStart" @touchmove="drawMove" @touchend="drawEnd" :style="'right:'+ite.right+'px'"
+			>
+				<view class="watopcom flex flex1">
+					<view class="flex0 mr12" @click.stop="getTime(idx)">
+						<video class="videos" :ref="`video${idx}`"  :src="baseUrl+ite.videoUrl" @pause="getPause" @timeupdate='onTimeUpdate' @loadedmetadata="onLoadedmetadata" @play="handlePlay(idx)" :data-id="ite.manualId"
+						:data-idx="idx" :data-progress="ite.progress" :data-putflag="ite.putflag" :data-time="ite.initialtime" 	
+						      @error="videoErrorCallback"   controls></video>
+					</view>
+					<view class="flex1 over	titbox">
+						<view class="tit over">{{ite.manualTitle}}</view>
+						<view class="flexcj">
+							<view class="num">{{ite.duration}}</view>
+							<!-- 管理员 -->
+							<view class="f12 cofe fw5" @click.stop="getReadlist">已读名单</view>
+							<!-- 员工 -->
+							<view class="f12 co27 fw5">进度:{{ite.progress||0}}%</view>
+						</view>
+						<view class="time">{{ite.publishTime}}</view>
 					</view>
-					<view class="time">2024-11-18 08:16:54</view>
 				</view>
+				<view class="spdel" v-if="ite.right>0&&checkPermi(['wuYe:manual:remove'])" @click.stop="getDelFn(ite.manualId)">删除</view>
 			</view>
 		</block>
 		<!-- 阅读名单 -->
@@ -365,8 +377,8 @@
 				<image class="head" :src="man" v-if="ite.sex==0"></image>
 				<image class="head" :src="woman" v-else></image>
 				<view class="flex1">
-					<view class="tit">袁玥</view>
-					<view class="time"><text>阅读时间 |</text> 2024-12-01   18:37:56</view>
+					<view class="tit">{{ite.searchValue}}</view>
+					<view class="time"><text>阅读时间 |</text> {{ite.time}}</view>
 				</view>
 			</view>
 		</block>
@@ -375,8 +387,8 @@
 				<image class="head" :src="man" v-if="ite.sex==0"></image>
 				<image class="head" :src="woman" v-else></image>
 				<view class="flex1">
-					<view class="tit">袁玥</view>
-					<view class="time"><text>阅读总时长 |</text> 8小时54分31秒</view>
+					<view class="tit">{{ite.staffName}}</view>
+					<view class="time"><text>阅读总时长 |</text> {{kaTime(ite.staffTime)}}</view>
 				</view>
 			</view>
 		</block>
@@ -457,12 +469,78 @@
 			getDetail(e){
 				this.$emit('getDetail',e)
 			},
+			getPut(e){
+				this.$emit('getPut',e)
+			},
 			getAddFn(e){
 				this.$emit('getAddFn',e)
 			},
 			getReadlist(e){
 				this.$emit('getReadlist',e)
 			},
+			getTime(idx){
+				console.log(idx)
+			},
+			kaTime(minutes){
+				// 分钟转换成小时
+				const hours = Math.floor(minutes / 60);
+				const mins = minutes % 60;
+				const formattedMins = mins < 10 ? `0${mins}` : mins;
+				return `${hours}小时${formattedMins}分钟`;
+				// console.log(a)
+			},
+			getPause(e){
+				var idx=e.currentTarget.dataset.idx;
+				var id=e.currentTarget.dataset.id;
+				var pro=e.currentTarget.dataset.progress||0;
+				var putflag=e.currentTarget.dataset.putflag;
+				if(putflag){
+					var obj={
+						id:id,
+						progress:pro
+					}
+					this.$emit('getPause',obj)
+					this.datainfo[idx].putflag=false;
+				}
+			},
+			handlePlay(idx){
+				var list=JSON.parse(JSON.stringify(this.datainfo))
+				list.forEach((ref,index) => {
+				    if (idx != index) {
+				         this.$refs[`video${index}`][0].pause();
+				    }
+				});
+			},
+			onTimeUpdate(e){
+				var idx=e.currentTarget.dataset.idx;
+				var pro=e.currentTarget.dataset.progress||0;
+				var currentTime=e.detail.currentTime;//当前
+				var duration=e.detail.duration;//总的
+				var progress=((currentTime / duration) * 100).toFixed(2);
+				if(Number(pro)<Number(progress)){
+					this.datainfo[idx].progress=progress;
+					this.datainfo[idx].putflag=true;	
+				}
+			},
+			onLoadedmetadata(e){
+				var idx=e.currentTarget.dataset.idx;
+				var val=e.detail.duration;
+				var time=this.convertSecondsToHMS(e.detail.duration);
+				var pro=e.currentTarget.dataset.progress||0;
+				this.datainfo[idx].duration=this.convertSecondsToHMS(e.detail.duration);
+				// this.datainfo[idx].initialtime=Math.floor((pro/100)*val);
+				var s=Math.floor((pro/100)*val)
+				this.$refs[`video${idx}`][0].seek(s);
+			},
+			convertSecondsToHMS(seconds) {
+			  const h = Math.floor(seconds / 3600);
+			  const min = Math.floor((seconds % 3600) / 60);
+			  const s = Math.floor(seconds % 60);
+			 var timeStr = (h < 10 ? ('0' + h) : h) + ':' + (min < 10 ? ('0' + min) : min) + ':' + (s < 10 ? (
+			 	'0' + s) : s);
+			  // return `${hours}小时 ${minutes}分钟 ${remainingSeconds}秒`;
+			  return timeStr;
+			},
 			getZhan(idx){
 				// var obj=JSON.parse(JSON.stringify(this.datainfo))[idx]
 				// obj.zhanflag=!obj.zhanflag;
@@ -482,6 +560,21 @@
 					fail: function(err) {}
 				});
 			},
+			getDelFn(id){
+				var that=this;
+				uni.showModal({
+					title: '确认删除',
+					content: "是否确认删除",
+					cancelText: '取消',
+					confirmText: '确认',
+					success: function(res) {
+						if (res.confirm) {
+							that.$emit('getDelFn',id)
+						} else if (res.cancel) {
+						}
+					}
+				});
+			},
 			//开始触摸滑动
 			drawStart(e) {
 				// console.log("开始触发");
@@ -655,15 +748,19 @@ font-size: 26rpx;color: #272727;display: flex;line-height: 34rpx;
 		
 	}
 }
-.watopcom{background-color: #ffffff;border-radius: 20rpx;position: relative;z-index: 1;padding-bottom: 30rpx !important;
+// padding-bottom: 30rpx !important;
+.watopcom{background-color: #ffffff;border-radius: 20rpx;position: relative;z-index: 1;
 	.watopcoma{font-weight: 500;font-size: 26rpx;color: #666666;line-height: 36rpx;margin-bottom: 24rpx;}
 	.watopcomb{font-weight: 500;font-size: 24rpx;color: #AAAAAA;}
 	
 }
 //资讯
 .newlists{
-	background: #FFFFFF;padding: 22rpx 24rpx;margin-bottom: 24rpx;
+	background: #FFFFFF;margin-bottom: 24rpx;
 	border-radius: 20rpx;
+	.watopcom{
+		padding: 22rpx 24rpx;
+	}
 	.tit{font-size: 32rpx;font-weight: bold;color: #272727;line-height: 48rpx;margin-bottom:16rpx;}
 	.txt{font-size: 24rpx;color: #666666;line-height: 36rpx;margin-bottom: 32rpx;}
 	.stabox{

+ 8 - 0
property_ui/manage/components/editor/editor.vue

@@ -82,6 +82,14 @@
 </template>
 <script>
 	export default {
+		props:{
+			// readOnly:{
+			// 	type: Boolean,
+			// 	default () {
+			// 		return false
+			// 	}
+			// },
+		},
 		data() {
 			return {
 				readOnly: false,

+ 1 - 1
property_ui/manage/components/nodata/nodata.vue

@@ -33,7 +33,7 @@
 // 无数据
 .nodata{
 	display: flex;flex-direction: column;align-items: center;box-sizing: border-box;padding-bottom: 100rpx;
-	image{width: 456rpx;height: 178rpx;margin-bottom: 28rpx;}
+	image{width: 440rpx;height: 440rpx;margin-bottom: 28rpx;}
 	view{font-size: 30rpx;color: #AAAAAA;font-weight: bold;}
 }	
 </style>

+ 391 - 39
property_ui/manage/pages/community/newsadd.vue

@@ -1,38 +1,106 @@
 <template>
 	<view class="check">
 		<uni-forms ref="form" :model="datainfo">
-			<!-- <view class="cbox">
+			<view class="cbox">
 				<view class="chmain">
-					<uni-forms-item label="文章类型" name="phonenumber">
-						<picker range-key='dictLabel' :value="syqxidx" :range="sexs"   @change='bindDateChange'>
+					<uni-forms-item label="发布时间" name="publishTime">
+						<picker mode="date" :disabled="isdisabled" @change='bindDateChangeb'>
 							<view class="flexc">
-								<view class="flex1 txr f13" :class="datainfo.iszc?'co27':'coa'">{{datainfo.iszc?'是':'请选择文章类型'}}</view>
+								<view class="flex1 txr f13"  :class="datainfo.publishTime?'co27':'coa'">{{datainfo.publishTime||"请选择发布时间"}}</view>
 								<view class="rimg"><image :src="rimg"></image></view>
 							</view>
 						</picker>
 					</uni-forms-item>
+					<uni-forms-item label="是否启用" name="status">
+						<view class="flexc" @click="getChangeFn">
+							<view class="flex1"></view>
+							<image :src="check" v-if="datainfo.status=='0'" class="checkimg"></image>
+							<image :src="ncheck" v-else class="checkimg"></image>
+						</view>
+					</uni-forms-item>
+					<!-- <uni-forms-item label="是否置顶" name="isTop">
+						<picker range-key='dictLabel' :disabled="isdisabled" :value="sfztidx" :range="sfztList"   @change='bindDateChangea'>
+							<view class="flexc">
+								<view class="flex1 txr f13 co27" v-if="datainfo.isTop&&!sfzt">{{statusFormats(datainfo.isTop,sfztList,'sfzt')}}</view>
+								<view class="flex1 txr f13" v-else :class="sfzt?'co27':'coa'">{{sfzt||"请选择是否置顶"}}</view>
+								<view class="rimg"><image :src="rimg"></image></view>
+							</view>
+						</picker>
+					</uni-forms-item> -->
 				</view>
-			</view> -->
+			</view>
 			<view class="cbox">
-				<view class="chmain">
-					<uni-forms-item label-width='0'  name="phonenumber">
-						<uni-easyinput type="textarea" autoHeight v-model="datainfo.phonenumber" :inputBorder='false' placeholder="输入标题" />
+				<view class="chmain pb10">
+					<uni-forms-item label-width='0'  name="manualTitle">
+						<uni-easyinput type="textarea" :disabled="isdisabled" autoHeight v-model="datainfo.manualTitle" :inputBorder='false' placeholder="输入标题" />
 					</uni-forms-item>
 					<view>
-						<editor-box></editor-box>
-					</view>
-					<!-- <uni-forms-item label="文章类型" name="phonenumber">
-						<view class="flexc">
-							
-							<picker range-key='dictLabel' :value="syqxidx" :range="sexs"   @change='bindDateChange'>
-								<view class="rimg"><image :src="rimg"></image></view>
-							</picker>
+						<view class='toolbar' @tap="format">
+							<view :class="formats.bold ? 'ql-active' : ''" class="iconfont icon-zitijiacu" data-name="bold"></view>
+							<view :class="formats.italic ? 'ql-active' : ''" class="iconfont icon-zitixieti" data-name="italic"></view>
+							<view :class="formats.underline ? 'ql-active' : ''" class="iconfont icon-zitixiahuaxian" data-name="underline"></view>
+							<view :class="formats.strike ? 'ql-active' : ''" class="iconfont icon-zitishanchuxian" data-name="strike"></view>
+							<view :class="formats.align === 'left' ? 'ql-active' : ''" class="iconfont icon-zuoduiqi" data-name="align"
+							 data-value="left"></view>
+							<view :class="formats.align === 'center' ? 'ql-active' : ''" class="iconfont icon-juzhongduiqi" data-name="align"
+							 data-value="center"></view>
+							<view :class="formats.align === 'right' ? 'ql-active' : ''" class="iconfont icon-youduiqi" data-name="align"
+							 data-value="right"></view>
+							<view :class="formats.align === 'justify' ? 'ql-active' : ''" class="iconfont icon-zuoyouduiqi" data-name="align"
+							 data-value="justify"></view>
+							<view :class="formats.lineHeight ? 'ql-active' : ''" class="iconfont icon-line-height" data-name="lineHeight"
+							 data-value="2"></view>
+							<view :class="formats.letterSpacing ? 'ql-active' : ''" class="iconfont icon-Character-Spacing" data-name="letterSpacing"
+							 data-value="2em"></view>
+							<view :class="formats.marginTop ? 'ql-active' : ''" class="iconfont icon-722bianjiqi_duanqianju" data-name="marginTop"
+							 data-value="20px"></view>
+							<view :class="formats.previewarginBottom ? 'ql-active' : ''" class="iconfont icon-723bianjiqi_duanhouju"
+							 data-name="marginBottom" data-value="20px"></view>
+							<view class="iconfont icon-clearedformat" @tap="removeFormat"></view>
+							<view :class="formats.fontFamily ? 'ql-active' : ''" class="iconfont icon-font" data-name="fontFamily" data-value="Pacifico"></view>
+							<view :class="formats.fontSize === '24px' ? 'ql-active' : ''" class="iconfont icon-fontsize" data-name="fontSize"
+							 data-value="24px"></view>
+						
+							<view :class="formats.color === '#0000ff' ? 'ql-active' : ''" class="iconfont icon-text_color" data-name="color"
+							 data-value="#0000ff"></view>
+							<view :class="formats.backgroundColor === '#00ff00' ? 'ql-active' : ''" class="iconfont icon-fontbgcolor"
+							 data-name="backgroundColor" data-value="#00ff00"></view>
+						
+							<view class="iconfont icon-date" @tap="insertDate"></view>
+							<view class="iconfont icon--checklist" data-name="list" data-value="check"></view>
+							<view :class="formats.list === 'ordered' ? 'ql-active' : ''" class="iconfont icon-youxupailie" data-name="list"
+							 data-value="ordered"></view>
+							<view :class="formats.list === 'bullet' ? 'ql-active' : ''" class="iconfont icon-wuxupailie" data-name="list"
+							 data-value="bullet"></view>
+							<view class="iconfont icon-undo" @tap="undo"></view>
+							<view class="iconfont icon-redo" @tap="redo"></view>
+						
+							<view class="iconfont icon-outdent" data-name="indent" data-value="-1"></view>
+							<view class="iconfont icon-indent" data-name="indent" data-value="+1"></view>
+							<view class="iconfont icon-fengexian" @tap="insertDivider"></view>
+							<view class="iconfont icon-charutupian" @tap="insertImage"></view>
+							<view :class="formats.header === 1 ? 'ql-active' : ''" class="iconfont icon-format-header-1" data-name="header"
+							 :data-value="1"></view>
+							<view :class="formats.script === 'sub' ? 'ql-active' : ''" class="iconfont icon-zitixiabiao" data-name="script"
+							 data-value="sub"></view>
+							<view :class="formats.script === 'super' ? 'ql-active' : ''" class="iconfont icon-zitishangbiao" data-name="script"
+							 data-value="super"></view>
+							<view class="iconfont icon-shanchu" @tap="clear"></view>
+							<view :class="formats.direction === 'rtl' ? 'ql-active' : ''" class="iconfont icon-direction-rtl" data-name="direction"
+							 data-value="rtl"></view>
+						
 						</view>
-					</uni-forms-item> -->
+						
+						<editor id="editor" class="ql-container" placeholder="开始输入..." showImgSize showImgToolbar showImgResize
+						 @statuschange="onStatusChange" :read-only="isdisabled" @ready="onEditorReady">
+						</editor>
+						<!-- <editor-box ></editor-box> -->
+					</view>
 				</view>
 			</view>
 		</uni-forms>
-		<view class="rfbtn">发布</view>
+		<view class="rfbtn" @click="getEditFn" v-if="isdisabled">修改</view>
+		<view class="rfbtn" @click="getSubmit" v-else>发布</view>
 		<loading></loading>
 	</view>
 </template>
@@ -41,6 +109,9 @@
 	import config from '@/config'
 	import editorBox from "@/manage/components/editor/editor.vue"
 	import {checkPermi,checkRole} from "@/utils/permission"; // 权限判断函数
+	import {getDictionaryFn} from "@/api/system/user.js"
+	import {selectValueKey,uploadmore} from "@/utils/common.js"
+	import {manualAdd,manualPut,manualDet} from "@/api/work/manage.js"
 	export default {
 		components: {editorBox},
 		data() {
@@ -48,37 +119,274 @@
 				rimg: require('@/people/static/people/rimg.png'),
 				baseUrl: config.baseUrl,
 				checkflag:true,
+				check: require('@/people/static/people/check.png'),
+				ncheck: require('@/people/static/people/ncheck.png'),
 				datainfo: {
-					sex:0,
-					realName: '',
-					idCard: '',
-					address: '',
-					expirationDate: '',
-					phonenumber: '',
-					front: '',
-					back: '',
+					// "manualId":"员工培训手册ID",
+					"manualTitle":"",//员工培训手册标题
+					"manualType":"1",//员工培训手册类型(1:图片 2:视频)
+					"manualContent":"",//员工培训手册内容
+					"status":"0",//员工培训手册状态
+					"publishTime":"",//发布时间
+					// "videoUrl":"视频地址URL",
+					// "coverImage":"封面图片",
+					// "author":"作者",
+					// "source":"来源",
+					// "viewCount":"浏览次数",
+					// "isTop":"是否置顶:Y(置顶)、N(不置顶)"
 				},
-				syqxidx:'',
-				sexs: [{
-					text: '男',
-					value: 0
-				}, {
-					text: '女',
-					value: 1
-				}],
+				formats: {},
+				readOnly: false,
+				wzlx:'',
+				wzlxidx:'0',
+				wzlxList:[],
+				sfzt:'否',
+				sfztidx:'1',
+				sfztList:[{dictLabel:'是',dictValue:'Y'},{dictLabel:'否',dictValue:'N'}],
+				id:'',
+				ptype:"add",
+				isdisabled:false,
+				editinfo:''
 			}
 		},
-		onLoad: function() {
-
+		onLoad: function(e) {
+			if(e.id){
+				this.id=e.id;
+				this.ptype='edit';
+				this.isdisabled=true;
+				this.getDetailFn()
+			}
 		},
 		methods: {
 			checkPermi,
 			checkRole,
+			getEditFn(){
+				this.isdisabled=false;
+			},
+			statusFormats(data, list,type) {
+				var aite=selectValueKey(list, data);
+				if(type=='wzlx'){
+					this.wzlxidx=aite.key
+				}else if(type=='sfzt'){
+					this.sfztidx=aite.key
+				}
+				return aite.actions;
+			},
 			bindDateChange(e){
 				var val=e.detail.value;
-				// this.datainfo.applicationBank=this.sdyhlist[val].value;
-				// this.applicationBank=this.sdyhlist[val].label;
+				this.datainfo.partyType=this.wzlxList[val].dictValue;
+				this.wzlx=this.wzlxList[val].dictLabel;
+			},
+			bindDateChangea(e){
+				var val=e.detail.value;
+				this.datainfo.isTop=this.sfztList[val].dictValue;
+				this.sfzt=this.sfztList[val].dictLabel;
+			},
+			bindDateChangeb(e){
+				var val=e.detail.value;
+				this.datainfo.publishTime=val;
+			},
+			getChangeFn(){
+				if(this.isdisabled){
+					return
+				}
+				if(this.datainfo.status=='0'){
+					this.datainfo.status='1'
+				}else{
+					this.datainfo.status='0'
+				}
+			},
+			init(){
+				// 发布类型
+				getDictionaryFn('publication_type').then(res=>{
+					if(res.code==200){
+						if(res.data){
+							this.wzlxList = res.data.map(v => {
+								return {
+									dictLabel: v.dictLabel,
+									dictValue: v.dictValue
+								}
+							})
+						}
+					}
+				})
+			},
+			getDetailFn(){
+				var that=this;
+				manualDet(this.id).then(res=>{
+					if(res.code==200){
+						this.datainfo=res.data;
+						var data=JSON.parse(JSON.stringify(res.data))
+						if(data.manualContent){
+							var fwbinfo=this.formatRichText(res.data.manualContent);
+							this.editinfo=fwbinfo;
+							uni.createSelectorQuery().select('#editor').context(function(res) {
+								that.editorCtx = res.context||'';
+								that.editorCtx.setContents({
+									html:fwbinfo
+								})
+							}).exec();
+						}
+					}
+				})
+			},
+			getSubmit(){
+				var that=this;
+				this.$refs.form.validate().then(res => {
+					var params=JSON.parse(JSON.stringify(this.datainfo))
+					if(!params.publishTime){
+						this.$toast('请选择发布时间')
+						return
+					}
+					if(!params.manualTitle){
+						this.$toast('请输入标题')
+						return
+					}
+					var infoContent=''
+					this.editorCtx.getContents({
+					    success: function(data) {
+							var s=data.html;
+					        infoContent=s.replace(/\<img src="(http?:\/\/)([^\/]+)(:\d+)?/g,'<img src="');
+					        infoContent=infoContent.replace(/\<img src="(https?:\/\/)([^\/]+)(:\d+)?/g,'<img src="');
+					    }  
+					}) 
+					params.manualContent=infoContent;
+					if(this.ptype=='add'){
+						manualAdd(params).then(res=>{
+							if(res.code==200){
+								this.$toast("新增成功")
+								setTimeout(function(){
+									uni.$emit("newsygList")
+									uni.navigateBack({
+										delta:1
+									})
+								},1500)
+							}
+						})
+					}else{
+						manualPut(params).then(res=>{
+							if(res.code==200){
+								this.$toast("修改成功")
+								setTimeout(function(){
+									uni.$emit("newsygList")
+									uni.navigateBack({
+										delta:1
+									})
+								},1500)
+							}
+						})
+					}
+					
+				})
 			},
+			//解析富文本方法
+			formatRichText(html) {
+					let newContent = html.replace(/<img[^>]*>/gi, function(match, capture) {
+						match = match.replace(/style="[^"]+"/gi, '').replace(/style='[^']+'/gi, '').replace(/style=""/gi, '');
+						match = match.replace(/width="[^"]+"/gi, '').replace(/width='[^']+'/gi, '');
+						match = match.replace(/height="[^"]+"/gi, '').replace(/height='[^']+'/gi, '');
+						return match;
+					});
+					newContent = newContent.replace(/style="[^"]+"/gi, function(match, capture) {
+						match = match.replace(/width:[^;]+;/gi, 'max-width:100%;').replace(/width:[^;]+;/gi, 'max-width:100%;');
+						return match;
+					});
+					newContent = newContent.replace(/<br[^>]*\/>/gi, '');
+					newContent = newContent.replace(/\<img src="/gi,
+						'<img style="max-width:100%;height:auto;display:block;margin:10rpx auto;" src="' +this.baseUrl);
+					return newContent;
+			},
+			readOnlyChange() {
+				this.readOnly = !this.readOnly
+			},
+			onEditorReady() {
+				var that=this;
+				// #ifdef MP-BAIDU
+				this.editorCtx = requireDynamicLib('editorLib').createEditorContext('editor');
+				// #endif
+			
+				// #ifdef APP-PLUS || MP-WEIXIN || H5
+				uni.createSelectorQuery().select('#editor').context((res) => {
+					this.editorCtx = res.context
+					that.editorCtx.setContents({
+						html:that.editinfo
+					})
+				}).exec()
+				// #endif
+			},
+			undo() {
+				this.editorCtx.undo()
+			},
+			redo() {
+				this.editorCtx.redo()
+			},
+			format(e) {
+				let {
+					name,
+					value
+				} = e.target.dataset
+				if (!name) return
+				// console.log('format', name, value)
+				this.editorCtx.format(name, value)
+			},
+			onStatusChange(e) {
+				const formats = e.detail
+				this.formats = formats
+			},
+			insertDivider() {
+				this.editorCtx.insertDivider({
+					success: function() {
+						console.log('insert divider success')
+					}
+				})
+			},
+			clear() {
+				uni.showModal({
+					title: '清空编辑器',
+					content: '确定清空编辑器全部内容?',
+					success: res => {
+						if (res.confirm) {
+							this.editorCtx.clear({
+								success: function(res) {
+									console.log("clear success")
+								}
+							})
+						}
+					}
+				})
+			},
+			removeFormat() {
+				this.editorCtx.removeFormat()
+			},
+			insertDate() {
+				const date = new Date()
+				const formatDate = `${date.getFullYear()}/${date.getMonth() + 1}/${date.getDate()}`
+				this.editorCtx.insertText({
+					text: formatDate
+				})
+			},
+			insertImage() {
+				var that=this;
+				uni.chooseImage({
+					count: 1,
+					success: (res) => {
+						let img= res.tempFilePaths;
+						let imglen = res.tempFilePaths.length;
+						var fuwufile = [];
+						uploadmore('/common/upload',img,0,0,0,imglen,fuwufile,function(rs){
+							var url=that.baseUrl+rs[0];
+							that.editorCtx.insertImage({
+								src: url,
+								alt: '图像',
+								success: function() {
+									console.log('insert image success')
+								}
+							})
+						})	
+						
+					}
+				})
+			}
 		}
 	}
 </script>
@@ -100,9 +408,10 @@
 .check /deep/ .uni-data-checklist{flex: 0 0 auto;}
 .check{min-height: 100vh;padding: 20rpx 18rpx 110rpx;box-sizing: border-box;}
 .cbox{background: #FFFFFF;border-radius: 20rpx;flex: 1;margin-bottom: 24rpx;
+// min-height: calc(100vh - 140rpx);
 
 	.chmain{
-		padding: 0 32rpx;
+		padding: 0 32rpx 0rpx;
 		.rimg{width: 16rpx;height: 28rpx;flex: 0 0 auto;margin-left: 20rpx;
 			image{width: 100%;height: 100%;}
 		}
@@ -110,4 +419,47 @@
 	}
 	
 }
+@import "@/static/editor-icon.css";
+
+	.page-body {
+		height: calc(100vh - var(--window-top) - var(--status-bar-height));
+	}
+
+	.wrapper {
+		height: 100%;
+	}
+
+	.editor-wrapper {
+		height: calc(100vh - var(--window-top) - var(--status-bar-height) - 140px);
+		background: #fff;
+	}
+
+	.iconfont {
+		display: inline-block;
+		padding: 8px 8px;
+		width: 24px;
+		height: 24px;
+		cursor: pointer;
+		font-size: 20px;
+	}
+
+	.toolbar {
+		margin-bottom: 20rpx;
+		box-sizing: border-box;
+		border-bottom: 0;
+		font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
+	}
+
+	.ql-container {
+		box-sizing: border-box;
+		width: 100%;
+		min-height: 30vh;
+		height: 100%;
+		font-size: 16px;
+		line-height: 1.5;
+	}
+
+	.ql-active {
+		color: #06c;
+	}
 </style>

+ 399 - 28
property_ui/manage/pages/community/newsadddj.vue

@@ -3,23 +3,107 @@
 		<uni-forms ref="form" :model="datainfo">
 			<view class="cbox">
 				<view class="chmain">
-					<uni-forms-item label="文章类型" name="phonenumber">
-						<picker range-key='dictLabel' :value="syqxidx" :range="sexs"   @change='bindDateChange'>
+					<uni-forms-item label="文章类型" name="partyType">
+						<picker range-key='dictLabel' :disabled="isdisabled" :value="wzlxidx" :range="wzlxList"   @change='bindDateChange'>
 							<view class="flexc">
-								<view class="flex1 txr f13" :class="datainfo.iszc?'co27':'coa'">{{datainfo.iszc?'是':'请选择文章类型'}}</view>
+								<view class="flex1 txr f13 co27" v-if="datainfo.partyType&&!wzlx">{{statusFormats(datainfo.partyType,wzlxList,'wzlx')}}</view>
+								<view class="flex1 txr f13" v-else :class="wzlx?'co27':'coa'">{{wzlx||"请选择文章类型"}}</view>
 								<view class="rimg"><image :src="rimg"></image></view>
 							</view>
 						</picker>
 					</uni-forms-item>
+					<uni-forms-item label="发布时间" name="publishTime">
+						<picker mode="date" :disabled="isdisabled"  @change='bindDateChangeb'>
+							<view class="flexc">
+								<view class="flex1 txr f13"  :class="datainfo.publishTime?'co27':'coa'">{{datainfo.publishTime||"请选择发布时间"}}</view>
+								<view class="rimg"><image :src="rimg"></image></view>
+							</view>
+						</picker>
+					</uni-forms-item>
+					<uni-forms-item label="是否启用" name="status">
+						<view class="flexc" @click="getChangeFn">
+							<view class="flex1"></view>
+							<image :src="check" v-if="datainfo.status=='Y'" class="checkimg"></image>
+							<image :src="ncheck" v-else class="checkimg"></image>
+						</view>
+					</uni-forms-item>
+					<!-- <uni-forms-item label="是否置顶" name="isTop">
+						<picker range-key='dictLabel' :disabled="isdisabled" :value="sfztidx" :range="sfztList"   @change='bindDateChangea'>
+							<view class="flexc">
+								<view class="flex1 txr f13 co27" v-if="datainfo.isTop&&!sfzt">{{statusFormats(datainfo.isTop,sfztList,'sfzt')}}</view>
+								<view class="flex1 txr f13" v-else :class="sfzt?'co27':'coa'">{{sfzt||"请选择是否置顶"}}</view>
+								<view class="rimg"><image :src="rimg"></image></view>
+							</view>
+						</picker>
+					</uni-forms-item> -->
 				</view>
 			</view>
 			<view class="cbox">
-				<view class="chmain">
-					<uni-forms-item label-width='0'  name="phonenumber">
-						<uni-easyinput type="textarea" autoHeight v-model="datainfo.phonenumber" :inputBorder='false' placeholder="输入标题" />
+				<view class="chmain pb10">
+					<uni-forms-item label-width='0'  name="partyTitle">
+						<uni-easyinput type="textarea" :disabled="isdisabled" autoHeight v-model="datainfo.partyTitle" :inputBorder='false' placeholder="输入标题" />
 					</uni-forms-item>
 					<view>
-						<editor-box></editor-box>
+						<view class='toolbar' @tap="format">
+							<view :class="formats.bold ? 'ql-active' : ''" class="iconfont icon-zitijiacu" data-name="bold"></view>
+							<view :class="formats.italic ? 'ql-active' : ''" class="iconfont icon-zitixieti" data-name="italic"></view>
+							<view :class="formats.underline ? 'ql-active' : ''" class="iconfont icon-zitixiahuaxian" data-name="underline"></view>
+							<view :class="formats.strike ? 'ql-active' : ''" class="iconfont icon-zitishanchuxian" data-name="strike"></view>
+							<view :class="formats.align === 'left' ? 'ql-active' : ''" class="iconfont icon-zuoduiqi" data-name="align"
+							 data-value="left"></view>
+							<view :class="formats.align === 'center' ? 'ql-active' : ''" class="iconfont icon-juzhongduiqi" data-name="align"
+							 data-value="center"></view>
+							<view :class="formats.align === 'right' ? 'ql-active' : ''" class="iconfont icon-youduiqi" data-name="align"
+							 data-value="right"></view>
+							<view :class="formats.align === 'justify' ? 'ql-active' : ''" class="iconfont icon-zuoyouduiqi" data-name="align"
+							 data-value="justify"></view>
+							<view :class="formats.lineHeight ? 'ql-active' : ''" class="iconfont icon-line-height" data-name="lineHeight"
+							 data-value="2"></view>
+							<view :class="formats.letterSpacing ? 'ql-active' : ''" class="iconfont icon-Character-Spacing" data-name="letterSpacing"
+							 data-value="2em"></view>
+							<view :class="formats.marginTop ? 'ql-active' : ''" class="iconfont icon-722bianjiqi_duanqianju" data-name="marginTop"
+							 data-value="20px"></view>
+							<view :class="formats.previewarginBottom ? 'ql-active' : ''" class="iconfont icon-723bianjiqi_duanhouju"
+							 data-name="marginBottom" data-value="20px"></view>
+							<view class="iconfont icon-clearedformat" @tap="removeFormat"></view>
+							<view :class="formats.fontFamily ? 'ql-active' : ''" class="iconfont icon-font" data-name="fontFamily" data-value="Pacifico"></view>
+							<view :class="formats.fontSize === '24px' ? 'ql-active' : ''" class="iconfont icon-fontsize" data-name="fontSize"
+							 data-value="24px"></view>
+						
+							<view :class="formats.color === '#0000ff' ? 'ql-active' : ''" class="iconfont icon-text_color" data-name="color"
+							 data-value="#0000ff"></view>
+							<view :class="formats.backgroundColor === '#00ff00' ? 'ql-active' : ''" class="iconfont icon-fontbgcolor"
+							 data-name="backgroundColor" data-value="#00ff00"></view>
+						
+							<view class="iconfont icon-date" @tap="insertDate"></view>
+							<view class="iconfont icon--checklist" data-name="list" data-value="check"></view>
+							<view :class="formats.list === 'ordered' ? 'ql-active' : ''" class="iconfont icon-youxupailie" data-name="list"
+							 data-value="ordered"></view>
+							<view :class="formats.list === 'bullet' ? 'ql-active' : ''" class="iconfont icon-wuxupailie" data-name="list"
+							 data-value="bullet"></view>
+							<view class="iconfont icon-undo" @tap="undo"></view>
+							<view class="iconfont icon-redo" @tap="redo"></view>
+						
+							<view class="iconfont icon-outdent" data-name="indent" data-value="-1"></view>
+							<view class="iconfont icon-indent" data-name="indent" data-value="+1"></view>
+							<view class="iconfont icon-fengexian" @tap="insertDivider"></view>
+							<view class="iconfont icon-charutupian" @tap="insertImage"></view>
+							<view :class="formats.header === 1 ? 'ql-active' : ''" class="iconfont icon-format-header-1" data-name="header"
+							 :data-value="1"></view>
+							<view :class="formats.script === 'sub' ? 'ql-active' : ''" class="iconfont icon-zitixiabiao" data-name="script"
+							 data-value="sub"></view>
+							<view :class="formats.script === 'super' ? 'ql-active' : ''" class="iconfont icon-zitishangbiao" data-name="script"
+							 data-value="super"></view>
+							<view class="iconfont icon-shanchu" @tap="clear"></view>
+							<view :class="formats.direction === 'rtl' ? 'ql-active' : ''" class="iconfont icon-direction-rtl" data-name="direction"
+							 data-value="rtl"></view>
+						
+						</view>
+						
+						<editor id="editor" class="ql-container" placeholder="开始输入..." showImgSize showImgToolbar showImgResize
+						 @statuschange="onStatusChange" :read-only="isdisabled" @ready="onEditorReady">
+						</editor>
+						<!-- <editor-box ></editor-box> -->
 					</view>
 					<!-- <uni-forms-item label="文章类型" name="phonenumber">
 						<view class="flexc">
@@ -32,7 +116,8 @@
 				</view>
 			</view>
 		</uni-forms>
-		<view class="rfbtn">发布</view>
+		<view class="rfbtn" @click="getEditFn" v-if="isdisabled">修改</view>
+		<view class="rfbtn" @click="getSubmit" v-else>发布</view>
 		<loading></loading>
 	</view>
 </template>
@@ -41,6 +126,9 @@
 	import config from '@/config'
 	import editorBox from "@/manage/components/editor/editor.vue"
 	import {checkPermi,checkRole} from "@/utils/permission"; // 权限判断函数
+	import {getDictionaryFn} from "@/api/system/user.js"
+	import {selectValueKey,uploadmore} from "@/utils/common.js"
+	import {partyNewsDet,partyNewsPut,partyNewsAdd} from "@/api/work/manage.js"
 	export default {
 		components: {editorBox},
 		data() {
@@ -48,37 +136,277 @@
 				rimg: require('@/people/static/people/rimg.png'),
 				baseUrl: config.baseUrl,
 				checkflag:true,
+				check: require('@/people/static/people/check.png'),
+				ncheck: require('@/people/static/people/ncheck.png'),
 				datainfo: {
-					sex:0,
-					realName: '',
-					idCard: '',
-					address: '',
-					expirationDate: '',
-					phonenumber: '',
-					front: '',
-					back: '',
+					"partyTitle":"",//建资讯标题
+					"partyType":"",//建资讯类型(1:党建活动 2:党建学习3:党建知识)
+					"partyContent":"",//建资讯内容
+					"status":"0",//建资讯状态(0正常 1关闭)
+					"publishTime":"",//发布时间
+					// "coverImage":"封面图片",
+					// "author":"作者",
+					// "source":"来源",
+					// "viewCount":"浏览次数",
+					// "isTop":"N",//是否置顶:Y(置顶)、N(不置顶)
 				},
-				syqxidx:'',
-				sexs: [{
-					text: '男',
-					value: 0
-				}, {
-					text: '女',
-					value: 1
-				}],
+				formats: {},
+				readOnly: false,
+				wzlx:'',
+				wzlxidx:'0',
+				wzlxList:[],
+				sfzt:'否',
+				sfztidx:'1',
+				sfztList:[{dictLabel:'是',dictValue:'Y'},{dictLabel:'否',dictValue:'N'}],
+				id:'',
+				ptype:"add",
+				isdisabled:false,
+				editinfo:''
 			}
 		},
-		onLoad: function() {
-
+		onLoad: function(e) {
+			this.init()
+			if(e.id){
+				this.id=e.id;
+				this.ptype='edit';
+				this.isdisabled=true;
+				this.getDetailFn()
+			}
 		},
 		methods: {
 			checkPermi,
 			checkRole,
+			getEditFn(){
+				this.isdisabled=false;
+			},
+			statusFormats(data, list,type) {
+				var aite=selectValueKey(list, data);
+				if(type=='wzlx'){
+					this.wzlxidx=aite.key
+				}else if(type=='sfzt'){
+					this.sfztidx=aite.key
+				}
+				return aite.actions;
+			},
 			bindDateChange(e){
 				var val=e.detail.value;
-				// this.datainfo.applicationBank=this.sdyhlist[val].value;
-				// this.applicationBank=this.sdyhlist[val].label;
+				this.datainfo.partyType=this.wzlxList[val].dictValue;
+				this.wzlx=this.wzlxList[val].dictLabel;
+			},
+			bindDateChangea(e){
+				var val=e.detail.value;
+				this.datainfo.isTop=this.sfztList[val].dictValue;
+				this.sfzt=this.sfztList[val].dictLabel;
+			},
+			bindDateChangeb(e){
+				var val=e.detail.value;
+				this.datainfo.publishTime=val;
+			},
+			getChangeFn(){
+				if(this.isdisabled){
+					return
+				}
+				if(this.datainfo.status=='Y'){
+					this.datainfo.status='N'
+				}else{
+					this.datainfo.status='Y'
+				}
+			},
+			init(){
+				// 文章类型
+				getDictionaryFn('article_type').then(res=>{
+					if(res.code==200){
+						if(res.data){
+							this.wzlxList = res.data.map(v => {
+								return {
+									dictLabel: v.dictLabel,
+									dictValue: v.dictValue
+								}
+							})
+						}
+					}
+				})
+			},
+			getDetailFn(){
+				var that=this;
+				partyNewsDet(this.id).then(res=>{
+					if(res.code==200){
+						this.datainfo=res.data;
+						var data=JSON.parse(JSON.stringify(res.data))
+						if(data.partyContent){
+							var fwbinfo=this.formatRichText(res.data.partyContent);
+							this.editinfo=fwbinfo;
+							uni.createSelectorQuery().select('#editor').context(function(res) {
+								that.editorCtx = res.context||'';
+								that.editorCtx.setContents({
+									html:fwbinfo
+								})
+							}).exec();
+						}
+					}
+				})
+			},
+			getSubmit(){
+				var that=this;
+				this.$refs.form.validate().then(res => {
+					var params=JSON.parse(JSON.stringify(this.datainfo))
+					if(!params.partyType){
+						this.$toast('请选择文章类型')
+						return
+					}
+					if(!params.publishTime){
+						this.$toast('请选择发布时间')
+						return
+					}
+					if(!params.partyTitle){
+						this.$toast('请输入标题')
+						return
+					}
+					var infoContent=''
+					this.editorCtx.getContents({
+					    success: function(data) {
+							var s=data.html;
+					        infoContent=s.replace(/\<img src="(http?:\/\/)([^\/]+)(:\d+)?/g,'<img src="');
+					        infoContent=infoContent.replace(/\<img src="(https?:\/\/)([^\/]+)(:\d+)?/g,'<img src="');
+					    }  
+					}) 
+					params.partyContent=infoContent;
+					if(this.ptype=='add'){
+						partyNewsAdd(params).then(res=>{
+							if(res.code==200){
+								this.$toast("新增成功")
+								setTimeout(function(){
+									uni.$emit("partyNewsList")
+									uni.navigateBack({
+										delta:1
+									})
+								},1500)
+							}
+						})
+					}else{
+						partyNewsPut(params).then(res=>{
+							if(res.code==200){
+								this.$toast("修改成功")
+								setTimeout(function(){
+									uni.$emit("partyNewsList")
+									uni.navigateBack({
+										delta:1
+									})
+								},1500)
+							}
+						})
+					}
+					
+				})
 			},
+			//解析富文本方法
+			formatRichText(html) {
+					let newContent = html.replace(/<img[^>]*>/gi, function(match, capture) {
+						match = match.replace(/style="[^"]+"/gi, '').replace(/style='[^']+'/gi, '').replace(/style=""/gi, '');
+						match = match.replace(/width="[^"]+"/gi, '').replace(/width='[^']+'/gi, '');
+						match = match.replace(/height="[^"]+"/gi, '').replace(/height='[^']+'/gi, '');
+						return match;
+					});
+					newContent = newContent.replace(/style="[^"]+"/gi, function(match, capture) {
+						match = match.replace(/width:[^;]+;/gi, 'max-width:100%;').replace(/width:[^;]+;/gi, 'max-width:100%;');
+						return match;
+					});
+					newContent = newContent.replace(/<br[^>]*\/>/gi, '');
+					newContent = newContent.replace(/\<img src="/gi,
+						'<img style="max-width:100%;height:auto;display:block;margin:10rpx auto;" src="' +this.baseUrl);
+					return newContent;
+			},
+			readOnlyChange() {
+				this.readOnly = !this.readOnly
+			},
+			onEditorReady() {
+				var that=this;
+				// #ifdef MP-BAIDU
+				this.editorCtx = requireDynamicLib('editorLib').createEditorContext('editor');
+				// #endif
+			
+				// #ifdef APP-PLUS || MP-WEIXIN || H5
+				uni.createSelectorQuery().select('#editor').context((res) => {
+					this.editorCtx = res.context
+					that.editorCtx.setContents({
+						html:that.editinfo
+					})
+				}).exec()
+				// #endif
+			},
+			undo() {
+				this.editorCtx.undo()
+			},
+			redo() {
+				this.editorCtx.redo()
+			},
+			format(e) {
+				let {
+					name,
+					value
+				} = e.target.dataset
+				if (!name) return
+				// console.log('format', name, value)
+				this.editorCtx.format(name, value)
+			},
+			onStatusChange(e) {
+				const formats = e.detail
+				this.formats = formats
+			},
+			insertDivider() {
+				this.editorCtx.insertDivider({
+					success: function() {
+						console.log('insert divider success')
+					}
+				})
+			},
+			clear() {
+				uni.showModal({
+					title: '清空编辑器',
+					content: '确定清空编辑器全部内容?',
+					success: res => {
+						if (res.confirm) {
+							this.editorCtx.clear({
+								success: function(res) {
+									console.log("clear success")
+								}
+							})
+						}
+					}
+				})
+			},
+			removeFormat() {
+				this.editorCtx.removeFormat()
+			},
+			insertDate() {
+				const date = new Date()
+				const formatDate = `${date.getFullYear()}/${date.getMonth() + 1}/${date.getDate()}`
+				this.editorCtx.insertText({
+					text: formatDate
+				})
+			},
+			insertImage() {
+				var that=this;
+				uni.chooseImage({
+					count: 1,
+					success: (res) => {
+						let img= res.tempFilePaths;
+						let imglen = res.tempFilePaths.length;
+						var fuwufile = [];
+						uploadmore('/common/upload',img,0,0,0,imglen,fuwufile,function(rs){
+							var url=that.baseUrl+rs[0];
+							that.editorCtx.insertImage({
+								src: url,
+								alt: '图像',
+								success: function() {
+									console.log('insert image success')
+								}
+							})
+						})	
+						
+					}
+				})
+			}
 		}
 	}
 </script>
@@ -110,4 +438,47 @@
 	}
 	
 }
+@import "@/static/editor-icon.css";
+
+	.page-body {
+		height: calc(100vh - var(--window-top) - var(--status-bar-height));
+	}
+
+	.wrapper {
+		height: 100%;
+	}
+
+	.editor-wrapper {
+		height: calc(100vh - var(--window-top) - var(--status-bar-height) - 140px);
+		background: #fff;
+	}
+
+	.iconfont {
+		display: inline-block;
+		padding: 8px 8px;
+		width: 24px;
+		height: 24px;
+		cursor: pointer;
+		font-size: 20px;
+	}
+
+	.toolbar {
+		margin-bottom: 20rpx;
+		box-sizing: border-box;
+		border-bottom: 0;
+		font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
+	}
+
+	.ql-container {
+		box-sizing: border-box;
+		width: 100%;
+		min-height: 30vh;
+		height: 100%;
+		font-size: 16px;
+		line-height: 1.5;
+	}
+
+	.ql-active {
+		color: #06c;
+	}
 </style>

+ 400 - 28
property_ui/manage/pages/community/newsaddsq.vue

@@ -3,23 +3,107 @@
 		<uni-forms ref="form" :model="datainfo">
 			<view class="cbox">
 				<view class="chmain">
-					<uni-forms-item label="资讯类型" name="phonenumber">
-						<picker range-key='dictLabel' :value="syqxidx" :range="sexs"   @change='bindDateChange'>
+					<uni-forms-item label="资讯类型" name="communityType">
+						<picker range-key='dictLabel' :disabled="isdisabled" :value="wzlxidx" :range="wzlxList"   @change='bindDateChange'>
 							<view class="flexc">
-								<view class="flex1 txr f13" :class="datainfo.iszc?'co27':'coa'">{{datainfo.iszc?'是':'请选择资讯类型'}}</view>
+								<view class="flex1 txr f13 co27" v-if="datainfo.communityType&&!wzlx">{{statusFormats(datainfo.communityType,wzlxList,'wzlx')}}</view>
+								<view class="flex1 txr f13" v-else :class="wzlx?'co27':'coa'">{{wzlx||"请选择资讯类型"}}</view>
 								<view class="rimg"><image :src="rimg"></image></view>
 							</view>
 						</picker>
 					</uni-forms-item>
+					<uni-forms-item label="发布时间" name="publishTime">
+						<picker mode="date" :disabled="isdisabled" @change='bindDateChangeb'>
+							<view class="flexc">
+								<view class="flex1 txr f13"  :class="datainfo.publishTime?'co27':'coa'">{{datainfo.publishTime||"请选择发布时间"}}</view>
+								<view class="rimg"><image :src="rimg"></image></view>
+							</view>
+						</picker>
+					</uni-forms-item>
+					<uni-forms-item label="是否启用" name="status">
+						<view class="flexc" @click="getChangeFn">
+							<view class="flex1"></view>
+							<image :src="check" v-if="datainfo.status=='0'" class="checkimg"></image>
+							<image :src="ncheck" v-else class="checkimg"></image>
+						</view>
+					</uni-forms-item>
+					<!-- <uni-forms-item label="是否置顶" name="isTop">
+						<picker range-key='dictLabel' :disabled="isdisabled" :value="sfztidx" :range="sfztList"   @change='bindDateChangea'>
+							<view class="flexc">
+								<view class="flex1 txr f13 co27" v-if="datainfo.isTop&&!sfzt">{{statusFormats(datainfo.isTop,sfztList,'sfzt')}}</view>
+								<view class="flex1 txr f13" v-else :class="sfzt?'co27':'coa'">{{sfzt||"请选择是否置顶"}}</view>
+								<view class="rimg"><image :src="rimg"></image></view>
+							</view>
+						</picker>
+					</uni-forms-item> -->
 				</view>
 			</view>
 			<view class="cbox">
-				<view class="chmain">
-					<uni-forms-item label-width='0'  name="phonenumber">
-						<uni-easyinput type="textarea" autoHeight v-model="datainfo.phonenumber" :inputBorder='false' placeholder="输入标题" />
+				<view class="chmain pb10">
+					<uni-forms-item label-width='0'  name="communityTitle">
+						<uni-easyinput type="textarea" :disabled="isdisabled" autoHeight v-model="datainfo.communityTitle" :inputBorder='false' placeholder="输入标题" />
 					</uni-forms-item>
 					<view>
-						<editor-box></editor-box>
+						<view class='toolbar' @tap="format">
+							<view :class="formats.bold ? 'ql-active' : ''" class="iconfont icon-zitijiacu" data-name="bold"></view>
+							<view :class="formats.italic ? 'ql-active' : ''" class="iconfont icon-zitixieti" data-name="italic"></view>
+							<view :class="formats.underline ? 'ql-active' : ''" class="iconfont icon-zitixiahuaxian" data-name="underline"></view>
+							<view :class="formats.strike ? 'ql-active' : ''" class="iconfont icon-zitishanchuxian" data-name="strike"></view>
+							<view :class="formats.align === 'left' ? 'ql-active' : ''" class="iconfont icon-zuoduiqi" data-name="align"
+							 data-value="left"></view>
+							<view :class="formats.align === 'center' ? 'ql-active' : ''" class="iconfont icon-juzhongduiqi" data-name="align"
+							 data-value="center"></view>
+							<view :class="formats.align === 'right' ? 'ql-active' : ''" class="iconfont icon-youduiqi" data-name="align"
+							 data-value="right"></view>
+							<view :class="formats.align === 'justify' ? 'ql-active' : ''" class="iconfont icon-zuoyouduiqi" data-name="align"
+							 data-value="justify"></view>
+							<view :class="formats.lineHeight ? 'ql-active' : ''" class="iconfont icon-line-height" data-name="lineHeight"
+							 data-value="2"></view>
+							<view :class="formats.letterSpacing ? 'ql-active' : ''" class="iconfont icon-Character-Spacing" data-name="letterSpacing"
+							 data-value="2em"></view>
+							<view :class="formats.marginTop ? 'ql-active' : ''" class="iconfont icon-722bianjiqi_duanqianju" data-name="marginTop"
+							 data-value="20px"></view>
+							<view :class="formats.previewarginBottom ? 'ql-active' : ''" class="iconfont icon-723bianjiqi_duanhouju"
+							 data-name="marginBottom" data-value="20px"></view>
+							<view class="iconfont icon-clearedformat" @tap="removeFormat"></view>
+							<view :class="formats.fontFamily ? 'ql-active' : ''" class="iconfont icon-font" data-name="fontFamily" data-value="Pacifico"></view>
+							<view :class="formats.fontSize === '24px' ? 'ql-active' : ''" class="iconfont icon-fontsize" data-name="fontSize"
+							 data-value="24px"></view>
+						
+							<view :class="formats.color === '#0000ff' ? 'ql-active' : ''" class="iconfont icon-text_color" data-name="color"
+							 data-value="#0000ff"></view>
+							<view :class="formats.backgroundColor === '#00ff00' ? 'ql-active' : ''" class="iconfont icon-fontbgcolor"
+							 data-name="backgroundColor" data-value="#00ff00"></view>
+						
+							<view class="iconfont icon-date" @tap="insertDate"></view>
+							<view class="iconfont icon--checklist" data-name="list" data-value="check"></view>
+							<view :class="formats.list === 'ordered' ? 'ql-active' : ''" class="iconfont icon-youxupailie" data-name="list"
+							 data-value="ordered"></view>
+							<view :class="formats.list === 'bullet' ? 'ql-active' : ''" class="iconfont icon-wuxupailie" data-name="list"
+							 data-value="bullet"></view>
+							<view class="iconfont icon-undo" @tap="undo"></view>
+							<view class="iconfont icon-redo" @tap="redo"></view>
+						
+							<view class="iconfont icon-outdent" data-name="indent" data-value="-1"></view>
+							<view class="iconfont icon-indent" data-name="indent" data-value="+1"></view>
+							<view class="iconfont icon-fengexian" @tap="insertDivider"></view>
+							<view class="iconfont icon-charutupian" @tap="insertImage"></view>
+							<view :class="formats.header === 1 ? 'ql-active' : ''" class="iconfont icon-format-header-1" data-name="header"
+							 :data-value="1"></view>
+							<view :class="formats.script === 'sub' ? 'ql-active' : ''" class="iconfont icon-zitixiabiao" data-name="script"
+							 data-value="sub"></view>
+							<view :class="formats.script === 'super' ? 'ql-active' : ''" class="iconfont icon-zitishangbiao" data-name="script"
+							 data-value="super"></view>
+							<view class="iconfont icon-shanchu" @tap="clear"></view>
+							<view :class="formats.direction === 'rtl' ? 'ql-active' : ''" class="iconfont icon-direction-rtl" data-name="direction"
+							 data-value="rtl"></view>
+						
+						</view>
+						
+						<editor id="editor" class="ql-container" placeholder="开始输入..." showImgSize showImgToolbar showImgResize
+						 @statuschange="onStatusChange" :read-only="isdisabled" @ready="onEditorReady">
+						</editor>
+						<!-- <editor-box ></editor-box> -->
 					</view>
 					<!-- <uni-forms-item label="文章类型" name="phonenumber">
 						<view class="flexc">
@@ -32,7 +116,8 @@
 				</view>
 			</view>
 		</uni-forms>
-		<view class="rfbtn">发布</view>
+		<view class="rfbtn" @click="getEditFn" v-if="isdisabled">修改</view>
+		<view class="rfbtn" @click="getSubmit" v-else>发布</view>
 		<loading></loading>
 	</view>
 </template>
@@ -41,6 +126,9 @@
 	import config from '@/config'
 	import editorBox from "@/manage/components/editor/editor.vue"
 	import {checkPermi,checkRole} from "@/utils/permission"; // 权限判断函数
+	import {getDictionaryFn} from "@/api/system/user.js"
+	import {selectValueKey,uploadmore} from "@/utils/common.js"
+	import {newsDet,newsPut,newsAdd} from "@/api/work/manage.js"
 	export default {
 		components: {editorBox},
 		data() {
@@ -48,37 +136,278 @@
 				rimg: require('@/people/static/people/rimg.png'),
 				baseUrl: config.baseUrl,
 				checkflag:true,
+				check: require('@/people/static/people/check.png'),
+				ncheck: require('@/people/static/people/ncheck.png'),
 				datainfo: {
-					sex:0,
-					realName: '',
-					idCard: '',
-					address: '',
-					expirationDate: '',
-					phonenumber: '',
-					front: '',
-					back: '',
+					// "communityId":"社区资讯ID",
+					"communityTitle":"",//社区资讯标题
+					"communityType":"",//社区资讯类型(1:公告 2:通知 3:资讯)
+					"communityContent":"",//社区资讯内容
+					"status":"0",//社区资讯状态(0正常 1关闭)
+	//				"publishTime":"",//发布时间
+					// "coverImage":"封面图片",
+					// "author":"作者",
+					// "source":"来源",
+					// "viewCount":"浏览次数",
+					// "isTop":"是否置顶:Y(置顶)、N(不置顶)"
 				},
-				syqxidx:'',
-				sexs: [{
-					text: '男',
-					value: 0
-				}, {
-					text: '女',
-					value: 1
-				}],
+				formats: {},
+				readOnly: false,
+				wzlx:'',
+				wzlxidx:'0',
+				wzlxList:[],
+				sfzt:'否',
+				sfztidx:'1',
+				sfztList:[{dictLabel:'是',dictValue:'Y'},{dictLabel:'否',dictValue:'N'}],
+				id:'',
+				ptype:"add",
+				isdisabled:false,
+				editinfo:''
 			}
 		},
-		onLoad: function() {
-
+		onLoad: function(e) {
+			this.init()
+			if(e.id){
+				this.id=e.id;
+				this.ptype='edit';
+				this.isdisabled=true;
+				this.getDetailFn()
+			}
 		},
 		methods: {
 			checkPermi,
 			checkRole,
+			getEditFn(){
+				this.isdisabled=false;
+			},
+			statusFormats(data, list,type) {
+				var aite=selectValueKey(list, data);
+				if(type=='wzlx'){
+					this.wzlxidx=aite.key
+				}else if(type=='sfzt'){
+					this.sfztidx=aite.key
+				}
+				return aite.actions;
+			},
 			bindDateChange(e){
 				var val=e.detail.value;
-				// this.datainfo.applicationBank=this.sdyhlist[val].value;
-				// this.applicationBank=this.sdyhlist[val].label;
+				this.datainfo.communityType=this.wzlxList[val].dictValue;
+				this.wzlx=this.wzlxList[val].dictLabel;
+			},
+			bindDateChangea(e){
+				var val=e.detail.value;
+				this.datainfo.isTop=this.sfztList[val].dictValue;
+				this.sfzt=this.sfztList[val].dictLabel;
+			},
+			bindDateChangeb(e){
+				var val=e.detail.value;
+				this.datainfo.publishTime=val;
+			},
+			getChangeFn(){
+				if(this.isdisabled){
+					return
+				}
+				if(this.datainfo.status=='0'){
+					this.datainfo.status='1'
+				}else{
+					this.datainfo.status='0'
+				}
+			},
+			init(){
+				// 文章类型
+				getDictionaryFn('community_typ').then(res=>{
+					if(res.code==200){
+						if(res.data){
+							this.wzlxList = res.data.map(v => {
+								return {
+									dictLabel: v.dictLabel,
+									dictValue: v.dictValue
+								}
+							})
+						}
+					}
+				})
+			},
+			getDetailFn(){
+				var that=this;
+				newsDet(this.id).then(res=>{
+					if(res.code==200){
+						this.datainfo=res.data;
+						var data=JSON.parse(JSON.stringify(res.data))
+						if(data.communityContent){
+							var fwbinfo=this.formatRichText(res.data.communityContent);
+							this.editinfo=fwbinfo;
+							uni.createSelectorQuery().select('#editor').context(function(res) {
+								that.editorCtx = res.context||'';
+								that.editorCtx.setContents({
+									html:fwbinfo
+								})
+							}).exec();
+						}
+					}
+				})
+			},
+			getSubmit(){
+				var that=this;
+				this.$refs.form.validate().then(res => {
+					var params=JSON.parse(JSON.stringify(this.datainfo))
+					if(!params.communityType){
+						this.$toast('请选择文章类型')
+						return
+					}
+					if(!params.publishTime){
+						this.$toast('请选择发布时间')
+						return
+					}
+					if(!params.communityTitle){
+						this.$toast('请输入标题')
+						return
+					}
+					var infoContent=''
+					this.editorCtx.getContents({
+					    success: function(data) {
+							var s=data.html;
+					        infoContent=s.replace(/\<img src="(http?:\/\/)([^\/]+)(:\d+)?/g,'<img src="');
+					        infoContent=infoContent.replace(/\<img src="(https?:\/\/)([^\/]+)(:\d+)?/g,'<img src="');
+					    }  
+					}) 
+					params.communityContent=infoContent;
+					if(this.ptype=='add'){
+						newsAdd(params).then(res=>{
+							if(res.code==200){
+								this.$toast("新增成功")
+								setTimeout(function(){
+									uni.$emit("newsList")
+									uni.navigateBack({
+										delta:1
+									})
+								},1500)
+							}
+						})
+					}else{
+						newsPut(params).then(res=>{
+							if(res.code==200){
+								this.$toast("修改成功")
+								setTimeout(function(){
+									uni.$emit("newsList")
+									uni.navigateBack({
+										delta:1
+									})
+								},1500)
+							}
+						})
+					}
+					
+				})
 			},
+			//解析富文本方法
+			formatRichText(html) {
+					let newContent = html.replace(/<img[^>]*>/gi, function(match, capture) {
+						match = match.replace(/style="[^"]+"/gi, '').replace(/style='[^']+'/gi, '').replace(/style=""/gi, '');
+						match = match.replace(/width="[^"]+"/gi, '').replace(/width='[^']+'/gi, '');
+						match = match.replace(/height="[^"]+"/gi, '').replace(/height='[^']+'/gi, '');
+						return match;
+					});
+					newContent = newContent.replace(/style="[^"]+"/gi, function(match, capture) {
+						match = match.replace(/width:[^;]+;/gi, 'max-width:100%;').replace(/width:[^;]+;/gi, 'max-width:100%;');
+						return match;
+					});
+					newContent = newContent.replace(/<br[^>]*\/>/gi, '');
+					newContent = newContent.replace(/\<img src="/gi,
+						'<img style="max-width:100%;height:auto;display:block;margin:10rpx auto;" src="' +this.baseUrl);
+					return newContent;
+			},
+			readOnlyChange() {
+				this.readOnly = !this.readOnly
+			},
+			onEditorReady() {
+				var that=this;
+				// #ifdef MP-BAIDU
+				this.editorCtx = requireDynamicLib('editorLib').createEditorContext('editor');
+				// #endif
+			
+				// #ifdef APP-PLUS || MP-WEIXIN || H5
+				uni.createSelectorQuery().select('#editor').context((res) => {
+					this.editorCtx = res.context
+					that.editorCtx.setContents({
+						html:that.editinfo
+					})
+				}).exec()
+				// #endif
+			},
+			undo() {
+				this.editorCtx.undo()
+			},
+			redo() {
+				this.editorCtx.redo()
+			},
+			format(e) {
+				let {
+					name,
+					value
+				} = e.target.dataset
+				if (!name) return
+				// console.log('format', name, value)
+				this.editorCtx.format(name, value)
+			},
+			onStatusChange(e) {
+				const formats = e.detail
+				this.formats = formats
+			},
+			insertDivider() {
+				this.editorCtx.insertDivider({
+					success: function() {
+						console.log('insert divider success')
+					}
+				})
+			},
+			clear() {
+				uni.showModal({
+					title: '清空编辑器',
+					content: '确定清空编辑器全部内容?',
+					success: res => {
+						if (res.confirm) {
+							this.editorCtx.clear({
+								success: function(res) {
+									console.log("clear success")
+								}
+							})
+						}
+					}
+				})
+			},
+			removeFormat() {
+				this.editorCtx.removeFormat()
+			},
+			insertDate() {
+				const date = new Date()
+				const formatDate = `${date.getFullYear()}/${date.getMonth() + 1}/${date.getDate()}`
+				this.editorCtx.insertText({
+					text: formatDate
+				})
+			},
+			insertImage() {
+				var that=this;
+				uni.chooseImage({
+					count: 1,
+					success: (res) => {
+						let img= res.tempFilePaths;
+						let imglen = res.tempFilePaths.length;
+						var fuwufile = [];
+						uploadmore('/common/upload',img,0,0,0,imglen,fuwufile,function(rs){
+							var url=that.baseUrl+rs[0];
+							that.editorCtx.insertImage({
+								src: url,
+								alt: '图像',
+								success: function() {
+									console.log('insert image success')
+								}
+							})
+						})	
+						
+					}
+				})
+			}
 		}
 	}
 </script>
@@ -110,4 +439,47 @@
 	}
 	
 }
+@import "@/static/editor-icon.css";
+
+	.page-body {
+		height: calc(100vh - var(--window-top) - var(--status-bar-height));
+	}
+
+	.wrapper {
+		height: 100%;
+	}
+
+	.editor-wrapper {
+		height: calc(100vh - var(--window-top) - var(--status-bar-height) - 140px);
+		background: #fff;
+	}
+
+	.iconfont {
+		display: inline-block;
+		padding: 8px 8px;
+		width: 24px;
+		height: 24px;
+		cursor: pointer;
+		font-size: 20px;
+	}
+
+	.toolbar {
+		margin-bottom: 20rpx;
+		box-sizing: border-box;
+		border-bottom: 0;
+		font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
+	}
+
+	.ql-container {
+		box-sizing: border-box;
+		width: 100%;
+		min-height: 30vh;
+		height: 100%;
+		font-size: 16px;
+		line-height: 1.5;
+	}
+
+	.ql-active {
+		color: #06c;
+	}
 </style>

+ 198 - 26
property_ui/manage/pages/community/newsaddvideo.vue

@@ -1,71 +1,243 @@
 <template>
 	<view class="check">
 		<uni-forms ref="form" :model="datainfo">
-			<!-- <view class="cbox">
+			<view class="cbox">
 				<view class="chmain">
-					<uni-forms-item label="文章类型" name="phonenumber">
-						<picker range-key='dictLabel' :value="syqxidx" :range="sexs"   @change='bindDateChange'>
+					<uni-forms-item label="发布时间" name="publishTime">
+						<picker mode="date" :disabled="isdisabled" @change='bindDateChangeb'>
 							<view class="flexc">
-								<view class="flex1 txr f13" :class="datainfo.iszc?'co27':'coa'">{{datainfo.iszc?'是':'请选择文章类型'}}</view>
+								<view class="flex1 txr f13"  :class="datainfo.publishTime?'co27':'coa'">{{datainfo.publishTime||"请选择发布时间"}}</view>
 								<view class="rimg"><image :src="rimg"></image></view>
 							</view>
 						</picker>
 					</uni-forms-item>
+					<uni-forms-item label="是否启用" name="status">
+						<view class="flexc" @click="getChangeFn">
+							<view class="flex1"></view>
+							<image :src="check" v-if="datainfo.status=='0'" class="checkimg"></image>
+							<image :src="ncheck" v-else class="checkimg"></image>
+						</view>
+					</uni-forms-item>
 				</view>
-			</view> -->
+			</view>
 			<view class="cbox">
 				<view class="chmain">
-					<uni-forms-item label-width='0'  name="phonenumber">
-						<uni-easyinput type="textarea" autoHeight v-model="datainfo.phonenumber" :inputBorder='false' placeholder="输入标题" />
+					<uni-forms-item label-width='0'  name="manualTitle">
+						<uni-easyinput :disabled="isdisabled" type="textarea" autoHeight v-model="datainfo.manualTitle" :inputBorder='false' placeholder="输入标题" />
 					</uni-forms-item>
-					<view class="addbox flexdcc">
-						<image :src="video"></image>
-						<view>添加视频</view>
+					<view class="addbox">
+						<lsj-upload ref="lsjUpload" childId="upload1"  :width="width" :height="height" :option="option" :size="size" :formats="formats" :debug="debug" :instantly="instantly" bigType=''
+							    @progress="" @uploadEnd="onuploadEnd" >
+								<!-- fileName="123" fileVal='dbxmhfhgb' bigType="c" -->
+							<view class="flexdcc" :style="{width: width,height: height}">
+								<image :src="video"></image>
+								<view>添加视频</view>
+							</view>
+						</lsj-upload>
 					</view>
-					<view class="flexcw">
+					
+					
+					<view class="flexcw" v-if="datainfo.videoUrl">
 						<view class="imgs">
-							<video class="img" id="myVideo" src="https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/2minute-demo.mp4"
-							      @error="videoErrorCallback" :danmu-list="danmuList" enable-danmu danmu-btn controls></video>
-							<image :src="del" class="del"></image>
+							<video class="img" id="myVideo" :src="baseUrl+datainfo.videoUrl"
+							      @error="videoErrorCallback"  controls></video>
+							<image :src="del" class="del" @click.stop="getDelFn"></image>
 						</view>
 					</view>
 				</view>
 			</view>
 		</uni-forms>
-		<view class="rfbtn">发布</view>
+		<view class="rfbtn" @click="getEditFn" v-if="isdisabled">修改</view>
+		<view class="rfbtn" @click="getSubmit" v-else>发布</view>
 		<loading></loading>
 	</view>
 </template>
 
 <script>
 	import config from '@/config'
+	const baseUrl = config.baseUrl
+	import { getToken } from '@/utils/auth'
 	import {checkPermi,checkRole} from "@/utils/permission"; // 权限判断函数
+	import {manualAdd,manualPut,manualDet} from "@/api/work/manage.js"
+	import {uploadIdentify} from '@/utils/common.js'
 	export default {
 		components: {},
 		data() {
 			return {
+				//附件
+				option: {
+				    // 上传服务器地址,需要替换为你的接口地址
+				    url: baseUrl+'/common/upload', // 该地址非真实路径,需替换为你项目自己的接口地址
+				    // 上传附件的key
+				    name: 'file',
+				    // 根据你接口需求自定义请求头,默认不要写content-type,让浏览器自适配
+				    header: {
+				        // 示例参数可删除
+				        'Authorization':  'Bearer ' + getToken(),
+				    },
+				    // 根据你接口需求自定义body参数
+				    formData: {
+					}
+				},
+				// 选择文件后是否立即自动上传,true=选择后立即上传
+				instantly: true,
+				// 必传宽高且宽高应与slot宽高保持一致
+				width: '642rpx',
+				height: '190rpx',
+				// 限制允许上传的格式,空串=不限制,默认为空
+				formats: 'MP4',
+				// 文件上传大小限制
+				size: 100,
+				// 文件数量限制 默认10
+				count: 5,
+				// 文件回显列表
+				files: new Map(),
+				// 微信小程序Map对象for循环不显示,所以转成普通数组,不要问为什么,我也不知道
+				wxFiles: [],
+				// 是否打印日志
+				debug: false,
+				filelist:[],
+				rimg: require('@/people/static/people/rimg.png'),
 				video: require('@/manage/static/community/video.png'),
 				del: require('@/car/static/car/del.png'),
 				baseUrl: config.baseUrl,
 				checkflag:true,
+				check: require('@/people/static/people/check.png'),
+				ncheck: require('@/people/static/people/ncheck.png'),
 				datainfo: {
-					sex:0,
-					realName: '',
-					idCard: '',
-					address: '',
-					expirationDate: '',
-					phonenumber: '',
-					front: '',
-					back: '',
+					// "manualId":"员工培训手册ID",
+					"manualTitle":"",//员工培训手册标题
+					"manualType":"2",//员工培训手册类型(1:图片 2:视频)
+					"manualContent":"",//员工培训手册内容
+					"status":"0",//员工培训手册状态(0正常 1关闭)
+					"publishTime":"",//发布时间
+					"videoUrl":"",//视频地址URL
+					// "coverImage":"封面图片",
+					// "author":"作者",
+					// "source":"来源",
+					// "viewCount":"浏览次数",
+					// "isTop":"是否置顶:Y(置顶)、N(不置顶)"
 				},
+				id:'',
+				ptype:"add",
+				isdisabled:false,
+				editinfo:'',
+				videofile:[],
 			}
 		},
-		onLoad: function() {
-
+		onLoad: function(e) {
+			if(e.id){
+				this.id=e.id;
+				this.ptype='edit';
+				this.isdisabled=true;
+				this.getDetailFn()
+			}
 		},
 		methods: {
 			checkPermi,
 			checkRole,
+			bindDateChangeb(e){
+				var val=e.detail.value;
+				this.datainfo.publishTime=val;
+			},
+			getEditFn(){
+				this.isdisabled=false;
+			},
+			getDelFn(idx){
+				var that=this;
+				uni.showModal({
+					title: '确认删除',
+					content: "是否确认删除",
+					cancelText: '取消',
+					confirmText: '确认',
+					success: function(res) {
+						if (res.confirm) {
+							that.datainfo.videoUrl='';
+						} else if (res.cancel) {
+						}
+					}
+				});
+			},
+			getChangeFn(){
+				if(this.isdisabled){
+					return
+				}
+				console.log(this.datainfo.status)
+				if(this.datainfo.status=='0'){
+					this.datainfo.status='1'
+				}else{
+					this.datainfo.status='0'
+				}
+			},
+			// 上传
+			onuploadEnd(item,fileVal,bigType) {
+				var newobj={}
+				var responseText=JSON.parse(item.responseText)
+				if(responseText.code==200){
+					this.datainfo.videoUrl=responseText.fileName
+					// newobj.name=responseText.newFileName;
+					// newobj.oldName=responseText.originalFilename;
+					// newobj.url=responseText.fileName;
+					// newobj.type=fileVal;
+					// newobj.bigType=bigType;
+					// newobj.suggestionId=this.suggestionId;
+					// this.filelist.push(newobj)
+				}else{
+					this.$toast(responseText.msg)
+				}
+			},
+			getDetailFn(){
+				var that=this;
+				manualDet(this.id).then(res=>{
+					if(res.code==200){
+						this.datainfo=res.data;
+					}
+				})
+			},
+			getSubmit(){
+				var that=this;
+				this.$refs.form.validate().then(res => {
+					var params=JSON.parse(JSON.stringify(this.datainfo))
+					if(!params.publishTime){
+						this.$toast('请选择发布时间')
+						return
+					}
+					if(!params.manualTitle){
+						this.$toast('请输入标题')
+						return
+					}
+					if(!params.videoUrl){
+						this.$toast('请上传视频')
+						return
+					}
+					if(this.ptype=='add'){
+						manualAdd(params).then(res=>{
+							if(res.code==200){
+								this.$toast("新增成功")
+								setTimeout(function(){
+									uni.$emit("newsygList")
+									uni.navigateBack({
+										delta:1
+									})
+								},1500)
+							}
+						})
+					}else{
+						manualPut(params).then(res=>{
+							if(res.code==200){
+								this.$toast("修改成功")
+								setTimeout(function(){
+									uni.$emit("newsygList")
+									uni.navigateBack({
+										delta:1
+									})
+								},1500)
+							}
+						})
+					}
+					
+				})
+			},
 		}
 	}
 </script>
@@ -89,7 +261,7 @@
 .cbox{background: #FFFFFF;border-radius: 20rpx;flex: 1;margin-bottom: 24rpx;
 
 	.chmain{
-		padding: 0 32rpx 10rpx;min-height: calc(100vh - 146rpx);box-sizing: border-box;
+		padding: 0 32rpx 10rpx;box-sizing: border-box;
 		.rimg{width: 16rpx;height: 28rpx;flex: 0 0 auto;margin-left: 20rpx;
 			image{width: 100%;height: 100%;}
 		}

+ 76 - 16
property_ui/manage/pages/community/newsdj.vue

@@ -5,23 +5,29 @@
 				<image :src="djtop"></image>本社区党员共<text>367</text>人
 			</view>
 			<view class="tabtop flexc">
-				<view class="tabt" :class="tabval==ite.val?'act':''" v-for="(ite,idx) in tablist" :key="idx" @click="getTabFn(ite.val)">{{ite.tit}}</view>
+				<view class="tabt" :class="tabval==ite.dictValue?'act':''" v-for="(ite,idx) in wzlxList" :key="idx" @click="getTabFn(ite.dictValue)">{{ite.dictLabel}}</view>
 			</view>
 		</view>
 		<!-- 列表 -->
 		<view class="carlists">
-			<car-list :datainfo="list" :topval="tabval" :wtdt="wtdt" type='newsdj' @getDetail="getDetail"></car-list>
+			<car-list :datainfo="list" :wzlxList="wzlxList" :wtdt="wtdt" type='newsdj' @getDetail="getDetail" @getDelFn="getDelFn"></car-list>
 		</view>
-		<view class="rfbtn" @click="getAddFn">发布</view>
+		<block v-if="checkPermi(['wuYe:partyNews:add'])">
+			<view style="height: 100rpx;"></view>
+			<view class="rfbtn" @click="getAddFn" >发布</view>
+		</block>
+		
 		<loading></loading>
 	</view>
 </template>
 
 <script>
 	import config from '@/config'
-	const baseUrl = config.baseUrl
+	// const baseUrl = config.baseUrl,
 	import carList from "@/manage/components/car/list.vue"
 	import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
+	import {getDictionaryFn} from "@/api/system/user.js"
+	import {partyNewsList,partyNewsDel} from "@/api/work/manage.js"
 	export default{
 		components:{carList},
 		data(){
@@ -29,17 +35,25 @@
 				djtop:require('@/manage/static/community/djtop.png'),
 				cxrq:"",
 				text:'',
-				list:[{tit:'皖A IC520',type:1,right:0},{tit:'晋E KD783',type:2,right:0},],
+				list:[],
 				pageSize: 10,
 				pageNum: 1,
 				reachflag: true,
 				wtdt:'',
-				tabval:'0',
-				tablist:[{tit:'党建活动',val:0},{tit:'党建学习',val:1},{tit:'党建知识',val:2}]
+				tabval:'',
+				wzlxList:[],
+				baseUrl:config.baseUrl,
 			}
 		},
+		onUnload() {
+			uni.$off('partyNewsList')
+		},
 		onLoad: function() {
-		
+			uni.$on('partyNewsList',(res)=>{
+				this.getrefreshData()
+			})
+			this.init()
+			
 		},
 		// 上拉触底加载更多触发事件
 		onReachBottom() {
@@ -50,9 +64,29 @@
 		},
 		methods:{
 			checkPermi, checkRole,
+			init(){
+				// 文章类型
+				getDictionaryFn('article_type').then(res=>{
+					if(res.code==200){
+						if(res.data){
+							this.tabval=res.data[0].dictValue;
+							this.wzlxList = res.data.map(v => {
+								return {
+									dictLabel: v.dictLabel,
+									dictValue: v.dictValue
+								}
+							})
+							this.getDataFn()
+						}
+					}
+				})
+			},
 			getAddFn(){
 				this.$tab.navigateTo("/manage/pages/community/newsadddj")
 			},
+			getDetail(id){
+				this.$tab.navigateTo("/manage/pages/community/newsadddj?id="+id)
+			},
 			getrefreshData(){
 				this.pageNum=1;
 				this.list=[];
@@ -60,19 +94,43 @@
 				this.getDataFn()
 			},
 			getTabFn(val){
-				this.tabval=val
+				this.tabval=val;
+				this.getrefreshData()
 			},
-			bindDateChangea(e){
-				var val=e.detail.value;
-				this.cxrq=val;
+			getDelFn(data){
+				var that=this;
+				partyNewsDel(data).then(res=>{
+					if(res.code==200){
+						this.$toast("删除成功");
+						setTimeout(function(){
+							that.getrefreshData()
+						},1500)
+					}
+				})
+			},
+			formatRichText(html) {
+					let newContent = html.replace(/<img[^>]*>/gi, function(match, capture) {
+						match = match.replace(/style="[^"]+"/gi, '').replace(/style='[^']+'/gi, '').replace(/style=""/gi, '');
+						match = match.replace(/width="[^"]+"/gi, '').replace(/width='[^']+'/gi, '');
+						match = match.replace(/height="[^"]+"/gi, '').replace(/height='[^']+'/gi, '');
+						return match;
+					});
+					newContent = newContent.replace(/style="[^"]+"/gi, function(match, capture) {
+						match = match.replace(/width:[^;]+;/gi, 'max-width:100%;').replace(/width:[^;]+;/gi, 'max-width:100%;');
+						return match;
+					});
+					newContent = newContent.replace(/<br[^>]*\/>/gi, '');
+					newContent = newContent.replace(/\<img src="/gi,
+						'<img style="max-width:100%;height:auto;display:block;margin:10rpx auto;" src="' +this.baseUrl);
+					return newContent;
 			},
 			getDataFn(){
 				var params={
 					pageSize:this.pageSize,
 					pageNum: this.pageNum,
+					partyType:this.tabval
 				}
-				params.noticeType=this.tabidx
-				getNoticeList(params).then(res=>{
+				partyNewsList(params).then(res=>{
 					if(res.code==200){
 						if (res.rows.length < this.pageSize) {
 							this.reachflag = false
@@ -89,9 +147,11 @@
 						}
 						var newArr=JSON.parse(JSON.stringify(res.rows))
 						newArr.forEach(ite=>{
+							if(ite.partyContent){
+								ite.partyContent=this.formatRichText(ite.partyContent)
+							}
 							ite.right=0;
 						})
-						// console.log(newArr,555)
 						if (this.pageNum == 1) {
 							this.list = newArr;
 						} else {
@@ -110,7 +170,7 @@
 	page{background: #F3F3F0;}
 </style>
 <style lang="scss" scoped>
-.car{padding: 200rpx 0 110rpx;}
+.car{padding: 200rpx 0 10rpx;}
 .cartop{position: fixed;left: 0;right: 0;top: 0;background-color: #ffffff;z-index: 2;
 	.toptit{display: flex;justify-content: center;font-weight: 500;font-size: 26rpx;color: #8592AA;height: 70rpx;align-items: center;
 background: #E4EDFF;

+ 75 - 10
property_ui/manage/pages/community/newssq.vue

@@ -2,7 +2,7 @@
 	<view class="car">
 		<view class="cartop">
 			<view class="tabtop flexc">
-				<view class="tabt" :class="tabval==ite.val?'act':''" v-for="(ite,idx) in tablist" :key="idx" @click="getTabFn(ite.val)">{{ite.tit}}</view>
+				<view class="tabt" :class="tabval==ite.dictValue?'act':''" v-for="(ite,idx) in wzlxList" :key="idx" @click="getTabFn(ite.dictValue)">{{ite.dictLabel}}</view>
 				<view class="numbox">
 					未读互动<text>27</text>
 				</view>
@@ -10,7 +10,7 @@
 		</view>
 		<!-- 列表 -->
 		<view class="carlists">
-			<car-list :datainfo="list" :topval="tabval" :wtdt="wtdt" type='newssq' @getDetail="getDetail"></car-list>
+			<car-list :datainfo="list" :wzlxList="wzlxList" :topval="tabval" :wtdt="wtdt" type='newssq' @getDetail="getDetail" @getDelFn="getDelFn" @getPut="getPut"></car-list>
 		</view>
 		<view class="rfbtn" @click="getAddFn">发布</view>
 		<loading></loading>
@@ -22,23 +22,31 @@
 	const baseUrl = config.baseUrl
 	import carList from "@/manage/components/car/list.vue"
 	import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
+	import {getDictionaryFn} from "@/api/system/user.js"
+	import {newsList,newsDel} from "@/api/work/manage.js"
 	export default{
 		components:{carList},
 		data(){
 			return{
 				cxrq:"",
 				text:'',
-				list:[{tit:'皖A IC520',type:1,right:0},{tit:'晋E KD783',type:2,right:0},],
+				list:[],
 				pageSize: 10,
 				pageNum: 1,
 				reachflag: true,
 				wtdt:'',
-				tabval:'0',
-				tablist:[{tit:'公告',val:0},{tit:'通知',val:1},{tit:'资讯',val:2}]
+				tabval:'',
+				wzlxList:[],
 			}
 		},
+		onUnload() {
+			uni.$off('newsList')
+		},
 		onLoad: function() {
-		
+			uni.$on('newsList',(res)=>{
+				this.getrefreshData()
+			})
+			this.init()
 		},
 		// 上拉触底加载更多触发事件
 		onReachBottom() {
@@ -49,9 +57,36 @@
 		},
 		methods:{
 			checkPermi, checkRole,
+			init(){
+				// 社区资讯类型
+				getDictionaryFn('community_typ').then(res=>{
+					if(res.code==200){
+						if(res.data){
+							this.tabval=res.data[0].dictValue;
+							this.wzlxList = res.data.map(v => {
+								return {
+									dictLabel: v.dictLabel,
+									dictValue: v.dictValue
+								}
+							})
+							this.getDataFn()
+						}
+					}
+				})
+			},
 			getAddFn(){
 				this.$tab.navigateTo("/manage/pages/community/newsaddsq")
 			},
+			getPut(id){
+				if(checkPermi((['wuye:news:edit']))){
+					this.$tab.navigateTo("/manage/pages/community/newsaddsq?id="+id)
+				}else{
+					this.$tab.navigateTo("/manage/pages/community/newsygdetail?id="+id)
+				}
+			},
+			getDetail(id){
+				this.$tab.navigateTo("/manage/pages/community/newssqdetail?id="+id)
+			},
 			getrefreshData(){
 				this.pageNum=1;
 				this.list=[];
@@ -59,19 +94,47 @@
 				this.getDataFn()
 			},
 			getTabFn(val){
-				this.tabval=val
+				this.tabval=val;
+				this.getrefreshData()
 			},
 			bindDateChangea(e){
 				var val=e.detail.value;
 				this.cxrq=val;
 			},
+			getDelFn(data){
+				var that=this;
+				newsDel(data).then(res=>{
+					if(res.code==200){
+						this.$toast("删除成功");
+						setTimeout(function(){
+							that.getrefreshData()
+						},1500)
+					}
+				})
+			},
+			formatRichText(html) {
+					let newContent = html.replace(/<img[^>]*>/gi, function(match, capture) {
+						match = match.replace(/style="[^"]+"/gi, '').replace(/style='[^']+'/gi, '').replace(/style=""/gi, '');
+						match = match.replace(/width="[^"]+"/gi, '').replace(/width='[^']+'/gi, '');
+						match = match.replace(/height="[^"]+"/gi, '').replace(/height='[^']+'/gi, '');
+						return match;
+					});
+					newContent = newContent.replace(/style="[^"]+"/gi, function(match, capture) {
+						match = match.replace(/width:[^;]+;/gi, 'max-width:100%;').replace(/width:[^;]+;/gi, 'max-width:100%;');
+						return match;
+					});
+					newContent = newContent.replace(/<br[^>]*\/>/gi, '');
+					newContent = newContent.replace(/\<img src="/gi,
+						'<img style="max-width:100%;height:auto;display:block;margin:10rpx auto;" src="' +this.baseUrl);
+					return newContent;
+			},
 			getDataFn(){
 				var params={
 					pageSize:this.pageSize,
 					pageNum: this.pageNum,
+					communityType:this.tabval
 				}
-				params.noticeType=this.tabidx
-				getNoticeList(params).then(res=>{
+				newsList(params).then(res=>{
 					if(res.code==200){
 						if (res.rows.length < this.pageSize) {
 							this.reachflag = false
@@ -88,9 +151,11 @@
 						}
 						var newArr=JSON.parse(JSON.stringify(res.rows))
 						newArr.forEach(ite=>{
+							if(ite.communityContent){
+								ite.communityContent=this.formatRichText(ite.communityContent)
+							}
 							ite.right=0;
 						})
-						// console.log(newArr,555)
 						if (this.pageNum == 1) {
 							this.list = newArr;
 						} else {

+ 242 - 0
property_ui/manage/pages/community/newssqdetail.vue

@@ -0,0 +1,242 @@
+<template>
+	<view class="ndetail ">
+		<!-- 详情 -->
+		<view class="ndbox mb12">
+			<view class="plr15">
+				<view class="tit">物业服务费缴费公告</view>
+				<view class="time mb12">2024-12-01 08:21</view>
+				<view class="rich">
+					<rich-text :nodes="infoContent" style="word-break: break-all;"></rich-text>
+				</view>
+			</view>
+			<view class="ndbfox flexc">
+				<view class="flexcc ndbflist">
+					<image :src="nicona"></image>
+					<view>32</view>
+				</view>
+				<view class="flexcc ndbflist">
+					<image :src="niconb"></image>
+					<view>32</view>
+				</view>
+				<view class="flexcc ndbflist">
+					<image :src="niconc"></image>
+					<view>32</view>
+				</view>
+			</view>
+		</view>
+		<view class="ndbox mb12 plr15">
+			<view class="pltit">评论<text>(31)</text></view>
+			<!-- 评论列表 -->
+			<view class="pllist flex">
+				<image :src="head" class="head"></image>
+				<view class="flex1 overh">
+					<view class="flext mb14 ">
+						<view class="plname flex1 over">床前明月光</view>
+						<view class="plrbtn flexc flex0">
+							<!-- <image :src="niconb" class="imga"></image> -->
+							<image :src="nicond"></image>
+							<view>点赞</view>
+						</view>
+						<view class="plrbtn flexc flex0">
+							<image :src="nicone" class="imgb"></image>
+							<view>回复</view>
+						</view>
+					</view>
+					<view class="infotxt mb15">支持!去看一下优惠政策!<view class="infotime">12-3</view></view>
+				</view>
+			</view>
+			<view class="pllist flex">
+				<image :src="head" class="head"></image>
+				<view class="flex1 overh">
+					<view class="flext mb14 ">
+						<view class="plname flex1 over">疑是地上霜</view>
+						<view class="plrbtn flexc flex0">
+							<image :src="niconb" class="imga"></image>
+							<!-- <image :src="nicond"></image> -->
+							<view>点赞</view>
+						</view>
+						<view class="plrbtn flexc flex0">
+							<image :src="nicone" class="imgb"></image>
+							<view>回复</view>
+						</view>
+					</view>
+					<view class="infotxt mb15">提前缴一年的物业费,可以免一个月吗?<view class="infotime">12-3</view></view>
+					<!-- 二级回复 -->
+					<view class="pllist flex">
+						<image :src="head" class="head"></image>
+						<view class="flex1 overh">
+							<view class="flext mb14 ">
+								<view class="plname flex1 over">幸福小区物业</view>
+								<view class="plrbtn flexc flex0">
+									<image :src="niconb" class="imga"></image>
+									<!-- <image :src="nicond"></image> -->
+									<view>点赞</view>
+								</view>
+								<view class="plrbtn flexc flex0">
+									<image :src="nicone" class="imgb"></image>
+									<view>回复</view>
+								</view>
+							</view>
+							<view class="infotxt mb15">尊敬的业主朋友,您的建议我司已收到,将在内 部讨论后于物业公告中告知结果,谢谢您的宝贵 建议!<view class="infotime">12-3</view></view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<!-- 评论 -->
+		<view class="pjfbtn">
+			<view class="flexc pjfbox">
+				<uni-easyinput type="textarea" autoHeight v-model="text" :inputBorder='false' placeholder="发表我的评论…" />
+				<view class="btns">发送</view>
+			</view>
+		</view>
+	<loading></loading>	
+	</view>
+</template>
+
+<script>
+	import config from '@/config'
+	const baseUrl = config.baseUrl
+	import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
+	export default{
+		components:{},
+		data(){
+			return{
+				nicona:require('@/manage/static/news/nicona.png'),
+				niconb:require('@/manage/static/news/niconb.png'),
+				niconc:require('@/manage/static/news/niconc.png'),
+				nicond:require('@/manage/static/news/nicond.png'),
+				nicone:require('@/manage/static/news/nicone.png'),
+				head:require('@/manage/static/news/head.png'),
+				list:[],
+				pageSize: 10,
+				pageNum: 1,
+				reachflag: true,
+				wtdt:'',
+				showAll:true,
+				infoContent:'<span>hello uni-app x!</span><br/><span>uni-app x,终极跨平台方案</span>',
+				text:'',
+			}
+		},
+		onLoad: function() {
+		
+		},
+		// 上拉触底加载更多触发事件
+		onReachBottom() {
+			if (this.reachflag) {
+				this.pageNum++
+				this.getDataFn()
+			}
+		},
+		methods:{
+			checkPermi, checkRole,
+			// getNextFn(){
+			// 	this.$tab.navigateTo("/work/pages/business/add")
+			// },
+			//解析富文本方法
+			formatRichText(html) {
+					let newContent = html.replace(/<img[^>]*>/gi, function(match, capture) {
+						match = match.replace(/style="[^"]+"/gi, '').replace(/style='[^']+'/gi, '').replace(/style=""/gi, '');
+						match = match.replace(/width="[^"]+"/gi, '').replace(/width='[^']+'/gi, '');
+						match = match.replace(/height="[^"]+"/gi, '').replace(/height='[^']+'/gi, '');
+						return match;
+					});
+					newContent = newContent.replace(/style="[^"]+"/gi, function(match, capture) {
+						match = match.replace(/width:[^;]+;/gi, 'max-width:100%;').replace(/width:[^;]+;/gi, 'max-width:100%;');
+						return match;
+					});
+					newContent = newContent.replace(/<br[^>]*\/>/gi, '');
+					newContent = newContent.replace(/\<img src="/gi,
+						'<img style="max-width:100%;height:auto;display:block;margin:10rpx auto;" src="' +baseUrlimg);
+					return newContent;
+			},
+			getDataFn(){
+				return
+				var params={
+					pageSize:this.pageSize,
+					pageNum: this.pageNum,
+				}
+				params.noticeType=this.tabidx
+				getNoticeList(params).then(res=>{
+					if(res.code==200){
+						if(res.data.infoContent){
+							this.infoContent=this.formatRichText(res.data.infoContent);
+						}
+						if (res.rows.length < this.pageSize) {
+							this.reachflag = false
+							this.wtdt = '到底了~';
+						} else {
+							var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum -	1)
+							if (num < res.total) {
+								this.reachflag = true
+								this.wtdt = ''
+							} else {
+								this.reachflag = false
+								this.wtdt = '到底了~';
+							}
+						}
+						if (this.pageNum == 1) {
+							this.list = res.rows;
+						} else {
+							this.list = this.list.concat(res.rows)
+						}
+					}else{
+						this.$toast(res.msg)
+					}
+				})
+				
+			},
+		}
+	}
+</script>
+<style>
+	page{background: #F3F3F0;}
+</style>
+<style lang="scss" scoped>
+.ndetail{
+	min-height: 100vh;padding: 20rpx 18rpx 100rpx;
+	.ndbox{background: #FFFFFF;border-radius: 20rpx;padding-top: 30rpx;
+		.tit{font-weight: bold;font-size: 32rpx;color: #272727;margin-bottom: 14rpx;text-align: center;padding-top: 4rpx;}
+		.time{font-weight: 500;font-size: 24rpx;color: #AAAAAA;text-align: center;}
+		.rich{border-top: 2rpx solid #E5E5E5;padding: 28rpx 0;}	
+		.ndbfox{
+			border-top: 2rpx solid #E5E5E5;
+			.ndbflist{width: 33.3%;min-height: 78rpx;padding: 16rpx 0;box-sizing: border-box;
+				image{width: 26rpx;height: 26rpx;margin-right: 26rpx;}
+				view{font-weight: 500;font-size: 26rpx;color: #666666;}
+			}
+		}
+	}
+}
+.pltit{font-weight: bold;font-size: 30rpx;color: #272727;
+	text{margin-left: 24rpx;font-size: 24rpx;color: #666666;}
+}
+.pllist{padding-top: 20rpx;margin-bottom: 16rpx;border-bottom: 2rpx solid #DADADA;
+	.head{width: 40rpx;height: 40rpx;margin-right: 18rpx;flex: 0 0 auto;}
+	.plname{font-weight: bold;font-size: 30rpx;color: #161616;}
+	.plrbtn{margin-left: 36rpx;
+		image{width: 26rpx;height: 24rpx;margin-right: 16rpx;
+			&.imga{width: 26rpx;height: 26rpx;}
+			&.imgb{width: 26rpx;height: 22rpx;}
+		}
+		view{font-weight: bold;font-size: 24rpx;color: #314081;}
+	}
+	.infotxt{font-weight: 500;font-size: 26rpx;color: #161616;line-height: 40rpx;
+		&:before {content: "";float: right;width: 0;height: calc(100% - 16px);background: red;}
+		.infotime{font-weight: 500;font-size: 24rpx;color: #666666; float: right;clear: both;}	
+	}
+	.pllist{
+		padding-top: 0;border-bottom: none;margin-bottom: 0;
+	}
+}
+.pjfbtn{background: #FFFFFF;position: fixed;bottom: 0;left: 0;right: 0;padding:20rpx 48rpx;box-shadow: 0px 0px 18rpx 0px rgba(159,159,159,0.47);
+	.pjfbox{background: #E6E6E6;border-radius: 10rpx;
+		.btns{nt-weight: bold;padding: 0 34rpx;height: 60rpx;line-height: 60rpx;flex: 0 0 auto;
+		font-size: 26rpx;
+	}
+	
+color: #314081;}
+}
+.pjfbtn /deep/ .uni-easyinput{flex: 1;font-size: 26rpx;color: #222327;}
+.pjfbtn /deep/ .uni-easyinput__content-textarea{min-height: 40rpx;font-size: 26rpx;margin: 0;background: #E6E6E6;box-sizing: border-box;padding: 10rpx 0 10rpx 36rpx;border-radius:10rpx 0 0 10rpx;}
+</style>

+ 121 - 11
property_ui/manage/pages/community/newsyg.vue

@@ -2,7 +2,7 @@
 	<view class="car">
 		<view class="cartop">
 			<view class="tabtop flexc">
-				<view class="tabt" :class="tabval==ite.val?'act':''" v-for="(ite,idx) in tablist" :key="idx" @click="getTabFn(ite.val)">{{ite.tit}}</view>
+				<view class="tabt" :class="tabval==ite.dictValue?'act':''" v-for="(ite,idx) in wzlxList" :key="idx" @click="getTabFn(ite.dictValue)">{{ite.dictLabel}}</view>
 				<view class="numbox" @click="getCount">
 					阅读统计
 				</view>
@@ -10,10 +10,14 @@
 		</view>
 		<!-- 列表 -->
 		<view class="carlists">
-			<car-list :datainfo="list" :wtdt="wtdt" :type='tabval' @getDetail="getDetail" @getReadlist="getReadlist"></car-list>
+			<car-list :datainfo="list" :wtdt="wtdt" :type='type' @getDetail="getDetail" @getReadlist="getReadlist" @getPause="getPause" @getDelFn="getDelFn" @getPut="getPut"></car-list>
 		</view>
-		<view class="rfbtn" @click="getAddFn" v-if="tabval=='ystv'">发布图文</view>
-		<view class="rfbtn" @click="getAddvideoFn" v-else>发布视频</view>
+		<block v-if="checkPermi(['wuYe:manual:add'])">
+			<view style="height: 100rpx;"></view>
+			<view class="rfbtn" @click="getAddFn" v-if="type=='ystv'">发布图文</view>
+			<view class="rfbtn" @click="getAddvideoFn" v-else>发布视频</view>
+		</block>
+		
 		<loading></loading>
 	</view>
 </template>
@@ -23,23 +27,49 @@
 	const baseUrl = config.baseUrl
 	import carList from "@/manage/components/car/list.vue"
 	import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
+	import {getDictionaryFn} from "@/api/system/user.js"
+	import {manualList,manualDel,manualPut,staffTrainTime} from "@/api/work/manage.js"
 	export default{
 		components:{carList},
 		data(){
 			return{
 				cxrq:"",
 				text:'',
-				list:[{tit:'皖A IC520',type:1,right:0},{tit:'晋E KD783',type:2,right:0},],
+				list:[],
 				pageSize: 10,
 				pageNum: 1,
 				reachflag: true,
 				wtdt:'',
 				tabval:'ystv',
-				tablist:[{tit:'图文',val:'ystv'},{tit:'视频',val:'ygsp'}]
+				type:'',
+				wzlxList:[],
+				stayDuration: 0,
+				pageLoadTime:0,
 			}
 		},
+		onUnload() {
+			uni.$off('newsygList')
+			// 计算停留时长
+			this.calculateStayDuration();
+		},
 		onLoad: function() {
-		
+			uni.$on('newsygList',(res)=>{
+				this.getrefreshData()
+			})
+			this.init()
+			// 记录页面加载时间
+			 this.pageLoadTime = Date.now();
+		},
+		onHide() {
+		    // 页面隐藏时计算停留时长
+		    this.calculateStayDuration();
+		},
+		onShow() {
+		    // 页面重新显示时重新记录加载时间
+		    this.pageLoadTime = Date.now();
+		},
+		mounted:function(){
+			
 		},
 		// 上拉触底加载更多触发事件
 		onReachBottom() {
@@ -50,6 +80,53 @@
 		},
 		methods:{
 			checkPermi, checkRole,
+			// 计算停留时长
+			calculateStayDuration() {
+			    const currentTime = Date.now();
+				var time=Math.floor((currentTime - this.pageLoadTime) / 1000); // 转换为秒
+				var staffTime=Math.ceil(time/60);//向上取整,转换成分钟
+				var params={
+					staffTime:staffTime,
+				}
+				staffTrainTime(params).then(res=>{
+				})
+			},
+			init(){
+				// 发布类型
+				getDictionaryFn('publication_type').then(res=>{
+					if(res.code==200){
+						if(res.data){
+							this.tabval=res.data[0].dictValue;
+							if(this.tabval==1){
+								this.type='ystv'
+							}else{
+								this.type='ygsp'
+							}
+							this.wzlxList = res.data.map(v => {
+								return {
+									dictLabel: v.dictLabel,
+									dictValue: v.dictValue
+								}
+							})
+							this.getDataFn()
+						}
+					}
+				})
+			},
+			getDetail(data){
+				if(this.tabval=='ystv'){
+					this.$tab.navigateTo("/manage/pages/community/newsygdetail?id="+data)
+				}else{
+					this.$tab.navigateTo("/manage/pages/community/newsaddvideo?id="+data)
+				}
+			},
+			getPut(id){
+				if(checkPermi((['wuye:partyNews:edit']))){
+					this.$tab.navigateTo("/manage/pages/community/newsadd?id="+id)
+				}else{
+					this.$tab.navigateTo("/manage/pages/community/newsygdetail?id="+id)
+				}	
+			},
 			getAddFn(){
 				this.$tab.navigateTo("/manage/pages/community/newsadd")
 			},
@@ -69,19 +146,48 @@
 				this.getDataFn()
 			},
 			getTabFn(val){
-				this.tabval=val
+				this.tabval=val;
+				if(this.tabval==1){
+					this.type='ystv'
+				}else{
+					this.type='ygsp'
+				}
+				this.getrefreshData()
 			},
 			bindDateChangea(e){
 				var val=e.detail.value;
 				this.cxrq=val;
 			},
+			getPause(obj){
+				var data=JSON.parse(JSON.stringify(obj))
+				var params={
+					manualId:data.id,
+					progress:data.progress,
+				}
+				manualPut(params).then(res=>{
+					if(res.code==200){
+						
+					}
+				})
+			},
+			getDelFn(data){
+				var that=this;
+				manualDel(data).then(res=>{
+					if(res.code==200){
+						this.$toast("删除成功");
+						setTimeout(function(){
+							that.getrefreshData()
+						},1500)
+					}
+				})
+			},
 			getDataFn(){
 				var params={
 					pageSize:this.pageSize,
 					pageNum: this.pageNum,
+					manualType:this.tabval
 				}
-				params.noticeType=this.tabidx
-				getNoticeList(params).then(res=>{
+				manualList(params).then(res=>{
 					if(res.code==200){
 						if (res.rows.length < this.pageSize) {
 							this.reachflag = false
@@ -99,6 +205,10 @@
 						var newArr=JSON.parse(JSON.stringify(res.rows))
 						newArr.forEach(ite=>{
 							ite.right=0;
+							ite.currentTime=0;
+							ite.duration=0;
+							ite.initialtime=0;//当前播放位置
+							ite.putflag=false;//是否修改
 						})
 						// console.log(newArr,555)
 						if (this.pageNum == 1) {
@@ -119,7 +229,7 @@
 	page{background: #F3F3F0;}
 </style>
 <style lang="scss" scoped>
-.car{padding: 148rpx 0 110rpx;}
+.car{padding: 148rpx 0 10rpx;}
 .cartop{position: fixed;left: 0;right: 0;top: 0;background-color: #ffffff;z-index: 2;
 	.tabtop{padding:28rpx 200rpx 40rpx 0;position: relative;
 		.tabt{font-weight: 500;font-size: 32rpx;color: #666666;position: relative;line-height: 56rpx;padding: 0 40rpx;

+ 298 - 0
property_ui/manage/pages/community/newsygdetail.vue

@@ -0,0 +1,298 @@
+<template>
+	<view class="ndetail ">
+		<!-- 详情 -->
+		<view class="mainbox">
+			<view class="ndbox">
+				<view class="plr15">
+					<view class="tit">{{datainfo.manualTitle}}</view>
+					<view class="time mb12">{{datainfo.publishTime}}</view>
+					<view class="rich">
+						<rich-text :nodes="manualContent" style="word-break: break-all;"></rich-text>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="ndbox mb12 plr15 comment-section" style="display:none">
+			<view class="pltit">评论<text>(31)</text></view>
+			<!-- 评论列表 -->
+			<view class="pllist flex">
+				<image :src="head" class="head"></image>
+				<view class="flex1 overh">
+					<view class="flext mb14 ">
+						<view class="plname flex1 over">床前明月光</view>
+						<view class="plrbtn flexc flex0">
+							<!-- <image :src="niconb" class="imga"></image> -->
+							<image :src="nicond"></image>
+							<view>点赞</view>
+						</view>
+						<view class="plrbtn flexc flex0">
+							<image :src="nicone" class="imgb"></image>
+							<view>回复</view>
+						</view>
+					</view>
+					<view class="infotxt mb15">支持!去看一下优惠政策!<view class="infotime">12-3</view></view>
+				</view>
+			</view>
+			<view class="pllist flex">
+				<image :src="head" class="head"></image>
+				<view class="flex1 overh">
+					<view class="flext mb14 ">
+						<view class="plname flex1 over">疑是地上霜</view>
+						<view class="plrbtn flexc flex0">
+							<image :src="niconb" class="imga"></image>
+							<!-- <image :src="nicond"></image> -->
+							<view>点赞</view>
+						</view>
+						<view class="plrbtn flexc flex0">
+							<image :src="nicone" class="imgb"></image>
+							<view>回复</view>
+						</view>
+					</view>
+					<view class="infotxt mb15">提前缴一年的物业费,可以免一个月吗?<view class="infotime">12-3</view></view>
+					<!-- 二级回复 -->
+					<view class="pllist flex">
+						<image :src="head" class="head"></image>
+						<view class="flex1 overh">
+							<view class="flext mb14 ">
+								<view class="plname flex1 over">幸福小区物业</view>
+								<view class="plrbtn flexc flex0">
+									<image :src="niconb" class="imga"></image>
+									<!-- <image :src="nicond"></image> -->
+									<view>点赞</view>
+								</view>
+								<view class="plrbtn flexc flex0">
+									<image :src="nicone" class="imgb"></image>
+									<view>回复</view>
+								</view>
+							</view>
+							<view class="infotxt mb15">尊敬的业主朋友,您的建议我司已收到,将在内 部讨论后于物业公告中告知结果,谢谢您的宝贵 建议!<view class="infotime">12-3</view></view>
+						</view>
+					</view>
+				</view>
+			</view>
+			<view style="height:100rpx"></view>
+			<view class="pjfbtn">
+				<view class="flexc pjfbox">
+					<uni-easyinput type="textarea" autoHeight v-model="text" :inputBorder='false' placeholder="发表我的评论…" />
+					<view class="btns">发送</view>
+				</view>
+			</view>
+		</view>
+		<!-- 评论 -->
+		
+	<loading></loading>	
+	</view>
+</template>
+
+<script>
+	import config from '@/config'
+	const baseUrl = config.baseUrl
+	import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
+	import {manualDet,manualPut,staffTrainTime} from "@/api/work/manage.js"
+	export default{
+		components:{},
+		data(){
+			return{
+				nicona:require('@/manage/static/news/nicona.png'),
+				niconb:require('@/manage/static/news/niconb.png'),
+				niconc:require('@/manage/static/news/niconc.png'),
+				nicond:require('@/manage/static/news/nicond.png'),
+				nicone:require('@/manage/static/news/nicone.png'),
+				head:require('@/manage/static/news/head.png'),
+				showAll:true,
+				baseUrl:config.baseUrl,
+				text:'',
+				id:'',
+				datainfo:{
+					progress:'',
+				},
+				manualContent:'',
+				stayDuration: 0,
+				pageLoadTime:0,
+				pageHeight:0,//文章高度
+				progress:0,// 阅读进度
+				scrollTop:0,// 当前滚动位置
+				commentHeight:0,//品论模块
+				scrollflag:true,//是否计算
+				putflag:false,//是否修改
+			}
+		},
+		onUnload() {
+			// 计算停留时长
+			this.calculateStayDuration();
+		},
+		onLoad: function(e) {
+			this.id=e.id;
+			this.getDetailFn()
+			// 记录页面加载时间
+			this.pageLoadTime = Date.now();
+		},
+		onHide() {
+		    // 页面隐藏时计算停留时长
+		    this.calculateStayDuration();
+		},
+		onShow() {
+		    // 页面重新显示时重新记录加载时间
+		    this.pageLoadTime = Date.now();
+		},
+		mounted() {
+			var that=this;
+			setTimeout(function(){
+				that.getHeightFn()
+			},200)
+		},
+		onPageScroll(e) {
+			// 获取当前滚动位置
+			this.scrollTop = e.scrollTop;
+			// 计算阅读进度
+			this.calculateProgress();
+		}, 
+		methods:{
+			checkPermi, checkRole,
+			// 计算停留时长
+			calculateStayDuration() {
+			    const currentTime = Date.now();
+				var time=Math.floor((currentTime - this.pageLoadTime) / 1000); // 转换为秒
+				var staffTime=Math.ceil(time/60);//向上取整,转换成分钟
+				var params={
+					staffTime:staffTime,
+				}
+				staffTrainTime(params).then(res=>{
+				})
+				var paramsput={
+					manualId:this.id,
+					progress:this.datainfo.progress,
+				}
+				manualPut(paramsput).then(res=>{
+					if(res.code==200){
+						
+					}
+				})
+			},
+			calculateProgress() {
+				var progress=0;
+				if (this.pageHeight > 0&&this.scrollflag) {
+					var pro=this.datainfo.progress||0;
+				        // 如果滚动到评论区域,阅读进度为 100%
+				    if (this.scrollTop >= this.pageHeight) {
+				        progress = 100;
+				    } else {
+				        // 计算文章内容的阅读进度
+				        progress = ((this.scrollTop + uni.getSystemInfoSync().windowHeight) / this.pageHeight * 100).toFixed(2);
+				        if (progress > 100) {
+				            progress = 100;
+				        }
+				    }
+					if(Number(pro)<Number(progress)){
+						this.datainfo.progress=	progress;
+						this.putflag=true;
+					}
+				}
+			},
+			getHeightFn(){
+				let query = uni.createSelectorQuery().in(this);
+				var windowHeight=uni.getSystemInfoSync().windowHeight
+				var that=this;
+				//需要给黄色区域设置一个id标识,在这里是demo
+				query.select('.mainbox').boundingClientRect(data => {
+					var height=data.height;
+					that.pageHeight=Number(height);
+					if(height<Number(windowHeight)){
+						this.progress=100;
+						this.scrollflag=false;
+					}
+				}).exec();
+				 // 获取评论模块高度
+				query.select('.comment-section').boundingClientRect(data => {
+				    this.commentHeight = data.height;
+				}).exec();
+				
+			},
+			getDetailFn(){
+				manualDet(this.id).then(res=>{
+					if(res.code==200){
+						this.datainfo=res.data;
+						var data=JSON.parse(JSON.stringify(res.data))
+						if(data.manualContent){
+							this.manualContent=this.formatRichText(data.manualContent)
+						}
+					}
+				})
+			},
+			// getNextFn(){
+			// 	this.$tab.navigateTo("/work/pages/business/add")
+			// },
+			//解析富文本方法
+			formatRichText(html) {
+					let newContent = html.replace(/<img[^>]*>/gi, function(match, capture) {
+						match = match.replace(/style="[^"]+"/gi, '').replace(/style='[^']+'/gi, '').replace(/style=""/gi, '');
+						match = match.replace(/width="[^"]+"/gi, '').replace(/width='[^']+'/gi, '');
+						match = match.replace(/height="[^"]+"/gi, '').replace(/height='[^']+'/gi, '');
+						return match;
+					});
+					newContent = newContent.replace(/style="[^"]+"/gi, function(match, capture) {
+						match = match.replace(/width:[^;]+;/gi, 'max-width:100%;').replace(/width:[^;]+;/gi, 'max-width:100%;');
+						return match;
+					});
+					newContent = newContent.replace(/<br[^>]*\/>/gi, '');
+					newContent = newContent.replace(/\<img src="/gi,
+						'<img style="max-width:100%;height:auto;display:block;margin:10rpx auto;" src="' +this.baseUrl);
+					return newContent;
+			},
+		}
+	}
+</script>
+<style>
+	page{background: #F3F3F0;}
+</style>
+<style lang="scss" scoped>
+.mainbox{padding: 20rpx 0;}
+.ndetail{
+	// padding: 20rpx 18rpx 100rpx;
+	min-height: 100vh;padding: 0rpx 18rpx;
+	.ndbox{background: #FFFFFF;border-radius: 20rpx;padding-top: 30rpx;
+		.tit{font-weight: bold;font-size: 32rpx;color: #272727;margin-bottom: 14rpx;text-align: center;padding-top: 4rpx;}
+		.time{font-weight: 500;font-size: 24rpx;color: #AAAAAA;text-align: center;}
+		.rich{border-top: 2rpx solid #E5E5E5;padding: 28rpx 0;}	
+		.ndbfox{
+			border-top: 2rpx solid #E5E5E5;
+			.ndbflist{width: 33.3%;min-height: 78rpx;padding: 16rpx 0;box-sizing: border-box;
+				image{width: 26rpx;height: 26rpx;margin-right: 26rpx;}
+				view{font-weight: 500;font-size: 26rpx;color: #666666;}
+			}
+		}
+	}
+}
+.pltit{font-weight: bold;font-size: 30rpx;color: #272727;
+	text{margin-left: 24rpx;font-size: 24rpx;color: #666666;}
+}
+.pllist{padding-top: 20rpx;margin-bottom: 16rpx;border-bottom: 2rpx solid #DADADA;
+	&:last-child{border-bottom: none;}
+	.head{width: 40rpx;height: 40rpx;margin-right: 18rpx;flex: 0 0 auto;}
+	.plname{font-weight: bold;font-size: 30rpx;color: #161616;}
+	.plrbtn{margin-left: 36rpx;
+		image{width: 26rpx;height: 24rpx;margin-right: 16rpx;
+			&.imga{width: 26rpx;height: 26rpx;}
+			&.imgb{width: 26rpx;height: 22rpx;}
+		}
+		view{font-weight: bold;font-size: 24rpx;color: #314081;}
+	}
+	.infotxt{font-weight: 500;font-size: 26rpx;color: #161616;line-height: 40rpx;
+		&:before {content: "";float: right;width: 0;height: calc(100% - 16px);background: red;}
+		.infotime{font-weight: 500;font-size: 24rpx;color: #666666; float: right;clear: both;}	
+	}
+	.pllist{
+		padding-top: 0;border-bottom: none;margin-bottom: 0;
+	}
+}
+.pjfbtn{background: #FFFFFF;position: fixed;bottom: 0;left: 0;right: 0;padding:20rpx 48rpx;box-shadow: 0px 0px 18rpx 0px rgba(159,159,159,0.47);
+	.pjfbox{background: #E6E6E6;border-radius: 10rpx;
+		.btns{nt-weight: bold;padding: 0 34rpx;height: 60rpx;line-height: 60rpx;flex: 0 0 auto;
+		font-size: 26rpx;
+	}
+	
+color: #314081;}
+}
+.pjfbtn /deep/ .uni-easyinput{flex: 1;font-size: 26rpx;color: #222327;}
+.pjfbtn /deep/ .uni-easyinput__content-textarea{min-height: 40rpx;font-size: 26rpx;margin: 0;background: #E6E6E6;box-sizing: border-box;padding: 10rpx 0 10rpx 36rpx;border-radius:10rpx 0 0 10rpx;}
+</style>

+ 36 - 14
property_ui/manage/pages/community/readcount.vue

@@ -16,8 +16,8 @@
 				</view>
 			</view>
 			<view class="flexcj conttips">
-				<view class="toptip">当前统计人数共<text>274</text>人</view>
-				<view class="topsort" @click="tallflag=!tallflag">
+				<view class="toptip">当前统计人数共<text>{{total}}</text>人</view>
+				<view class="topsort" @click="getSort">
 					{{tallflag?"从高到低":"从低到高"}}
 					<view class="imgs" v-if="tallflag">
 						<image :src="up"></image><image :src="downa"></image>
@@ -45,6 +45,7 @@
 	const baseUrl = config.baseUrl
 	import carList from "@/manage/components/car/list.vue"
 	import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
+	import {staffTrainTimeList} from "@/api/work/manage.js"
 	export default{
 		components:{carList},
 		data(){
@@ -57,18 +58,19 @@
 				downa:require('@/manage/static/community/downa.png'),
 				cxrq:"",
 				text:'',
-				list:[{tit:'皖A IC520',type:1,right:0},{tit:'晋E KD783',type:2,right:0},],
+				list:[],
 				pageSize: 10,
 				pageNum: 1,
 				reachflag: true,
 				wtdt:'',
-				tallflag:true,
+				tallflag:false,
 				tabval:'0',
-				tablist:[{tit:'全部',val:0},{tit:'待回复',val:1},{tit:'已回复',val:2},{tit:'已完成',val:2}]
+				tablist:[{tit:'全部',val:0},{tit:'待回复',val:1},{tit:'已回复',val:2},{tit:'已完成',val:2}],
+				total:0,
 			}
 		},
 		onLoad: function() {
-		
+			this.getDataFn()
 		},
 		// 上拉触底加载更多触发事件
 		onReachBottom() {
@@ -82,6 +84,21 @@
 			getDetail(){
 				this.$tab.navigateTo("/service/pages/service/complaintdetail")
 			},
+			getSort(){
+				var list=JSON.parse(JSON.stringify(this.list))
+				if(this.tallflag){
+					this.tallflag=false;
+					list.sort(function(a,b){
+					  return a['staffTime']-b['staffTime'];//升序
+					})
+				}else{
+					this.tallflag=true;
+					list.sort(function(a,b){
+					  return b['staffTime']-a['staffTime'];//降序
+					})
+				}
+				this.list=JSON.parse(JSON.stringify(list))
+			},
 			getConfirm(){
 				this.getrefreshData()
 			},
@@ -105,12 +122,17 @@
 			},
 			getDataFn(){
 				var params={
-					pageSize:this.pageSize,
-					pageNum: this.pageNum,
+					// pageSize:this.pageSize,
+					// pageNum: this.pageNum,
 				}
-				params.noticeType=this.tabidx
-				getNoticeList(params).then(res=>{
+				if(this.text){
+					params.staffName=this.text
+				}
+				staffTrainTimeList(params).then(res=>{
 					if(res.code==200){
+						if(res.total){
+							this.total=res.total;
+						}
 						if (res.rows.length < this.pageSize) {
 							this.reachflag = false
 							this.wtdt = '到底了~';
@@ -125,15 +147,15 @@
 							}
 						}
 						var newArr=JSON.parse(JSON.stringify(res.rows))
-						newArr.forEach(ite=>{
-							ite.right=0;
-						})
-						// console.log(newArr,555)
+						// newArr.forEach(ite=>{
+						// 	ite.right=0;
+						// })
 						if (this.pageNum == 1) {
 							this.list = newArr;
 						} else {
 							this.list = this.list.concat(newArr)
 						}
+						this.getSort();
 					}else{
 						this.$toast(res.msg)
 					}

+ 25 - 14
property_ui/manage/pages/community/readlist.vue

@@ -16,7 +16,7 @@
 				</view>
 			</view>
 			<view class="conttips">
-				<view class="toptip">当前已读人数共 <text>274</text>人</view>
+				<view class="toptip">当前已读人数共 <text>{{total}}</text>人</view>
 			</view>
 			<!-- <view class="tabtop flexc">
 				<view class="tabt" :class="tabval==ite.val?'act':''" v-for="(ite,idx) in tablist" :key="idx" @click="getTabFn(ite.val)">{{ite.tit}}</view>
@@ -35,6 +35,7 @@
 	const baseUrl = config.baseUrl
 	import carList from "@/manage/components/car/list.vue"
 	import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
+	import {manualgetRead} from "@/api/work/manage.js"
 	export default{
 		components:{carList},
 		data(){
@@ -44,17 +45,18 @@
 				up:require('@/car/static/car/up.png'),
 				cxrq:"",
 				text:'',
-				list:[{tit:'皖A IC520',type:1,right:0},{tit:'晋E KD783',type:2,right:0},],
+				list:[],
 				pageSize: 10,
 				pageNum: 1,
 				reachflag: true,
 				wtdt:'',
 				tabval:'0',
-				tablist:[{tit:'全部',val:0},{tit:'待回复',val:1},{tit:'已回复',val:2},{tit:'已完成',val:2}]
+				tablist:[{tit:'全部',val:0},{tit:'待回复',val:1},{tit:'已回复',val:2},{tit:'已完成',val:2}],
+				total:0,
 			}
 		},
 		onLoad: function() {
-		
+			this.getDataFn()
 		},
 		// 上拉触底加载更多触发事件
 		onReachBottom() {
@@ -66,7 +68,7 @@
 		methods:{
 			checkPermi, checkRole,
 			getDetail(){
-				this.$tab.navigateTo("/service/pages/service/complaintdetail")
+				// this.$tab.navigateTo("/service/pages/service/complaintdetail")
 			},
 			getConfirm(){
 				this.getrefreshData()
@@ -94,14 +96,23 @@
 					pageSize:this.pageSize,
 					pageNum: this.pageNum,
 				}
-				params.noticeType=this.tabidx
-				getNoticeList(params).then(res=>{
+				if(this.cxrq){
+					params.createTime=this.cxrq
+				}
+				if(this.text){
+					params.searchValue=this.text
+				}
+				manualgetRead(params).then(res=>{
 					if(res.code==200){
-						if (res.rows.length < this.pageSize) {
+						if(res.total){
+							this.total=res.total;
+						}
+						var data=res.data;
+						if (data.length < this.pageSize) {
 							this.reachflag = false
 							this.wtdt = '到底了~';
 						} else {
-							var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum -	1)
+							var num = parseInt(data.length) + parseInt(this.pageSize) * parseInt(this.pageNum -	1)
 							if (num < res.total) {
 								this.reachflag = true
 								this.wtdt = ''
@@ -110,11 +121,11 @@
 								this.wtdt = '到底了~';
 							}
 						}
-						var newArr=JSON.parse(JSON.stringify(res.rows))
-						newArr.forEach(ite=>{
-							ite.right=0;
-						})
-						// console.log(newArr,555)
+						var newArr=JSON.parse(JSON.stringify(data))
+						// newArr.forEach(ite=>{
+						// 	ite.right=0;
+						// })
+						// // console.log(newArr,555)
 						if (this.pageNum == 1) {
 							this.list = newArr;
 						} else {

+ 99 - 37
property_ui/manage/pages/community/sqmoney.vue

@@ -23,22 +23,10 @@
 		<!-- 左侧展示 -->
 		<uni-drawer ref="showLeft" mode="left" :width="320" @change="change($event,'showLeft')">
 			<view class="drwbox">
-				<view class="leftbox">
-					<view class="tit">房屋资产</view>
+				<view class="leftbox" v-for="(ite,idx) in assetTree">
+					<view class="tit">{{ite.label}}</view>
 					<view class="txts">
-						<view class="txt">住宅(1036)</view>
-						<view class="txt">商业(47</view>
-						<view class="txt">办公(72)</view>
-						<view class="txt">厂房(21)</view>
-					</view>
-				</view>
-				<view class="leftbox">
-					<view class="tit">房屋资产</view>
-					<view class="txts">
-						<view class="txt">住宅(1036)</view>
-						<view class="txt">商业(47</view>
-						<view class="txt">办公(72)</view>
-						<view class="txt">厂房(21)</view>
+						<view class="txt" @click="getTabFnb(aite.id,ite.id,idx)" v-for="(aite,aidx) in ite.children">{{aite.label}}({{ite.children.length}})</view>
 					</view>
 				</view>
 			</view>
@@ -55,6 +43,8 @@
 				  :isShowLoadMore="reachflag"
 				  :parameter="parameter"
 				  @pullUpLoading="pullUpLoading"
+				  @edit="getDetail"
+				  @dele="getDelFn"
 				  :data="list"></zb-table>
 				</block>
 				<block v-else>
@@ -73,11 +63,12 @@
 	import config from '@/config'
 	const baseUrl = config.baseUrl
 	// import {column1} from '@/manage/components/zb-table/all.js'
-	import zbTable from "@/manage/components/zb-table/zb-table.vue"
+	import zbTable from "@/manage/components/zb-table/zb-tables.vue"
 	import noData from "@/manage/components/nodata/nodata.vue"
 	import carList from "@/manage/components/car/list.vue"
 	import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
-	import {assetTypeList,assetTypeTree} from "@/api/work/manage.js"
+	import {assetTypeTree,assetsList,assetsDel} from "@/api/work/manage.js"
+	import {getDictionaryFn} from "@/api/system/user.js"
 	export default{
 		components:{carList,zbTable,noData},
 		data(){
@@ -100,12 +91,23 @@
 				
 				tabflag:true,
 				columns: [
-					{ name: 'tit', label: '设备名称',fixed:true,width:160,align:'center',},
-					{ name: 'num', label: '设备编码',align:'center',},
+					{ name: 'equipmentName', label: '设备名称',fixed:true,width:160,align:'center',},
+					{ name: 'equipmentNumber', label: '设备编码',align:'center',},
 					// { name: 'sex', label: '性别',filters:{0:'男',1:'女'}},
-					// { name: 'code', label: '设备二维码',align:'center',type:'img', },
-					{ name: 'code', label: '设备二维码',align:'center' },
-					{ name: 'yy', label: '状态',align:'center',type:"format",key:"sflalist"},
+					{ name: 'equipmentQrCode', label: '设备二维码',align:'center',type:'img', },
+					// { name: 'equipmentQrCode', label: '设备二维码',align:'center' },
+					{ name: 'equipmentStatus', label: '状态',align:'center',type:"format",key:"sbztList"},
+					{ name: 'operation', type:'operation',label: '操作',renders:[
+						{
+						    name:'编辑',
+						    func:'edit' // func 代表子元素点击的事件 父元素接收的事件 父元素 @edit
+						  },
+						  {
+						    name:'删除',
+						    type:'warn',
+						    func:"dele"
+						  },
+					]},
 					
 				 //    { name: 'sqmyNumber', label: '编号',width:230,align:'center', },
 				 //    { name: 'title', label: '信息标题 ',width:230,align:'center', },
@@ -114,7 +116,7 @@
 					// { name: 'sqmyProgress', label: '社情进度',align:'center',type:"format",key:"sqjdlist"},
 				],
 				parameter:{
-					sflalist:[ {label: '正常',value:'1'},{label: '停用',value:'2'},]
+					sbztList:[ {label: '正常',value:'1'},{label: '停用',value:'2'},]
 				},
 				tabval:'0',
 				tablist:[],
@@ -125,8 +127,14 @@
 				assetTree:[],//资产类型树
 			}
 		},
+		onUnload() {
+			uni.$off('assetsList')
+		},
 		onLoad: function() {
 			this.init()
+			uni.$on('assetsList',(res)=>{
+				this.getrefreshData()
+			})
 		},
 		// 上拉触底加载更多触发事件
 		onReachBottom() {
@@ -152,11 +160,25 @@
 							this.tabval=res.data[0].id;
 							var children=JSON.parse(JSON.stringify(res.data[0].children))
 							this.tablist=children;
-							this.tabval=children[0].id;
+							this.tabvala=children[0].id;
 							this.getDataFn()
 						}
 					}
 				})
+				//设备状态
+				getDictionaryFn('shebei_status').then(res=>{
+					if(res.code==200){
+						if(res.data){
+							this.sbztList = res.data.map(v => {
+								return {
+									dictLabel: v.dictLabel,
+									dictValue: v.dictValue
+								}
+							})
+							this.parameter.sbztList=JSON.parse(JSON.stringify(this.sbztList))
+						}
+					}
+				})	
 			},
 			pullUpLoading(e){
 				
@@ -184,19 +206,14 @@
 				console.log((type === 'showLeft' ? '左窗口' : '右窗口') + (e ? '打开' : '关闭'));
 				this[type] = e
 			},
-			getDetailhd(){
-				
+			getDetail(data){
+				var id=data.communityAssetId;
+				this.$tab.navigateTo("/manage/pages/community/sqmoneyadd?id="+id)
 			},
 			getAddFn(){
 				this.$tab.navigateTo("/manage/pages/community/sqmoneyadd")
 			},
-			getTabFn(val,idx){
-				var list=JSON.parse(JSON.stringify((this.assetTree)))
-				this.tabval=val;
-				var children=list[idx].children
-				this.tablist=children;
-				this.tabval=children[0].id;
-			},
+			
 			getConfirm(){
 				this.getrefreshData()
 			},
@@ -211,17 +228,62 @@
 				this.reachflag=true;
 				this.getDataFn()
 			},
+			getTabFn(val,idx){
+				var list=JSON.parse(JSON.stringify((this.assetTree)))
+				this.tabval=val;
+				var children=list[idx].children
+				this.tablist=children;
+				this.tabvala=children[0].id;
+				this.getrefreshData()
+			},
 			getTabFna(val){
-				this.tabvala=val
+				this.tabvala=val;
+				this.getrefreshData()
+			},
+			getTabFnb(val,aid,idx){
+				var list=JSON.parse(JSON.stringify((this.assetTree)))
+				var children=list[idx].children
+				this.tablist=children;
+				this.$refs['showLeft'].close()
+				this.tabvala=val;
+				this.tabval=aid
+				this.getrefreshData()
+			},
+			getDelFn(data){
+				var id=data.communityAssetId;
+				var that=this;
+				uni.showModal({
+					title: '确认删除',
+					content: "是否确认删除",
+					cancelText: '取消',
+					confirmText: '确认',
+					success: function(res) {
+						if (res.confirm) {
+							assetsDel(id).then(res=>{
+								if(res.code==200){
+									that.$toast("删除成功");
+									setTimeout(function(){
+										that.getrefreshData()
+									},1500)
+								}
+							})
+						} else if (res.cancel) {
+						}
+					}
+				});
+				
 			},
 			getDataFn(){
 				var params={
 					pageSize:this.pageSize,
 					pageNum: this.pageNum,
 				}
-				params.assetId=this.tabval
-				params.parentId=this.tabval
-				assetTypeList(params).then(res=>{
+				params.assetId=this.tabvala;
+				if(this.text){
+					params.equipmentName=this.text;
+				}
+				// params.parentId=this.tabval
+				assetsList(params).then(res=>{
 					if(res.code==200){
 						if (res.rows.length < this.pageSize) {
 							this.reachflag = false

+ 253 - 64
property_ui/manage/pages/community/sqmoneyadd.vue

@@ -5,48 +5,112 @@
 			<view class="cbox">
 				<view class="chmain">
 					<uni-forms-item label="资讯类型" name="phonenumber">
-						<!-- <picker range-key='dictLabel' :value="syqxidx" :range="sexs"   @change='bindDateChange'>
-							<view class="flexc">
-								<view class="flex1 txr f13" :class="datainfo.iszc?'co27':'coa'">{{datainfo.iszc?'是':'请选择资讯类型'}}</view>
-								<view class="rimg"><image :src="rimg"></image></view>
-							</view>
-						</picker> -->
-						<uni-data-picker :map="map" placeholder="请选择" popup-title="请选择" :localdata="assetTree" v-model="classes"
-							@change="onchange" @nodeclick="onnodeclick" @popupopened="onpopupopened" @popupclosed="onpopupclosed">
+						<uni-data-picker :map="map" :disabled="isdisabled" placeholder="请选择" popup-title="请选择" :localdata="assetTree" v-model="datainfo.assetId"
+							@change="onchange" >
 						</uni-data-picker>
 					</uni-forms-item>
+					<!-- @nodeclick="onnodeclick" @popupopened="onpopupopened" @popupclosed="onpopupclosed" -->
 				</view>
 			</view>
 			<view class="cbox" style="flex: 1;">
 				<view class="chmain">
-					<uni-forms-item label-width='0' name="realName">
-						<uni-easyinput type="textarea" autoHeight v-model="datainfo.realName"  :inputBorder='false' placeholder="资产名称" />
+					<uni-forms-item label="资产名称" required name="equipmentName">
+						<view class="flexc">
+							<uni-easyinput type="textarea"  :disabled="isdisabled" autoHeight v-model="datainfo.equipmentName" :inputBorder='false' />
+							<view class="rimg"><image :src="rimg"></image></view>
+						</view>
 					</uni-forms-item>
-					<uni-forms-item label-width='0' name="realName">
-						<uni-easyinput type="textarea" autoHeight v-model="datainfo.realName"  :inputBorder='false' placeholder="购买时间" />
+					<uni-forms-item label="资产编号" name="equipmentNumber">
+						<view class="flexc">
+							<uni-easyinput type="textarea" :disabled="isdisabled" autoHeight v-model="datainfo.equipmentNumber" :inputBorder='false' />
+							<view class="rimg"><image :src="rimg"></image></view>
+						</view>
+					</uni-forms-item>
+					<uni-forms-item label="资产型号" name="equipmentModel">
+						<view class="flexc">
+							<uni-easyinput type="textarea" :disabled="isdisabled" autoHeight v-model="datainfo.equipmentModel" :inputBorder='false' />
+							<view class="rimg"><image :src="rimg"></image></view>
+						</view>
 					</uni-forms-item>
-					<uni-forms-item label-width='0' name="realName">
-						<uni-easyinput type="textarea" autoHeight v-model="datainfo.realName"  :inputBorder='false' placeholder="用途描述" />
+					<uni-forms-item label="存放位置或使用位置" name="equipmentLocation">
+						<view class="flexc">
+							<uni-easyinput type="textarea" :disabled="isdisabled" autoHeight v-model="datainfo.equipmentLocation" :inputBorder='false' />
+							<view class="rimg"><image :src="rimg"></image></view>
+						</view>
 					</uni-forms-item>
-					<uni-forms-item label-width='0' name="realName">
-						<uni-easyinput type="textarea" autoHeight v-model="datainfo.realName"  :inputBorder='false' placeholder="资产状态" />
+					<uni-forms-item label="购买价格" name="equipmentPrice">
+						<view class="flexc">
+							<uni-easyinput type="textarea" :disabled="isdisabled" autoHeight v-model="datainfo.equipmentPrice" :inputBorder='false' />
+							<view class="rimg"><image :src="rimg"></image></view>
+						</view>
 					</uni-forms-item>
-					<uni-forms-item label-width='0' name="realName">
-						<uni-easyinput type="textarea" autoHeight v-model="datainfo.realName"  :inputBorder='false' placeholder="备注信息" />
+					<uni-forms-item label="购买时间" name="purchaseDate">
+						<picker mode="date" :disabled="isdisabled"  @change='bindDateChangea'>
+							<view class="flexc">
+								<view class="flex1 txr f13"  :class="datainfo.purchaseDate?'co27':'coa'">{{datainfo.purchaseDate||"请选择购买时间"}}</view>
+								<view class="rimg"><image :src="rimg"></image></view>
+							</view>
+						</picker>
 					</uni-forms-item>
-					<view class="imgs">
-						<view class="img" @click="getPreview">
-							<image :src="car" class="pimg"></image>
-							<image :src="del" class="del" @click="getDelFn"></image>
+					<uni-forms-item label="资产状态" name="equipmentStatus">
+						<picker range-key='dictLabel' :disabled="isdisabled" :value="sbztidx" :range="sbztList"   @change='bindDateChange'>
+							<view class="flexc">
+								<view class="flex1 txr f13 co27" v-if="datainfo.equipmentStatus&&!sbzt">{{statusFormats(datainfo.equipmentStatus,sbztList,'sbzt')}}</view>
+								<view class="flex1 txr f13" v-else :class="sbzt?'co27':'coa'">{{sbzt||"请选择设备状态"}}</view>
+								<view class="rimg"><image :src="rimg"></image></view>
+							</view>
+						</picker>
+					</uni-forms-item>
+					<uni-forms-item label="用途描述" name="equipmentPurpose">
+						<view class="flexc">
+							<uni-easyinput type="textarea" :disabled="isdisabled" autoHeight v-model="datainfo.equipmentPurpose" :inputBorder='false' />
+							<view class="rimg"><image :src="rimg"></image></view>
 						</view>
-						<view class="addbox" @click="getaddImage">
-							<image :src="photo"></image>
-							<view>添加图片</view>
+					</uni-forms-item>
+					<uni-forms-item label="车牌号" name="plateNumber">
+						<view class="flexc">
+							<uni-easyinput type="textarea" :disabled="isdisabled" autoHeight v-model="datainfo.plateNumber" :inputBorder='false' />
+							<view class="rimg"><image :src="rimg"></image></view>
 						</view>
-					</view>
+					</uni-forms-item>
+					<uni-forms-item label="备注信息" name="remark">
+						<view class="flexc">
+							<uni-easyinput type="textarea" :disabled="isdisabled" autoHeight v-model="datainfo.remark" :inputBorder='false' />
+							<view class="rimg"><image :src="rimg"></image></view>
+						</view>
+					</uni-forms-item>
+					<uni-forms-item label="设备封面" name="remark">
+						<view class="imgs">
+							<block v-if="fmphofile&&fmphofile.length">
+								<view class="img" v-for="(ite,idx) in fmphofile" :key="idx" @click="getPreview(idx,fmphofile)">
+									<image :src="baseUrl+ite" class="pimg"></image>
+									<image :src="del" class="del" @click.stop="getDelFn(idx,'fm')"></image>
+								</view>
+							</block>
+							<view class="addbox" @click="getaddImage('fm')">
+								<image :src="photo"></image>
+								<view>添加图片</view>
+							</view>
+						</view>
+					</uni-forms-item>
+					<uni-forms-item label="设备图片" name="remark">
+						<view class="imgs">
+							<block v-if="phofile&&phofile.length">
+								<view class="img" v-for="(ite,idx) in phofile" :key="idx" @click="getPreview(idx,phofile)">
+									<image :src="baseUrl+ite" class="pimg"></image>
+									<image :src="del" class="del" @click.stop="getDelFn(idx,'tp')"></image>
+								</view>
+							</block>
+							<view class="addbox" @click="getaddImage('tp')">
+								<image :src="photo"></image>
+								<view>添加图片</view>
+							</view>
+						</view>
+					</uni-forms-item>
 				</view>
 			</view>
-			<view class="rfbtn" @click="getSubmit">确定</view>
+			<view class="rfbtn" @click="getEditFn" v-if="isdisabled">修改</view>
+			<view class="rfbtn" @click="getSubmit" v-else>发布</view>
 			<loading></loading>
 			</view>
 		</uni-forms>
@@ -57,8 +121,9 @@
 	import config from '@/config'
 	import editorBox from "@/manage/components/editor/editor.vue"
 	import {checkPermi,checkRole} from "@/utils/permission"; // 权限判断函数
-	import {uploadIdentify} from '@/utils/common.js'
-	import {assetTypeAdd,assetTypeTree} from "@/api/work/manage.js"
+	import {uploadmore,selectValueKey,selectValue} from '@/utils/common.js'
+	import {getDictionaryFn} from "@/api/system/user.js"
+	import {assetsAdd,assetTypeTree,assetsPut,assetsDet} from "@/api/work/manage.js"
 	export default {
 		components: {editorBox},
 		data() {
@@ -69,50 +134,172 @@
 				del:require('@/service/static/service/rdel.png'),
 				baseUrl: config.baseUrl,
 				datainfo: {
-					"parentId":"",//父资产类型id
-					"ancestors":"",//祖级列表
-					"assetName":"",//资产类型名称
-					"orderNum":"",//显示顺序
-					"status":"",//资产类型状态(0正常 1停用)
-					"delFlag":"",//删除标志(0代表存在 2代表删除)
-					"parentName":"",//父资产名称
-					"children":"",//子资产类型
+					// "communityAssetId":"",//资产ID
+					"assetId":"",//资产类型id
+					"assetName":"",//资产类型,如设备、车辆等
+					"equipmentName":"",//设备名称
+					"equipmentCoverPhoto":"",//设备封面照片的存储路径
+					"equipmentNumber":"",//设备编号
+					// "equipmentQrCode":"",//设备二维码的存储路径或内容
+					"equipmentStatus":"",//设备状态,如正常、维修中、报废等
+					"equipmentModel":"",//设备型号
+					"purchaseDate":"",//设备购买时间
+					"equipmentPurpose":"",//设备用途描述
+					"equipmentLocation":"",//设备存放位置或使用位置
+					"equipmentPrice":"",//设备购买价格
+					// "storageTime":"",//设备入库时间
+					// "storagePerson":"",//入库操作人
+					// "outboundTime":"",//设备出库时间
+					// "outboundPerson":"",//出库操作人
+					"plateNumber":"",//车牌号(如果是车辆类资产)
+					// "equipmentPhotos":"",//设备照片的存储路径
+					// "maintenanceDate":"",//最近维护日期
+					// "maintenancePerson":"",//维护操作人
+					// "warrantyPeriod":"",//保修期(月)
+					// "depreciationRate":"",//折旧率(百分比)
+					"remark":'',//备注
 				},
 				assetTree:[],
+				sbzt:'',
+				sbztidx:0,
+				sbztList:[],//
 				map:{text:'label',value:'id'},
+				fmphofile:[],
 				phofile:[],
+				id:'',
+				ptype:"add",
+				isdisabled:false,
 			}
 		},
-		onLoad: function() {
+		onLoad: function(e) {
 			this.init()
+			if(e.id){
+				this.id=e.id;
+				this.ptype='edit';
+				this.isdisabled=true;
+				this.getDetailFn()
+			}
 		},
 		methods: {
 			checkPermi,
 			checkRole,
+			getEditFn(){
+				this.isdisabled=false;
+			},
+			statusFormats(data, list,type) {
+				var aite=selectValueKey(list, data);
+				if(type=='sbzt'){
+					this.sbztidx=aite.key
+				}
+				return aite.actions;
+			},
 			init(){
 				assetTypeTree().then(res=>{
 					if(res.code==200){
 						this.assetTree=res.data;
-						// if(res.data&&res.data.length){
-						// 	this.tabval=res.data[0].id;
-						// 	var children=JSON.parse(JSON.stringify(res.data[0].children))
-						// 	this.tablist=children;
-						// 	this.tabval=children[0].id;
-						// 	this.getDataFn()
-						// }
 					}
 				})
+				//设备状态
+				getDictionaryFn('shebei_status').then(res=>{
+					if(res.code==200){
+						if(res.data){
+							this.sbztList = res.data.map(v => {
+								return {
+									dictLabel: v.dictLabel,
+									dictValue: v.dictValue
+								}
+							})
+						}
+					}
+				})	
 			},
 			onchange(e){
-				console.log(e)
+				var list=e.detail.value;
+				var id=this.datainfo.assetId
+				var name=selectValue(list,id)
+				this.datainfo.assetName=name;
+			},
+			getDetailFn(){
+				var that=this;
+				assetsDet(this.id).then(res=>{
+					if(res.code==200){
+						this.datainfo=res.data;
+						if(res.data.equipmentCoverPhoto){
+							this.fmphofile=res.data.equipmentCoverPhoto.split(',')
+						}
+						if(res.data.equipmentPhotos){
+							this.phofile=res.data.equipmentPhotos.split(',')
+						}
+					}
+				})
 			},
 			getSubmit(){
-				
+				var that=this;
+				this.$refs.form.validate().then(res => {
+					var params=JSON.parse(JSON.stringify(this.datainfo))
+					var phofile=JSON.parse(JSON.stringify(this.phofile))
+					if(phofile&&phofile.length){
+						params.equipmentPhotos=this.phofile.join(',');
+					}
+					var fmphofile=JSON.parse(JSON.stringify(this.fmphofile))
+					if(fmphofile&&fmphofile.length){
+						params.equipmentCoverPhoto=this.fmphofile.join(',');
+					}
+					if(!params.assetId){
+						this.$toast('请选择资产类型')
+						return
+					}
+					if(!params.equipmentName){
+						this.$toast('请输入资产名称')
+						return
+					}
+					if(!params.equipmentNumber){
+						this.$toast('请输入资产编号')
+						return
+					}
+					if(this.ptype=='add'){
+						assetsAdd(params).then(res=>{
+							if(res.code==200){
+								this.$toast("新增成功")
+								setTimeout(function(){
+									uni.$emit("assetsList")
+									uni.navigateBack({
+										delta:1
+									})
+								},1500)
+							}
+						})
+					}else{
+						assetsPut(params).then(res=>{
+							if(res.code==200){
+								this.$toast("修改成功")
+								setTimeout(function(){
+									uni.$emit("assetsList")
+									uni.navigateBack({
+										delta:1
+									})
+								},1500)
+							}
+						})
+					}	
+				})
 			},
 			bindDateChange(e){
 				var val=e.detail.value;
-				// this.datainfo.applicationBank=this.sdyhlist[val].value;
-				// this.applicationBank=this.sdyhlist[val].label;
+				this.datainfo.equipmentStatus=this.sbztList[val].dictValue;
+				this.sbzt=this.sbztList[val].dictLabel;
+			},
+			bindDateChangea(e){
+				var val=e.detail.value;
+				this.datainfo.purchaseDate=val;
+			},
+			bindDateChangeb(e){
+				var val=e.detail.value;
+				this.datainfo.storageTime=val;
+			},
+			bindDateChangec(e){
+				var val=e.detail.value;
+				this.datainfo.outboundTime=val;
 			},
 			getPreview(idx,arr) {
 				var newArr=[];
@@ -127,7 +314,7 @@
 					fail: function(err) {}
 				});
 			},
-			getDelFn(){
+			getDelFn(idx,type){
 				var that=this;
 				uni.showModal({
 					title: '确认删除',
@@ -136,24 +323,22 @@
 					confirmText: '确认',
 					success: function(res) {
 						if (res.confirm) {
-							// that.filelist.splice(idx,1)
+							if(type=='fm'){
+								that.fmphofile.splice(idx,1)
+							}else{
+								that.phofile.splice(idx,1)
+							}
+							
 						} else if (res.cancel) {
 						}
 					}
 				});
 			},
-			getaddImage(e){
+			getaddImage(type){
+				if(this.isdisabled){
+					return
+				}
 				let that = this;
-				// var rs=['D:\\idcard.png']
-				// if(rs&&rs.length>0){
-				// 	var obj={
-				// 		type:e,
-				// 		// url:baseUrl+rs.join(',')
-				// 		url:rs.join(',')
-				// 	}
-				// 	that.getOcrIdCard(obj)
-				// }
-				// return
 				let file =[],count=9
 				uni.chooseImage({
 					success:function(res){
@@ -168,7 +353,11 @@
 							let imglen = res.tempFilePaths.length;
 							var fuwufile = [];
 							uploadmore('/common/upload',img,0,0,0,imglen,fuwufile,function(rs){
-								that.phofile = that.phofile.concat(rs);
+								if(type=="fm"){
+									that.fmphofile = that.fmphofile.concat(rs);
+								}else{
+									that.phofile = that.phofile.concat(rs);
+								}
 							})	
 						}
 					}
@@ -184,7 +373,7 @@
 .check /deep/ .uni-forms-item{min-height: 106rpx;box-sizing: border-box;display: flex;align-items: center;margin-bottom: 0;border-bottom: 2rpx solid #E6E6E6;padding:10rpx 0;}
 .check .cbox /deep/ .uni-forms-item:last-child{border: none;}
 .check /deep/ .uni-forms-item__label{font-weight: bold;font-size: 26rpx;color: #222327;flex: 0 0 auto;width: auto !important;}
-.check /deep/ .uni-easyinput{flex: 1;text-align: left;font-size: 26rpx;color: #222327;}
+.check /deep/ .uni-easyinput{flex: 1;text-align: right;font-size: 26rpx;color: #222327;}
 .check /deep/ .uni-easyinput__content-textarea{min-height: 40rpx;font-size: 26rpx;}
 .check /deep/ .uni-easyinput__placeholder-class{font-size: 26rpx;color: #AAAAAA;}
 .check /deep/ .uni-easyinput__content-input{padding-left: 0 !important;}

BIN
property_ui/manage/static/news/eye.png


BIN
property_ui/manage/static/news/head.png


BIN
property_ui/manage/static/news/nicona.png


BIN
property_ui/manage/static/news/niconb.png


BIN
property_ui/manage/static/news/niconc.png


BIN
property_ui/manage/static/news/nicond.png


BIN
property_ui/manage/static/news/nicone.png


BIN
property_ui/manage/static/news/stara.png


BIN
property_ui/manage/static/news/starb.png


+ 18 - 0
property_ui/pages.json

@@ -165,6 +165,15 @@
 					}
 				}
 			},
+			{
+				"path": "pages/community/newssqdetail",
+				"style": {
+					"navigationBarTitleText": "资讯详情",
+					"h5":{
+						"titleNView":false
+					}
+				}
+			},
 			{
 				"path": "pages/community/newsyg",
 				"style": {
@@ -183,6 +192,15 @@
 					}
 				}
 			},
+			{
+				"path": "pages/community/newsygdetail",
+				"style": {
+					"navigationBarTitleText": "图文详情",
+					"h5":{
+						"titleNView":false
+					}
+				}
+			},
 			{
 				"path": "pages/community/newsaddvideo",
 				"style": {

+ 7 - 7
property_ui/pages/index/index.vue

@@ -152,11 +152,11 @@
 					<view>物业服务</view>
 				</view>
 				<view class="lists">
-					<view class="list bimga" @click="getPatrolFn">
+					<view class="list bimga" @click="getPatrolFn" v-if="checkPermi(['wuYe:checkPointRecord:list'])">
 						<view class="imgs"><image :src="htabi" class="imgg"></image></view>
 						<view class="txt">今日巡更</view>
 					</view>
-					<view class="list bimga" @click="getWarrantyFn">
+					<view class="list bimga" @click="getWarrantyFn" v-if="checkPermi(['wuYe:repair:list'])">
 						<view class="imgs"><image :src="htabj" class="imgb"></image><view class="tips">3</view>
 						</view>
 						<view class="txt">物业报修</view>
@@ -165,7 +165,7 @@
 						<view class="imgs"><image :src="htabk" class="imgb"></image></view>
 						<view class="txt">员工管理</view>
 					</view>
-					<view class="list bimga" @click="getComplaintFn">
+					<view class="list bimga" @click="getComplaintFn" v-if="checkPermi(['wuYe:suggestion:list'])">
 						<view class="imgs"><image :src="htabl" class="imga"></image><view class="tips">1</view></view>
 						<view class="txt">投诉建议</view>
 					</view>
@@ -177,19 +177,19 @@
 					<view>社区管理</view>
 				</view>
 				<view class="lists">
-					<view class="list bimga" @click="getNewsdjFn">
+					<view class="list bimga" @click="getNewsdjFn" v-if="checkPermi(['wuYe:partyNews:list'])">
 						<view class="imgs"><image :src="htabm" class="imgh"></image></view>
 						<view class="txt">党建信息</view>
 					</view>
-					<view class="list bimga" @click="getNewssqFn">
+					<view class="list bimga" @click="getNewssqFn" v-if="checkPermi(['wuYe:news:list'])">
 						<view class="imgs"><image :src="htabn" class="imgi"></image><view class="tips">27</view></view>
 						<view class="txt">社区资讯</view>
 					</view>
-					<view class="list bimga" @click="getNewsYgFn">
+					<view class="list bimga" @click="getNewsYgFn" v-if="checkPermi(['wuYe:manual:list'])">
 						<view class="imgs"><image :src="htabo" class="imgf"></image></view>
 						<view class="txt">员工培训</view>
 					</view>
-					<view class="list bimga" @click="getSqmoneyFn">
+					<view class="list bimga" @click="getSqmoneyFn" v-if="checkPermi(['wuYe:assets:list'])">
 						<view class="imgs"><image :src="htabp" class="imgi"></image></view>
 						<view class="txt">社区资产</view>
 					</view>

+ 38 - 26
property_ui/service/components/car/list.vue

@@ -43,42 +43,48 @@
 		</block>
 		<!-- 报修管理 -->
 		<block v-if="type=='warranty'">
-			<view class="walists" v-for="(ite,idx) in datainfo" :key="idx" @click="getDetail">
-				<view class="watop ">
-					<view class="watit">
-						<view class="tit">一号楼3单元12楼楼梯间灯不亮</view>
-						<view class="txt co01" v-if="ite.type==1">待分派</view>
-						<view class="txt coa" v-if="ite.type==3">已完成</view>
-						<view class="txt co28" v-if="ite.type==2">处理中</view>
+			<view class="walists" v-for="(ite,idx) in datainfo" :key="idx" @click="getDetail(ite.repairId)"
+				:data-idx="idx"
+				@touchstart="drawStart" @touchmove="drawMove" @touchend="drawEnd" :style="'right:'+ite.right+'px'"
+			>
+				<view class="delleft">
+					<view class="watop ">
+						<view class="watit">
+							<view class="tit">{{ite.repairTitle}}</view>
+							<view class="txt co01":class="{'co01':ite.repairStatus=='1','coa':ite.repairStatus=='3','co28':ite.repairStatus=='3'}">{{kaType(ite.repairStatus,tsjyList)}}</view>
+							<!-- <view class="txt coa" v-if="ite.type==3">已完成</view>
+							<view class="txt co28" v-if="ite.type==2">处理中</view> -->
+						</view>
+						<view class="walist"><view class="tit">小区名称</view>:{{ite.portalId}}</view>
+						<view class="walist"><view class="tit">报修门户</view>:{{ite.houseAddress}}</view>
+						<view class="walist"><view class="tit">报修时间</view>:{{ite.repairTime}}</view>
+						<view class="walist" v-if="ite.type==3"><view class="tit" >完成时间</view>:{{ite.completionTime}}</view>
+					</view>
+					<view class="wabtn">
+						<view>查看详情</view>
+						<image :src="rimg"></image>
 					</view>
-					<view class="walist"><view class="tit">小区名称</view>:幸福小区</view>
-					<view class="walist"><view class="tit">报修门户</view>:3号楼1单元406</view>
-					<view class="walist"><view class="tit">报修时间</view>:2024-11-14 17:16:31</view>
-					<view class="walist" v-if="ite.type==3"><view class="tit" >完成时间</view>:2024-11-14 18:16:31</view>
-				</view>
-				<view class="wabtn">
-					<view>查看详情</view>
-					<image :src="rimg"></image>
 				</view>
+				<view class="spdel" v-if="ite.right>0&&checkPermi(['wuYe:repair:remove'])" @click.stop="getDelFn(ite.repairId)">删除</view>
 			</view>
 		</block>
 		<!-- 投诉建议 -->
 		<block v-if="type=='complaint'">
-			<view class="walists" v-for="(ite,idx) in datainfo" :key="idx" @click="getDetail"
+			<view class="walists" v-for="(ite,idx) in datainfo" :key="idx" @click="getDetail(ite.suggestionId)"
 				:data-idx="idx"
 				@touchstart="drawStart" @touchmove="drawMove" @touchend="drawEnd" :style="'right:'+ite.right+'px'"
 			>
 				<view class="watop watopcom">
 					<view class="watit">
-						<view class="tit">小区电梯老化</view>
-						<view class="txt co01" v-if="ite.type==1">待回复</view>
-						<view class="txt coa" v-if="ite.type==2">已回复</view>
+						<view class="tit">{{ite.title}}</view>
+						<view class="txt" :class="ite.status==1?'co01':'coa'">{{kaType(ite.status,tsjyList)}}</view>
+						<!-- <view class="txt coa">已回复</view> -->
 					</view>
-					<view class="watopcoma overtwo">小区电梯时常发生问题,请物业派维修人员进行安全检 查,若无法排除问题,建议更换小区的电梯设备,避…</view>
-					<view class="watopcomb">2024-11-18 08:16:54</view>
+					<view class="watopcoma overtwo">{{ite.content}}</view>
+					<view class="watopcomb">{{ite.createTime}}</view>
 				</view>
 				<!--  -->
-				<view class="spdel" v-if="ite.right>0" @click.stop="getDelFn()">删除</view>
+				<view class="spdel" v-if="ite.right>0&&checkPermi(['wuYe:suggestion:remove'])" @click.stop="getDelFn(ite.suggestionId)">删除</view>
 			</view>
 			<!-- checkPermi(['system:menuFood:remove'])&& -->
 			
@@ -120,13 +126,19 @@
 					return 0
 				}
 			},
-			topval:{
-				type:String,
+			xglxlist:{
+				type:Array,
 				default () {
-					return ''
+					return []
 				}
 			},
-			xglxlist:{
+			tsjyList:{
+				type:Array,
+				default () {
+					return []
+				}
+			},
+			bxztList:{
 				type:Array,
 				default () {
 					return []

+ 110 - 77
property_ui/service/components/popup/popup.vue

@@ -6,48 +6,41 @@
 		<view v-if="type=='assign'" class="assignbox">
 			<view class="assbox">
 				<view class="asstit">报修指派</view>
-				<picker range-key='dictLabel' :value="syqxidx" :range="sexs"   @change='bindDateChange'>
+				<picker range-key='dictLabel' disabled="true" :value="syqxidx" :range="sexs"   @change='bindDateChange'>
 					<view class="flexc asline">
-						<view class="flex1  f13" :class="datainfo.iszc?'co27':'coa'">{{datainfo.iszc?'是':'请选择是类型'}}</view>
+						<!-- <view class="flex1  f13" :class="datainfo.iszc?'co27':'coa'">{{datainfo.iszc?'是':'请选择维修类型'}}</view> -->
+						<view class="flex1 co27 f13">{{kaType(bxlb,bxlbList)}}</view>
 						<view class="rimg"><image :src="rimg"></image></view>
 					</view>
 				</picker>
 				<view class="tabtit">选择维修师傅</view>
 				<view class="asslists">
-					<view class="asslist" :class="peoval==ite.val?'act':''" v-for="(ite,idx) in peolist" :key="idx" @click="getChose(ite.val)">
-						<image :src="headbg" v-if="peoval==ite.val"></image>
-						<view class="altit">{{ite.name}}</view>
-						<view class="altxt cof6" v-if="ite.type==0">指派中</view>
-						<view class="altxt co28" v-if="ite.type==1">空闲中</view>
+					<view class="asslist" :class="peoval==ite.staffId?'act':''" v-for="(ite,idx) in peolist" :key="idx" @click="getChose(ite.staffId,ite)">
+						<image :src="headbg" v-if="peoval==ite.staffId"></image>
+						<view class="altit">{{ite.staffName}}</view>
+						<view class="altxt " :class="{'cof6':ite.status==0,'co28':ite.status==1,}">{{kaType(ite.status,vxsztList)}}</view>
+						<!-- <view class="altxt co28" v-if="ite.status==1">空闲中</view> -->
 					</view>
 				</view>
-				<view class="rhbtn"  @click="getSure">确定</view>
+				<view class="rhbtn"  @click="getSure('assign')">确定</view>
 			</view>
 			<image :src="closeimg" class="closeimg"  @click="getClose"></image>
 		</view>
 		<!-- 上门打卡 -->
 		<view v-if="type=='assigncheck'" class="assignbox pra">
 			<view class="assbox">
-				<view class="asstit">{{finshtype==2?'完成打卡':'上门打卡'}}</view>
-				<view class="assadd">
+				<view class="asstit">{{finshtype==3?'完成打卡':'上门打卡'}}</view>
+				<view class="assadd" @click="getaddImage">
 					<image :src="addpho"></image>
 					<view>去拍照</view>
 				</view>
-				<view class="assimgs">
-					<view class="assimg">
-						<image :src="headbg" class="img"></image>
-						<image :src="rdelimg" class="delimg" @click="getDelFn"></image>
-					</view>
-					<view class="assimg">
-						<image :src="headbg" class="img"></image>
-						<image :src="rdelimg" class="delimg" @click="getDelFn"></image>
-					</view>
-					<view class="assimg">
-						<image :src="headbg" class="img"></image>
-						<image :src="rdelimg" class="delimg" @click="getDelFn"></image>
+				<view class="assimgs" v-if="phofile&&phofile.length">
+					<view class="assimg" v-for="(ite,idx) in phofile" :key="idx" @click="getPreview(idx,phofile)">
+						<image :src="baseUrl+ite" class="img"></image>
+						<image :src="rdelimg" class="delimg" @click.stop="getDelFn(idx)"></image>
 					</view>
 				</view>
-				<view class="rhbtn"  @click="getSure">确定</view>
+				<view class="rhbtn"  @click="getSure('assigncheck')">确定</view>
 			</view>
 			<image :src="closeimg" class="closeimg"  @click="getClose"></image>
 		</view>
@@ -55,7 +48,7 @@
 		<view v-if="type=='reply'" class="assignbox pra">
 			<view class="assbox">
 				<view class="asstit">回复</view>
-				<uni-easyinput maxlength='200' type="textarea" autoHeight v-model="datainfo.companyIntroduction" :inputBorder='false' placeholder="请输入回复内容,最多不超过200字…" />
+				<uni-easyinput maxlength='200' type="textarea" autoHeight v-model="text" :inputBorder='false' placeholder="请输入回复内容,最多不超过200字…" />
 				<view class="voice mb20">
 					<view class="flexc">
 						<image :src="voice"></image>
@@ -63,8 +56,9 @@
 					</view>
 				</view>
 				<view class="fjtxt mb18 flexcj">附件信息
-					<lsj-upload ref="lsjUpload" childId="upload1" :loanApplicationId="loanApplicationId" :width="width" :height="height" :option="option" :size="size" :formats="formats" :debug="debug" :instantly="instantly"
-						    @progress="" @uploadEnd="onuploadEnd" fileName="123" fileVal='dbxmhfhgb' bigType="c">
+					<lsj-upload ref="lsjUpload" childId="upload1"  :width="width" :height="height" :option="option" :size="size" :formats="formats" :debug="debug" :instantly="instantly"
+						    @progress="" @uploadEnd="onuploadEnd" fileVal="1" bigType="1">
+							<!-- fileName="123" fileVal='dbxmhfhgb' bigType="c" -->
 						<view class="fjbtns co02" :style="{width: width,height: height}">上传附件</view>
 					</lsj-upload>
 				</view>
@@ -77,7 +71,7 @@
 						<image :src="fdelimg"></image>
 					</view>
 				</view>
-				<view class="rhbtn mt40"  @click="getSure">确定</view>
+				<view class="rhbtn mt40"  @click="getSure('reply')">确定</view>
 			</view>
 			
 			<image :src="closeimg" class="closeimg"  @click="getClose"></image>
@@ -90,6 +84,7 @@
 	const baseUrl = config.baseUrl
 	import { getToken } from '@/utils/auth'
 	import {uploadmore} from '@/utils/common.js'
+	import {selectDictValue} from "@/utils/common.js"
 	export default{
 		components:{},
 		props:{
@@ -104,6 +99,36 @@
 				default () {
 					return ''
 				}
+			},
+			suggestionId:{
+				type: [String,Number],
+				default () {
+					return ''
+				}
+			},
+			peolist:{
+				type: Array,
+				default () {
+					return []
+				}
+			},
+			vxsztList:{
+				type: Array,
+				default () {
+					return []
+				}
+			},
+			bxlbList:{
+				type: Array,
+				default () {
+					return []
+				}
+			},	
+			bxlb:{
+				type: [String,Number],
+				default () {
+					return ''
+				}
 			}
 		},
 		data(){
@@ -111,24 +136,7 @@
 				//附件
 				option: {
 				    // 上传服务器地址,需要替换为你的接口地址
-				    url: baseUrl+'/common/uploadNew', // 该地址非真实路径,需替换为你项目自己的接口地址
-				    // 上传附件的key
-				    name: 'file',
-				    // 根据你接口需求自定义请求头,默认不要写content-type,让浏览器自适配
-				    header: {
-				        // 示例参数可删除
-				        'Authorization':  'Bearer ' + getToken(),
-				    },
-				    // 根据你接口需求自定义body参数
-				    formData: {
-						loanApplicationNumber:'',
-						loanApplicationId:'',
-					}
-				},
-				// 借据上传
-				jjoption: {
-				    // 上传服务器地址,需要替换为你的接口地址
-				    url: baseUrl+'/common/uploadNewOcr', // 该地址非真实路径,需替换为你项目自己的接口地址
+				    url: baseUrl+'/common/upload', // 该地址非真实路径,需替换为你项目自己的接口地址
 				    // 上传附件的key
 				    name: 'file',
 				    // 根据你接口需求自定义请求头,默认不要写content-type,让浏览器自适配
@@ -138,8 +146,6 @@
 				    },
 				    // 根据你接口需求自定义body参数
 				    formData: {
-						loanApplicationNumber:'',
-						loanApplicationId:'',
 					}
 				},
 				// 选择文件后是否立即自动上传,true=选择后立即上传
@@ -159,7 +165,7 @@
 				wxFiles: [],
 				// 是否打印日志
 				debug: false,
-				filelist:[{name:"123"}],
+				filelist:[],
 				filico:require('@/work/static/filico.png'),
 				fdelimg:require('@/work/static/fjdel.png'),
 				
@@ -182,21 +188,24 @@
 					value: 1
 				}],
 				peoval:0,
-				peolist:[{name:'王安安',val:"0",type:0},{name:'刘柠溪',val:"1",type:1},{name:'王合一',val:"2",type:0},]
+				// peolist:[{name:'王安安',val:"0",type:0},{name:'刘柠溪',val:"1",type:1},{name:'王合一',val:"2",type:0},],
+				text:'',//文本框
+				peoinfo:'',
+				phofile:[],
 			}
 		},
 		mounted() {
 			this.baseUrl=baseUrl
 		},
 		watch:{
-			loanApplicationNumber(val){
-				this.option.formData.loanApplicationNumber=val
-				this.jjoption.formData.loanApplicationNumber=val
-			},
-			loanApplicationId(val){
-				this.option.formData.loanApplicationId=val
-				this.jjoption.formData.loanApplicationId=val
-			},
+			// loanApplicationNumber(val){
+			// 	this.option.formData.loanApplicationNumber=val
+			// 	this.jjoption.formData.loanApplicationNumber=val
+			// },
+			// loanApplicationId(val){
+			// 	this.option.formData.loanApplicationId=val
+			// 	this.jjoption.formData.loanApplicationId=val
+			// },
 			type(val){
 				// this.filelist=[];
 				// this.shtext='';
@@ -205,17 +214,46 @@
 			}
 		},
 		methods:{
+			kaType(data, list) {
+				console.log(data,list)
+				return selectDictValue(list, data);
+			},
 			bindDateChange(){
 				var val=e.detail.value;
 			},
 			getClose(){
 				this.$emit('getClose')
 			},
-			getSure(){
-				this.$emit('getSure')
+			getSure(type){
+				var that=this;
+				var data={}
+				if(type=='reply'){
+					if(!this.text){
+						this.$toast("请输入回复内容")
+						return
+					}
+					data.replyContent=this.text;
+					if(this.filelist){
+						data.suggestionFjList=this.filelist
+					}
+				}else if(type=='assign'){
+					var peoinfo=JSON.parse(JSON.stringify(this.peoinfo))
+					data.staffName=peoinfo.staffName;
+					data.staffId=peoinfo.staffId;
+					data.staffPhone=peoinfo.phoneNumber;
+				}else if(type=='assigncheck'){
+					var peoinfo=JSON.parse(JSON.stringify(this.phofile))
+					if(peoinfo.length<1){
+						this.$toast("请上传图片")
+						return
+					}
+					data.imgurl=peoinfo.join(',');
+				}
+				this.$emit('getSure',data)
 			},
-			getChose(val){
-				this.peoval=val
+			getChose(val,ite){
+				this.peoval=val;
+				this.peoinfo=JSON.parse(JSON.stringify(ite))
 			},
 			getPreviewImage(arr,idx){
 				var newArr=[];
@@ -239,17 +277,18 @@
 				var newobj={}
 				var responseText=JSON.parse(item.responseText)
 				if(responseText.code==200){
-					if(fileVal=='qtfj'){
-						newobj.name=responseText.originalFilename;
-					}else{
-						newobj.name=responseText.newFileName;
-					}
+					// if(fileVal=='qtfj'){
+					// 	newobj.name=responseText.originalFilename;
+					// }else{
+					// 	newobj.name=responseText.newFileName;
+					// }
+					newobj.name=responseText.newFileName;
 					newobj.oldName=responseText.originalFilename;
 					newobj.url=responseText.fileName;
 					newobj.type=fileVal;
 					newobj.bigType=bigType;
-					newobj.loanApplicationId=this.loanApplicationId;
-					newobj.loanApplicationNumber=this.loanApplicationNumber;
+					newobj.suggestionId=this.suggestionId;
+					// newobj.loanApplicationNumber=this.loanApplicationNumber;
 					this.filelist.push(newobj)
 				}else{
 					this.$toast(responseText.msg)
@@ -355,7 +394,7 @@
 				})
 				}
 			},
-			getDelFn(){
+			getDelFn(idx){
 				var that=this;
 				uni.showModal({
 					title: '确认删除',
@@ -364,7 +403,7 @@
 					confirmText: '确认',
 					success: function(res) {
 						if (res.confirm) {
-							// that.filelist.splice(idx,1)
+							that.phofile.splice(idx,1)
 						} else if (res.cancel) {
 						}
 					}
@@ -374,7 +413,6 @@
 				let that = this;
 				let file =[],count=9
 				uni.chooseImage({
-					count: 1,
 					success:function(res){
 						let img= res.tempFilePaths;
 						if(img.length + file.length > count){
@@ -387,12 +425,7 @@
 							let imglen = res.tempFilePaths.length;
 							var fuwufile = [];
 							uploadmore('/common/upload',img,0,0,0,imglen,fuwufile,function(rs){
-								var resurl=rs[0];
-								// if(e=='front'){
-								// 	that.datainfo.front=resurl.fileName;
-								// }else{
-								// 	that.datainfo.back=resurl.fileName;
-								// }
+								that.phofile = that.phofile.concat(rs);
 							})	
 						}
 					}

+ 59 - 10
property_ui/service/pages/service/complaint.vue

@@ -21,7 +21,7 @@
 		</view>
 		<!-- 列表 -->
 		<view class="carlists">
-			<car-list :datainfo="list" :topval="tabval" :wtdt="wtdt" type='complaint' @getDetail="getDetail"></car-list>
+			<car-list :datainfo="list" :tsjyList="tsjyList" :topval="tabval" :wtdt="wtdt" type='complaint' @getDetail="getDetail" @getDelFn="getDelFn"></car-list>
 		</view>
 		<loading></loading>
 	</view>
@@ -32,6 +32,8 @@
 	const baseUrl = config.baseUrl
 	import carList from "@/service/components/car/list.vue"
 	import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
+	import {getDictionaryFn} from "@/api/system/user.js"
+	import {suggestionlList,suggestionlDel} from "@/api/work/service.js"
 	export default{
 		components:{carList},
 		data(){
@@ -41,17 +43,25 @@
 				up:require('@/car/static/car/up.png'),
 				cxrq:"",
 				text:'',
-				list:[{tit:'皖A IC520',type:1,right:0},{tit:'晋E KD783',type:2,right:0},],
+				list:[],
 				pageSize: 10,
 				pageNum: 1,
 				reachflag: true,
 				wtdt:'',
-				tabval:'0',
-				tablist:[{tit:'全部',val:0},{tit:'待回复',val:1},{tit:'已回复',val:2},{tit:'已完成',val:2}]
+				tabval:'-1',
+				tablist:[{tit:'全部',val:'-1'},{tit:'不予公开',val:'N'}],
+				tsjyList:[],
 			}
 		},
+		onUnload() {
+			uni.$off('refSuggestion')
+		},
 		onLoad: function() {
-		
+			uni.$on('refSuggestion',(res)=>{
+				this.getrefreshData()
+			})
+			this.init()
+			this.getDataFn()
 		},
 		// 上拉触底加载更多触发事件
 		onReachBottom() {
@@ -62,8 +72,28 @@
 		},
 		methods:{
 			checkPermi, checkRole,
-			getDetail(){
-				this.$tab.navigateTo("/service/pages/service/complaintdetail")
+			init(){
+				// 投诉建议类型
+				getDictionaryFn('complaint_types').then(res=>{
+					if(res.code==200){
+						this.tsjyList = res.data.map(v => {
+							var obj={
+								tit: v.dictLabel,
+								val: v.dictValue
+							}
+							var len=Number(this.tablist.length)-1;
+							this.tablist.splice(len,0,obj)
+							// this.tablist.push(obj)
+							return {
+								dictLabel: v.dictLabel,
+								dictValue: v.dictValue
+							}
+						})
+					}
+				})
+			},
+			getDetail(id){
+				this.$tab.navigateTo("/service/pages/service/complaintdetail?id="+id)
 			},
 			getConfirm(){
 				this.getrefreshData()
@@ -80,19 +110,38 @@
 				this.getDataFn()
 			},
 			getTabFn(val){
-				this.tabval=val
+				this.tabval=val;
+				this.getrefreshData()
 			},
 			bindDateChangea(e){
 				var val=e.detail.value;
 				this.cxrq=val;
 			},
+			getDelFn(data){
+				var that=this;
+				suggestionlDel(data).then(res=>{
+					if(res.code==200){
+						this.$toast("删除成功");
+						setTimeout(function(){
+							that.getrefreshData()
+						},1500)
+					}
+				})
+			},
 			getDataFn(){
 				var params={
 					pageSize:this.pageSize,
 					pageNum: this.pageNum,
 				}
-				params.noticeType=this.tabidx
-				getNoticeList(params).then(res=>{
+				if(this.tabval=='N'){
+					params.isPublic=this.tabval;
+				}else{
+					if(this.tabval!=-1){
+						params.status=this.tabval;
+						params.isPublic='Y';
+					}
+				}
+				suggestionlList(params).then(res=>{
 					if(res.code==200){
 						if (res.rows.length < this.pageSize) {
 							this.reachflag = false

+ 203 - 14
property_ui/service/pages/service/complaintdetail.vue

@@ -1,23 +1,48 @@
 <template>
 	<view class="comdetail">
-		<view class="cdbox">
+		<view class="cdbox mb12">
 			<view class="cdtop">
-				<view class="tit">小区电梯老化</view>
-				<view class="txt">2024-11-18 08:16</view>
+				<view class="tit">{{datainfo.title}}</view>
+				<view class="txt">{{datainfo.createTime}}</view>
 			</view>
 			<view class="cdmain">
-				<view class="tit">小区电梯时常发生问题,请物业派维修人员进行安全检 查,若无法排除问题,建议更换小区的电梯设备,避免 后期发生人员伤害!</view>
+				<view class="tit">{{datainfo.content}}</view>
 				<view class="imgs">
-					<image :src="mbg"></image>
+					<image :src="baseUrl+ite" v-for="(ite,idx) in phofile" :key="idx" @click="getPreviewImage(phofile,idx)"></image>
 				</view>
 			</view>
 		</view>
-		
-		<view class="cdbtns">
-			<view class="btna">不予公开</view>
-			<view class="btnb" @click="getReplyFn">回复</view>
+		<view class="cdbox pt50" v-if="datainfo.status==2">
+			<view class="hftop">
+				<image :src="hline"></image>
+				<view>回复</view>
+			</view>
+			<!-- <view class="cdtop">
+				<view class="tit">{{datainfo.title}}</view>
+				<view class="txt">{{datainfo.createTime}}</view>
+			</view> -->
+			<view class="cdmain">
+				<view class="tit">{{datainfo.replyContent}}</view>
+				<block v-if="datainfo.suggestionFjList">
+				<view class="fjlists"  v-for="(fite,fidx) in datainfo.suggestionFjList" :key='fidx'>
+					<view class="flext" @click="getDown(fite.url)">
+						<view class="imgl"><image :src="filico" ></image></view>
+						<view class="tit">{{fite.name}}</view>
+					</view>
+<!-- 					<view class="delimg flex0" @click.stop="getDelFj(fidx)">
+						<image :src="fdelimg"></image>
+					</view> -->
+				</view>
+				</block>
+			</view>
 		</view>
-	<pop-up :type="type" @getClose='getClose'  @getSure="getSure"></pop-up>
+		<view class="cdbtns" v-if="checkPermi(['wuYe:suggestion:edit'])">
+			<view class="btna" @click="getCloseFn('N')" v-if="datainfo.isPublic=='Y'">不予公开</view>
+			<view class="btna" @click="getCloseFn('Y')" v-else>公开</view>
+			<!--  -->
+			<view class="btnb" @click="getReplyFn" v-if="datainfo.status!=2">回复</view>
+		</view>
+	<pop-up :type="type" @getClose='getClose' :suggestionId="id"  @getSure="getSure"></pop-up>
 	<loading></loading>	
 	</view>
 </template>
@@ -27,25 +52,79 @@
 	const baseUrl = config.baseUrl
 	import popUp from "@/service/components/popup/popup.vue"
 	import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
+	import {suggestionlDet,suggestionlPut} from "@/api/work/service.js"
 	export default{
 		components:{popUp},
 		data(){
 			return{
 				mbg:require('@/service/static/service/bxbg.png'),
 				baseUrl:config.baseUrl,
+				hline:require('@/service/static/service/hline.png'),
+				filico:require('@/work/static/filico.png'),
 				type:'',
+				datainfo:{},
+				id:'',
+				phofile:[],//图片合集
+
 			}
 		},
-		onLoad: function() {
+		onLoad: function(e) {
+			if(e.id){
+				this.id=e.id;
+				this.getDetail()
+			}
 		},
 		methods:{
 			checkPermi, checkRole,
 			getClose(){
 				this.type='';
 			},
-			getSure(){
+			getSure(data){
+				var that=this;
+				var params=JSON.parse(JSON.stringify(data))
+				params.suggestionId=this.id;
+				params.status='2';
+				suggestionlPut(params).then(res=>{
+					if(res.code==200){
+						this.$toast('回复成功')
+						uni.$emit("refSuggestion")
+						setTimeout(function(){
+							that.getDetail()
+						},1200)
+					}
+				})
 				this.type='';
 			},
+			getCloseFn(type){
+				var that=this;
+				var str="不予公开"
+				if(type=='Y'){
+					str='公开'
+				}
+				uni.showModal({
+					title: str,
+					content: "是否确认"+str,
+					cancelText: '取消',
+					confirmText: '确认',
+					success: function(res) {
+						if (res.confirm) {
+							var param={}
+							param.isPublic=type;
+							param.suggestionId=that.id;
+							suggestionlPut(param).then(res=>{
+								if(res.code==200){
+									uni.$emit("refSuggestion")
+									that.$toast(str+'成功')
+									setTimeout(function(){
+										that.getDetail()
+									},1200)
+								}
+							})
+						} else if (res.cancel) {
+						}
+					}
+				});
+			},
 			getReplyFn(){
 				this.type='reply'
 			},
@@ -66,6 +145,102 @@
 					}
 				});
 			},
+			getDetail(){
+				var that=this;
+				suggestionlDet(this.id).then(res=>{
+					if(res.code==200){
+						this.datainfo=res.data;
+						if(res.data&&res.data.images){
+							that.phofile=res.data.images.split(',')
+						}
+					}
+				})
+			},
+			getDown(path,name){
+				console.log(path,name)
+				// #ifdef APP-PLUS
+				self.getFilePermissions(function(res){
+					if(res==1){
+						uni.showLoading({
+							title: '加载中'
+						});
+						var url = baseUrl + path;
+						let dtask = plus.downloader.createDownload(url, {
+							filename: 'file://storage/emulated/0/'+baseName+'/' + name
+						}, (d, status) => {
+							//d为下载的文件对象
+							if (status == 200) {
+								uni.hideLoading();
+								uni.showToast({
+									icon: 'none',
+									mask: true,
+									title: '已保存到文件夹:/'+baseName+'/'+ name, //保存路径
+									duration: 3000,
+								});
+								
+								//下载成功,d.filename是文件在保存在本地的相对路径,使用下面的API可转为平台绝对路径
+								let fileSaveUrl = plus.io.convertLocalFileSystemURL(d.filename);
+								setTimeout(() => {
+									plus.runtime.openFile(d.filename); //选择软件打开文件
+								}, 1500)
+							} else {
+								//下载失败
+								uni.hideLoading();
+								plus.downloader.clear(); //清除下载任务
+								uni.showToast({
+									icon: 'none',
+									mask: true,
+									title: '下载失败,请稍后重试',
+								});
+							}
+						})
+						dtask.start();
+					}else{
+						uni.hideLoading();
+						uni.showToast({
+							title: '无法获取权限,文件下载将出错!',
+							icon: 'none',
+						})
+					}			
+				})
+				// #endif
+				// #ifndef APP-PLUS
+				this.getDownloader(path)
+				// #endif
+			},
+			getDownloader(e){
+				uni.showLoading({
+					title: '加载中'
+				});
+				var url=baseUrl+e;
+				let index1 = e.lastIndexOf("."); // 得到一个索引值
+				let index2 = e.length;
+				let type = e.substring(index1, index2);
+				if ((type.indexOf('jpg') > -1 || type.indexOf('jpeg') > -1 || type.indexOf('png') > -1)) {
+					uni.previewImage({
+						current: 0,
+						urls: [url],
+						// background: '#ffffff'
+					});
+					uni.hideLoading();
+				} else {
+				uni.downloadFile({
+					url: url,//文件的下载路径
+					success(result) {
+							uni.hideLoading()
+						var filePath = result.tempFilePath;
+						   uni.openDocument({
+						     filePath: filePath,
+						     showMenu: true,
+						     success: function (res) {
+						       // console.log('打开文档成功');
+						     }
+						   });
+					},
+					fail(res) {uni.hideLoading()}
+				})
+				}
+			},
 		}
 	}
 </script>
@@ -74,7 +249,7 @@
 </style>
 <style lang="scss" scoped>
 .comdetail{padding:20rpx 18rpx  110rpx;
-	.cdbox{background: #FFFFFF;border-radius: 20rpx;padding: 0 32rpx;box-sizing: border-box;
+	.cdbox{background: #FFFFFF;border-radius: 20rpx;padding: 0 32rpx;box-sizing: border-box;position: relative;
 		.cdtop{padding:  34rpx 0rpx 24rpx;border-bottom: 2rpx solid #CDCDCD;
 			.tit{font-weight: bold;font-size: 30rpx;color: #272727;margin-bottom: 16rpx;}
 			.txt{font-weight: 500;font-size: 24rpx;color: #AAAAAA;}
@@ -93,6 +268,20 @@
 		&.btnb{background: #0156FE;color: #FFFFFF;}
 		}
 	}
+	.hftop{width: 118rpx;height: 46rpx;position: absolute;left: -8rpx;top: 18rpx;
+		image{width: 118rpx;height: 46rpx;position: absolute;left: 0;top: 0;}
+		view{position: relative;z-index: 1;font-weight: bold;font-size: 26rpx;color: #FFFFFF;padding-top: 6rpx;text-align: center;}
+	}
 }
-
+.fjlists {display: flex;align-items: flex-start;justify-content: space-between;margin-bottom: 20rpx;
+		&:last-child{margin-bottom: 0;}
+		.imgl{width: 40rpx;height: 40rpx;display: flex;align-items: center;flex: 0 0 auto;
+			image{width: 26rpx;height: 24rpx;}
+		}
+		.tit{font-size: 26rpx;color: #222327;font-weight: 500;margin-top: 4rpx;word-break: break-all;}
+		.delimg{width: 40rpx;height:40rpx;margin-left: 16rpx;display: flex;align-items: center;justify-content: center;flex: 0 0 auto;
+			image{width: 24rpx;height: 24rpx;}
+		}
+		.txta{color: #28C529;font-weight: 500;line-height: 40rpx;flex: 0 0 auto;margin-left: 18rpx;padding: 0 6rpx;}
+	}
 </style>

+ 58 - 12
property_ui/service/pages/service/warranty.vue

@@ -21,7 +21,7 @@
 		</view>
 		<!-- 列表 -->
 		<view class="carlists">
-			<car-list :datainfo="list" :topval="tabval" :wtdt="wtdt" type='warranty' @getDetail="getDetail"></car-list>
+			<car-list :datainfo="list" :bxztList="bxztList"  :wtdt="wtdt" type='warranty' @getDetail="getDetail" @getDelFn="getDelFn"></car-list>
 		</view>
 		<loading></loading>
 	</view>
@@ -32,6 +32,8 @@
 	const baseUrl = config.baseUrl
 	import carList from "@/service/components/car/list.vue"
 	import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
+	import {repairList,repairDel} from "@/api/work/service.js"
+	import {getDictionaryFn} from "@/api/system/user.js"
 	export default{
 		components:{carList},
 		data(){
@@ -46,12 +48,20 @@
 				pageNum: 1,
 				reachflag: true,
 				wtdt:'',
-				tabval:'0',
-				tablist:[{tit:'全部报修',val:0},{tit:'待分派',val:1},{tit:'处理中',val:2},{tit:'已完成',val:2}]
+				tabval:'-1',
+				tablist:[{tit:'全部报修',val:-1}],
+				bxztList:[],
 			}
 		},
+		onUnload() {
+			uni.$off('repairList')
+		},
 		onLoad: function() {
-		
+			uni.$on('repairList',(res)=>{
+				this.getrefreshData()
+			})
+			this.init()
+			this.getDataFn()
 		},
 		// 上拉触底加载更多触发事件
 		onReachBottom() {
@@ -62,8 +72,37 @@
 		},
 		methods:{
 			checkPermi, checkRole,
-			getDetail(){
-				this.$tab.navigateTo("/service/pages/service/warrantydetail")
+			init(){
+				// 报修状态
+				getDictionaryFn('repair_status').then(res=>{
+					if(res.code==200){
+						this.bxztList = res.data.map(v => {
+							var obj={
+								tit: v.dictLabel,
+								val: v.dictValue
+							}
+							this.tablist.push(obj)
+							return {
+								dictLabel: v.dictLabel,
+								dictValue: v.dictValue
+							}
+						})
+					}
+				})
+			},
+			getDelFn(data){
+				var that=this;
+				repairDel(data).then(res=>{
+					if(res.code==200){
+						this.$toast("删除成功");
+						setTimeout(function(){
+							that.getrefreshData()
+						},1500)
+					}
+				})
+			},
+			getDetail(id){
+				this.$tab.navigateTo("/service/pages/service/warrantydetail?id="+id)
 			},
 			getConfirm(){
 				this.getrefreshData()
@@ -80,7 +119,8 @@
 				this.getDataFn()
 			},
 			getTabFn(val){
-				this.tabval=val
+				this.tabval=val;
+				this.getrefreshData()
 			},
 			bindDateChangea(e){
 				var val=e.detail.value;
@@ -91,8 +131,10 @@
 					pageSize:this.pageSize,
 					pageNum: this.pageNum,
 				}
-				params.noticeType=this.tabidx
-				getNoticeList(params).then(res=>{
+				if(this.tabval!=-1){
+					params.repairStatus=this.tabval
+				}
+				repairList(params).then(res=>{
 					if(res.code==200){
 						if (res.rows.length < this.pageSize) {
 							this.reachflag = false
@@ -107,10 +149,14 @@
 								this.wtdt = '到底了~';
 							}
 						}
+						var newArr=JSON.parse(JSON.stringify(res.rows))
+						newArr.forEach(ite=>{
+							ite.right=0;
+						})
 						if (this.pageNum == 1) {
-							this.list = res.rows;
+							this.list = newArr;
 						} else {
-							this.list = this.list.concat(res.rows)
+							this.list = this.list.concat(newArr)
 						}
 					}else{
 						this.$toast(res.msg)
@@ -142,7 +188,7 @@ color: #FFFFFF;}
 		}
 	}
 	.tabtop{padding-bottom: 40rpx;padding-top: 26rpx;
-		.tabt{font-weight: 500;font-size: 32rpx;color: #666666;position: relative;line-height: 56rpx;padding: 0 40rpx;
+		.tabt{font-weight: 500;font-size: 32rpx;color: #666666;position: relative;line-height: 56rpx; flex:1;text-align: center;
 			&.act{font-weight: bold;font-size: 32rpx;color: #272727;
 			&::after{content: '';width: 40rpx;height: 10rpx;background: #0156FE;border-radius: 6rpx;position: absolute;left: 50%;margin-left: -20rpx;bottom: -10rpx;}
 			}

+ 174 - 27
property_ui/service/pages/service/warrantydetail.vue

@@ -8,15 +8,15 @@
 		<view class="wymain">
 			<view class="wytop flexc">
 				<image :src="typeimg" class="flex0"></image>
-				<view class="flex1" v-if="finshtype==0">
+				<view class="flex1" v-if="repairStatus==1">
 					<view class="tit">未派工</view>
 					<view class="txt">请尽快指派人员进行处理</view>
 				</view>
-				<view class="flex1" v-if="finshtype>0&&finshtype<3">
+				<view class="flex1" v-if="repairStatus>1&&repairStatus<4">
 					<view class="tit">已派工</view>
 					<view class="txt">已指派人员进行处理</view>
 				</view>
-				<view class="flex1" v-if="finshtype==3">
+				<view class="flex1" v-if="repairStatus==4">
 					<view class="tit">已完成</view>
 					<view class="txt">报修订单已完成</view>
 				</view>
@@ -24,8 +24,8 @@
 			<view class="wabox peobox">
 				<image :src="head" class="head"></image>
 				<view class="flex1">
-					<view class="peotit mb6">王师傅</view>
-					<view class="peotxt">15802340788</view>
+					<view class="peotit mb6">{{datainfo.staffName}}</view>
+					<view class="peotxt">{{datainfo.staffPhone}}</view>
 				</view>
 				<image :src="phone" class="phone" @click="getPhoneFn"></image>
 			</view>
@@ -36,10 +36,10 @@
 					<view class="flex1"></view>
 				</view>
 				<view class="walist">
-					<view class="tit">二号楼1单元904厨房油烟机损坏</view>
-					<view class="txt">二号楼1单元904厨房油烟机无法吸烟,请尽快派人上门 维修,谢谢!</view>
-					<view class="imgs">
-						<image :src="line" class="img"></image>
+					<view class="tit">{{datainfo.repairTitle}}</view>
+					<view class="txt">{{datainfo.repairDetails}}</view>
+					<view class="imgs" v-if="phofile&&phofile.length">
+						<image :src="baseUrl+ite" class="img" v-for="(ite,idx) in phofile" :key="idx" @click="getPreviewImage(idx,phofile)"></image>
 					</view>
 				</view>
 			</view>
@@ -50,31 +50,35 @@
 					<view class="flex1"></view>
 				</view>
 				<view class="walist watxt"><view class="wtit">小区名称</view><view class="wtxt">幸福小区</view></view>
-				<view class="walist watxt"><view class="wtit">报修门户</view><view class="wtxt">二号楼1单元904</view></view>
-				<view class="walist watxt"><view class="wtit">报修时间</view><view class="wtxt">2024-11-12 13:27:36</view></view>
-				<view class="walist watxt"><view class="wtit">联系方式</view><view class="wtxt">13805680028</view></view>
+				<view class="walist watxt"><view class="wtit">报修门户</view><view class="wtxt">{{datainfo.houseAddress}}</view></view>
+				<view class="walist watxt"><view class="wtit">报修时间</view><view class="wtxt">{{datainfo.repairTime}}</view></view>
+				<view class="walist watxt"><view class="wtit">联系方式</view><view class="wtxt">{{datainfo.phoneNumber}}</view></view>
 			</view>
-			<view class="wabox" v-if="finshtype>1">
+			<view class="wabox" v-if="repairStatus>2">
 				<view class="chtop flexc">
 					<image :src="line"></image>
 					<view>上门信息</view>
 					<view class="flex1"></view>
 				</view>
-				<view class="walist watxt"><view class="wtit">上门时间</view><view class="wtxt">2024-11-12 14:54:21</view></view>
+				<view class="walist watxt"><view class="wtit">上门时间</view><view class="wtxt">{{datainfo.visitTime}}</view></view>
 				<view class="walist watxt flexc"><view class="wtit">上门拍照</view>
-					<view class="waimgs"><image :src="head" @click="getPreviewImage"></image></view>
+					<view class="waimgs">
+						<image :src="baseUrl+ite" class="img" v-for="(ite,idx) in visitPhoto" :key="idx" @click="getPreviewImage(idx,visitPhoto)"></image>
+						</view>
 				</view>
-				<block v-if="finshtype>2">
-					<view class="walist watxt"><view class="wtit">结束时间</view><view class="wtxt">2024-11-12 13:27:36</view></view>
-					<view class="walist watxt"><view class="wtit">结束拍照</view><view class="waimgs"><image :src="head" @click="getPreviewImage"></image></view></view>
+				<block v-if="repairStatus>3">
+					<view class="walist watxt"><view class="wtit">结束时间</view><view class="wtxt">{{datainfo.completionTime}}</view></view>
+					<view class="walist watxt"><view class="wtit">结束拍照</view><view class="waimgs">
+						<image :src="baseUrl+ite" class="img" v-for="(ite,idx) in completionPhoto" :key="idx" @click="getPreviewImage(idx,completionPhoto)"></image>
+					</view></view>
 				</block>
 				
 			</view>
 		</view>	
-		<view class="rfbtn" @click="getAssignFn" v-if="finshtype==0">去指派</view>
-		<view class="rfbtn rfbga" @click="getCheckFn(1)" v-if="finshtype==1">我已上门</view>
-		<view class="rfbtn rfbga" @click="getCheckFn(2)" v-if="finshtype==2">我已完成</view>
-	<pop-up :type="type" @getClose='getClose' :finshtype='finshtype' @getSure="getSure"></pop-up>
+		<view class="rfbtn" @click="getAssignFn" v-if="repairStatus==1">去指派</view>
+		<view class="rfbtn rfbga" @click="getCheckFn(1)" v-if="repairStatus==2">我已上门</view>
+		<view class="rfbtn rfbga" @click="getCheckFn(2)" v-if="repairStatus==3">我已完成</view>
+	<pop-up :type="type" @getClose='getClose' :bxlbList="bxlbList" :bxlb="datainfo.maintenanceCategory" :vxsztList="vxsztList" :peolist="peolist" :finshtype='repairStatus' @getSure="getSure"></pop-up>
 	<loading></loading>	
 	</view>
 </template>
@@ -84,6 +88,10 @@
 	const baseUrl = config.baseUrl
 	import popUp from "@/service/components/popup/popup.vue"
 	import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
+	import {repairDet,repairPut,repairAssign} from "@/api/work/service.js"
+	import {stafflistNoPage} from "@/api/work/people.js"
+	import {getDictionaryFn} from "@/api/system/user.js"
+	import {selectDictValue} from "@/utils/common.js"
 	export default{
 		components:{popUp},
 		data(){
@@ -98,14 +106,34 @@
 				baseUrl:config.baseUrl,
 				type:'',
 				finshtype:3,
+				datainfo:{},
+				id:'',
+				ptype:"add",
+				isdisabled:false,
+				bxztList:[],
+				vxsztList:[],
+				peolist:[],
+				phofile:[],//
+				visitPhoto:[],//上门拍照
+				completionPhoto:[],//结束拍照
+				repairStatus:'',//
+				bxlbList:[],
 			}
 		},
-		onLoad: function() {
+		onLoad: function(e) {
 			uni.getSystemInfo({
 				success: (e) => {
 					this.nvaHeight = Number(e.statusBarHeight)+44;
 				}
 			})
+			this.init();
+			this.getstafflistNoPage();
+			if(e.id){
+				this.id=e.id;
+				this.ptype='edit';
+				this.isdisabled=true;
+				this.getDetailFn()
+			}
 		},
 		onPageScroll(e) {
 			var scrollTop = Number(e.scrollTop);
@@ -117,6 +145,56 @@
 		},
 		methods:{
 			checkPermi, checkRole,
+			kaType(data, list) {
+				return selectDictValue(list, data);
+			},
+			init(){
+				// 报修状态
+				getDictionaryFn('repair_status').then(res=>{
+					if(res.code==200){
+						this.bxztList = res.data.map(v => {
+							return {
+								dictLabel: v.dictLabel,
+								dictValue: v.dictValue
+							}
+						})
+					}
+				})
+				//报修类别
+				getDictionaryFn('baoxiutype').then(res=>{
+					if(res.code==200){
+						this.bxlbList = res.data.map(v => {
+							return {
+								dictLabel: v.dictLabel,
+								dictValue: v.dictValue
+							}
+						})
+					}
+				})
+				// 维修师状态
+				getDictionaryFn('technician_status').then(res=>{
+					if(res.code==200){
+						this.vxsztList = res.data.map(v => {
+							return {
+								dictLabel: v.dictLabel,
+								dictValue: v.dictValue
+							}
+						})
+					}
+				})
+				
+				
+			},
+			getstafflistNoPage(){
+				var patams={
+					staffCategory:2
+				}
+				stafflistNoPage(patams).then(res=>{
+					if(res.code==200){
+						this.peolist=res.rows;
+					}
+				})
+			},
 			getAssignFn(){
 				this.type='assign'
 			},
@@ -134,15 +212,66 @@
 			getClose(){
 				this.type='';
 			},
-			getSure(){
-				this.type='';
+			getSure(data){
+				var type=this.type;
+				var that=this;
+				var ite=JSON.parse(JSON.stringify(data))
+				if(type=='assign'){
+					ite.repairId=this.id;
+					repairAssign(ite).then(res=>{
+						if(res.code==200){
+							that.$toast("指派成功")
+							setTimeout(function(){
+								that.type='';
+								that.getDetailFn()
+							},1500)
+						}
+					})
+				}else if(type=='assigncheck'){
+					var params={};
+					params.repairId=this.id;
+					if(this.repairStatus==2){//上门拍照
+						params.repairStatus=3;
+						params.visitPhoto=ite.imgurl;
+						params.visitTime=this.time();
+						
+					}else{//结束拍照
+						params.repairStatus=4;
+						params.completionTime=this.time();
+						params.completionPhoto=ite.imgurl;
+					}
+					repairPut(params).then(res=>{
+						if(res.code==200){
+							that.$toast("操作成功")
+							setTimeout(function(){
+								that.type='';
+								uni.$emit('repairList')
+								that.getDetailFn()
+							},1500)
+						}
+					})
+				}
+			},
+			time() {
+				var date = new Date();
+				var y = date.getFullYear();
+				var m = date.getMonth() + 1;
+				var d = date.getDate();
+				var h = date.getHours();
+				var min = date.getMinutes();
+				var s = date.getSeconds();
+				var yearStr = y + '-' + (m < 10 ? ('0' + m) : m) + '-' + (d < 10 ? ('0' + d) : d)
+				var timeStr = (h < 10 ? ('0' + h) : h) + ':' + (min < 10 ? ('0' + min) : min) + ':' + (s < 10 ? (
+					'0' + s) : s);
+				var kaTime = yearStr + ' ' + timeStr;
+				return kaTime
 			},
 			getPhoneFn(){
 				uni.makePhoneCall({
-					phoneNumber: '114' //仅为示例
+					phoneNumber: this.datainfo.staffPhone //仅为示例
 				});
 			},
-			getPreviewImage(arr,idx){
+			getPreviewImage(idx,arr){
 				var newArr=[];
 				arr.forEach(ite=>{
 					var ds=this.baseUrl+ite
@@ -159,6 +288,24 @@
 					}
 				});
 			},
+			getDetailFn(){
+				var that=this;
+				repairDet(this.id).then(res=>{
+					if(res.code==200){
+						this.datainfo=res.data;
+						this.repairStatus=res.data.repairStatus;
+						if(res.data.repairImages){
+							this.phofile=res.data.repairImages.split(',')
+						}
+						if(res.data.visitPhoto){
+							this.visitPhoto=res.data.visitPhoto.split(',')
+						}
+						if(res.data.completionPhoto){
+							this.completionPhoto=res.data.completionPhoto.split(',')
+						}
+					}
+				})
+			},
 		}
 	}
 </script>

BIN
property_ui/service/static/service/hline.png


+ 8 - 0
property_ui/static/style.css

@@ -30,6 +30,10 @@ font-weight: bold;font-size: 26rpx;color: #FFFFFF;background: #0256FD;border-rad
 .fjbtns{font-weight: 500;font-size: 26rpx;margin-left: 36rpx;}
 .fjtxt{font-weight: bold;font-size: 26rpx;color: #222327;}
 .txr{text-align: right;}
+.overh{overflow: hidden;}
+.delleft{background-color: #ffffff;border-radius: 20rpx;position: relative;z-index: 1;}
+
+
 
 .fw5{font-weight: 500;}
 .f12{font-size: 24rpx;}
@@ -47,7 +51,10 @@ font-weight: bold;font-size: 26rpx;color: #FFFFFF;background: #0256FD;border-rad
 .co06{color: #06C770;}
 
 .pdlr12{padding: 0 24rpx;}
+.plr15{padding: 0 30rpx;}
 
+.pb10{padding-bottom: 20rpx !important;}
+.pt50{padding-top: 100rpx !important;}
 .ml10{margin-left: 20rpx;}
 .mr6{margin-right: 12rpx;}
 .mr12{margin-right: 24rpx;}
@@ -59,6 +66,7 @@ font-weight: bold;font-size: 26rpx;color: #FFFFFF;background: #0256FD;border-rad
 .mb10{margin-bottom: 20rpx;}
 .mb12{margin-bottom: 24rpx;}
 .mb14{margin-bottom: 28rpx;}
+.mb15{margin-bottom: 30rpx;}
 .mb16{margin-bottom: 32rpx;}
 .mb18{margin-bottom: 36rpx;}
 .mb20{margin-bottom: 40rpx;}

+ 11 - 11
property_ui/utils/common.js

@@ -68,17 +68,17 @@ export function selectValueKey(datas, value) {
 	}
 	return newObj
 }
-// export function selectValue(datas, value) {
-// 	var actions = [];
-// 	var idx=0;
-// 	Object.keys(datas).some((key) => {
-// 		if (datas[key].value == ('' + value)) {
-// 			actions.push(datas[key].label);
-// 			return true;
-// 		}
-// 	})
-// 	return actions.join('')
-// }
+export function selectValue(datas, value) {
+	var actions = [];
+	var idx=0;
+	Object.keys(datas).some((key) => {
+		if (datas[key].value == ('' + value)) {
+			actions.push(datas[key].text);
+			return true;
+		}
+	})
+	return actions.join('')
+}
 // export function selectValuetext(datas, value) {
 // 	var actions = [];
 // 	var idx=0;