<template>
	<view class="bgColor">
	    <view class="rapirMessage">
	        <view class="label">
	            报修信息
	        </view>
	        <view class="state">
	            <view>工单单号:&nbsp;{{data.incidentsign}}</view>
	            <view :class="stateClassFn(data.state.name)">{{data.state.name}}</view>
	        </view>
	        <view class="description">
	            <view>
	                报修内容:
	            </view>
	            <view>
	                {{data.description||"暂无"}}
	            </view>
	        </view>
	        <view class="ipt">
	            <view>
	                报修图片:
	            </view>
	            <view class="imgs-container">
	                <img :src="img" v-for="(img, index) in imgs_wechatRequesterIncident" :key="index" @click="handleImgsClick(index, 'wechatRequesterIncident')" v-if="imgs_wechatRequesterIncident.length">
	                <span v-if="!imgs_wechatRequesterIncident.length">暂无</span>
	            </view>
	        </view>
	        <view class="ipt">
	            <view>
	                处理图片:
	            </view>
	            <view class="imgs-container">
	              <img :src="img" v-for="(img, index) in imgs_incident" :key="index" @click="handleImgsClick(index, 'incident')" v-if="imgs_incident.length">
	              <span v-if="!imgs_incident.length">暂无</span>
	            </view>
	        </view>
	        <view class="faultLocation">
	            <view>
	                报修地址:
	            </view>
	            <view>
	                {{data.houseNumber}}
	            </view>
	        </view>
	    </view>
	    <view class="label">
	        报修评价
	    </view>
	    <view class="rate">
	        <span class="pj">评价:</span><cube-rate v-model="rate"></cube-rate>
	    </view>
	    <view class="rateText">
	        <cube-textarea v-model="rateText" placeholder="您可以从响应速度、解决情况、服务态度等方面,给我们作出相应的评价"></cube-textarea>
	    </view>
	    <view class="chehuiBox">
	
	    </view>
	    <view class="chehui">
	        <view class="btn" @click="evaluate()">提&nbsp;交&nbsp;评&nbsp;价</view>
	    </view>
	    <promp-ting :conents="promptingConent" :status="promptingStatus"></promp-ting>
	    <load-ing v-show="loadShow"></load-ing>
	</view>
</template>

<script setup>
	import { startOfDay, endOfDay, format, add } from 'date-fns'
	import { ref, reactive, computed } from 'vue'
	import { onLoad, onShow, onPullDownRefresh, onReachBottom, onTabItemTap } from '@dcloudio/uni-app'
	import { api_getDictionary, api_taskresolve,} from "@/http/api.js"
	import { filterFormatDate } from '@/filters/filterFormatDate.js'
	import { computedPriorityStyle } from '@/filters/computedPriorityStyle.js'
	import { computedStateStyle } from '@/filters/computedStateStyle.js'
	import { computedCurrentLogOverTime } from '@/filters/computedCurrentLogOverTime.js'
	import { defaultColor } from '@/static/js/theme.js'
	import { useSetTitle } from '@/share/useSetTitle.js'
	import { useMakePhoneCall } from '@/share/useMakePhoneCall.js'
	import { useLoginUserStore } from '@/stores/loginUser'
	import { useIncidentNumStore } from '@/stores/incidentNum'
	import { useIncidentListSearchStore } from '@/stores/incidentListSearch'
	
	
	useSetTitle();
	const loginUserStore = useLoginUserStore();
	const incidentNumStore = useIncidentNumStore();
	const incidentListSearchStore = useIncidentListSearchStore();
	const { formatDate }  = filterFormatDate();
	const { priorityStyle }  = computedPriorityStyle();
	const { stateStyle }  = computedStateStyle();
	const { currentLogOverTime }  = computedCurrentLogOverTime();
	const { makePhoneCall }  = useMakePhoneCall();
	
	// 主题颜色
	const primaryColor = ref(defaultColor)
	
	const assignFlag = ref(false);//指派权限
	const qiangdan = ref(false);//接单权限
	const deptRepair = ref({});//科内报修
	const publicRepair = ref({});//公共报修
	// 数据
	const dataInfo = reactive({
	  tabs: [{id: 0, name: '我的报修', value: 'all', num: ''},],
	  tabActiveId: 0,//当前选择的tab
	  list: [],//工单列表
	  idx: 0,//页码
	  hasMore: true,//是否有更多数据
	  isFilter: false,//筛选框开关
	  isAttachment: false,//图片和录音开关
	  incidentId: undefined,
		stateValue:0,
	  evtFilter: {
	    hospital: {},
	    selected: 'todoingAll',
	    area: {id: 0, area: '全部'},
	    category: {id: 0, category: '全部'},
	    acceptDate: [],
	  }
	})
	
	function (){
		api_taskresolve().then(res=>{
			
		})
	}
	onLoad((option) => {
		console.log(option)
	})
</script>

<style>
</style>