VisitSummaryDetail copy.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360
  1. <template>
  2. <div>
  3. <!-- 顶部条-->
  4. <div class="navBarTOP">
  5. <van-nav-bar class="navBar" :title="info.summaryTaskName" left-arrow @click-left="onClickLeft"/>
  6. <!-- <p style="text-align: right;margin-right: 16px;color: #1e5398;">{{title}}</p>-->
  7. </div>
  8. <div class="lineGrey"></div>
  9. <div class="lineGrey"></div>
  10. <div class="lineGrey"></div>
  11. <div class="lineGrey"></div>
  12. <div class="lineGrey"></div>
  13. <div class="lineGrey" style="height:6px;"></div>
  14. <!-- 主体内容-->
  15. <div class="container linep" style="background-color: #fff;width: 94%; margin: 0px auto; border-radius: 6px;padding: 10px">
  16. <div style="padding:4px 0">
  17. <van-icon :name="ry" size="16" style="float: left"/>
  18. <span>&nbsp;{{info.nickName}} - {{info.postName}}</span>
  19. </div>
  20. <div style="padding:4px 0">
  21. <van-icon :name="zw" size="16" style="float: left"/>
  22. <span >&nbsp;所属部门:{{info.deptName}}</span>
  23. </div>
  24. <div style="padding:4px 0">
  25. <van-icon :name="tm" size="16" style="float: left"/>
  26. <span >&nbsp;提交时间:{{info.createTime}}</span>
  27. </div>
  28. </div>
  29. <div class="lineGrey"></div>
  30. <div class="container linep" style="background-color: #fff;width: 94%; margin: 0px auto; border-radius: 6px;">
  31. <van-form ref="tabstoreVal">
  32. <div v-for="(item,index) in info.customItemList" :key="index">
  33. <div class="formLabel z-cell z-cells z-celly" v-if="item.answerType=='sz' || item.answerType=='rq'||item.answerType=='gs'||item.answerType=='dq'||item.answerType=='xsb'">
  34. <van-cell>
  35. <template #title>{{ index + 1 }}.{{ item.customName }} <span style="color: #444;
  36. font-size: 12px;
  37. margin: 0;
  38. padding:10px 0;text-align: right">{{ item.remark}}</span></template>
  39. </van-cell>
  40. <p class="mg0">{{ item.answerValue }}</p>
  41. </div>
  42. <div class="formLabel z-cell z-cells z-celly" v-if="item.answerType=='zp'">
  43. <van-cell>
  44. <template #title>{{ index + 1 }}.{{ item.customName }}</template>
  45. </van-cell>
  46. <delete-upload-img :imgs="item.fileInfoList"></delete-upload-img>
  47. </div>
  48. <div class="formLabel z-cell z-cells z-celly" v-if="item.answerType=='wb'">
  49. <van-cell>
  50. <template #title>{{ index + 1 }}.{{ item.customName }}</template>
  51. </van-cell>
  52. <div class="selesetText">
  53. <p class="mg0">{{ item.answerValue }}</p>
  54. </div>
  55. <p style="color: #444;font-size: 12px;margin: 0;padding:10px 0;text-align: right">{{ item.remark }}</p>
  56. <delete-upload-img :imgs="item.fileInfoList"></delete-upload-img>
  57. </div>
  58. <div class="formLabel z-cell z-cells z-celly" v-if="item.answerType=='duox'">
  59. <van-cell>
  60. <template #title>{{ index + 1 }}.{{ item.customName }}</template>
  61. </van-cell>
  62. <div class="selesetText">
  63. <div class="mg0" v-for="(item1,index1) in item.customOptionList" :key="index1">
  64. <p style="color:#0057ba" v-if="item1.checked">
  65. <i style="border: 1px solid #0057ba;margin-right: 10px;border-radius:2px;padding: 2px" class="van-icon van-icon-success"></i>
  66. <span >{{ item1.customOption }}</span>
  67. </p>
  68. <p v-if="!item1.checked">
  69. <i style="border: 1px solid #ccc;margin-right: 10px;border-radius:2px;color:#fff;padding: 2px" class="van-icon van-icon-success"></i>
  70. <span >{{ item1.customOption }}</span>
  71. </p>
  72. </div>
  73. </div>
  74. </div>
  75. <div class="formLabel z-cell z-cells z-celly" v-if="item.answerType=='dx'">
  76. <van-cell>
  77. <template #title>
  78. {{ index + 1 }}.{{ item.customName }}
  79. </template>
  80. </van-cell>
  81. <div class="selesetText">
  82. <div class="mg0" v-for="(item2,index2) in item.customOptionList" :key="index2">
  83. <p style="color:#0057ba" v-if="item2.checked">
  84. <i style="border: 1px solid #0057ba;border-radius:40px;margin-right: 10px;padding: 2px" class="van-icon van-icon-success"></i>
  85. <span >{{ item2.customOption }}</span>
  86. </p>
  87. <p v-if="!item2.checked">
  88. <i style="border: 1px solid #ccc;border-radius:40px;margin-right: 10px;color:#fff;padding: 2px" class="van-icon van-icon-success"></i>
  89. <span >{{ item2.customOption }}</span>
  90. </p>
  91. </div>
  92. </div>
  93. <delete-upload-img :imgs="item.fileInfoList"></delete-upload-img>
  94. </div>
  95. </div>
  96. </van-form>
  97. </div>
  98. <br>
  99. <br>
  100. <br>
  101. </div>
  102. </template>
  103. <script>
  104. import history from "@/assets/Icon/history.png";
  105. import tm from "@/assets/Icon/tm.png";
  106. import zw from "@/assets/Icon/zw.png";
  107. import ry from "@/assets/Icon/ry.png";
  108. import {getSummaryMobilo} from "@/api/index";
  109. import {ImagePreview} from "vant";
  110. import deleteUploadImg from "@/components/deleteUploadImg";
  111. export default {
  112. name: "daily",
  113. components: {deleteUploadImg},
  114. data() {
  115. return {
  116. info:{},
  117. zw:zw,
  118. tm:tm,
  119. ry:ry,
  120. show: true,
  121. num: 0,
  122. todayGoal: {},
  123. progressWidth: 0,
  124. history: history,
  125. imgArr: [],
  126. activeNames: ['1', '2', '3', '4', '5', '6', '7', '8', '10',"16","17"],
  127. value: "2",
  128. message: "",
  129. powerGrade:"",
  130. Content:"",
  131. Content2:"",
  132. reportTargetAll:{},
  133. reportContents:[{dayContent:""}],
  134. reportTarget:{},
  135. successContent:"",
  136. imgList:[],
  137. type:"-1"
  138. //
  139. }
  140. },
  141. created() {
  142. this.powerGrade= localStorage.getItem("powerGrade")
  143. this.getDetailById()
  144. },
  145. watch:{
  146. $route(to,from){
  147. this.powerGrade= localStorage.getItem("powerGrade")
  148. if(to.path=="/dailyDetails"){
  149. this.getDetailById()
  150. }
  151. // &&from.path=="/dailyApprovalList"
  152. // if(to.path=="/dailyDetails"&&from.path=="/myHistoricalDaily"){
  153. // this.getDetailById()
  154. // }
  155. }
  156. },
  157. activated() {
  158. this.num = 0;
  159. this.userTodayPlanNum()
  160. },
  161. methods: {
  162. pviewFn(val,imgVal){
  163. var imgList=[]
  164. var photos=this.reportTarget.photos[val].photos
  165. for(let i=0;i<photos.length;i++){imgList.push(photos[i].fileUrl)};
  166. ImagePreview({images: imgList, startPosition: imgVal});
  167. },
  168. submint(){
  169. this.$router.push({
  170. path: "/daily",
  171. query: {reportId:this.$route.query.reportId,temporaryShow:"N"}
  172. })
  173. },
  174. getDetailById(){
  175. let loading1=this.$toast.loading({
  176. duration: 0,
  177. message: '加载中...',
  178. forbidClick: true,
  179. });
  180. getSummaryMobilo({userSummaryId:this.$route.query.userSummaryId}).then(res=>{
  181. loading1.clear()
  182. this.reportTargetAll=res.data.reportTargetAll
  183. this.info=res.data
  184. this.type=res.data.userType
  185. if(res.data.status==3){
  186. this.successContent=res.data.successContent
  187. }else{
  188. this.successContent=res.data.failContent
  189. }
  190. if(res.data.reportContents.length>0){
  191. this.Content=res.data.reportContents[0].dayContent
  192. if(res.data.reportContents.length>1){
  193. this.Content2=res.data.reportContents[1].dayContent
  194. }else{
  195. this.Content2=""
  196. }
  197. }else{
  198. this.Content=""
  199. this.Content2=""
  200. }
  201. this.reportContents=res.data.reportContents
  202. var imgList=[]
  203. if(res.data.photos!=null){
  204. for(var k=0;k<res.data.photos.length;k++){
  205. imgList.push(res.data.photos[k].fileUrl+"")
  206. }
  207. }
  208. this.imgList=imgList
  209. })
  210. },
  211. userTodayPlanNum() {
  212. userTodayPlanNum().then(res => {
  213. if (res.code == 200) {
  214. this.todayGoal = res.data
  215. this.progressWidth = (this.todayGoal.finishNum / this.todayGoal.planNum) * 100 + "%"
  216. localStorage.setItem("nickName", res.data.user.nickName)
  217. localStorage.setItem("storeType", res.data.user.type)
  218. } else {
  219. this.$toast.fail(res.msg)
  220. }
  221. })
  222. },
  223. onClickLeft() {
  224. this.$router.go(-1)
  225. }
  226. }
  227. }
  228. </script>
  229. <style scoped>
  230. .container {
  231. background-color: white;
  232. }
  233. .van-f-red {
  234. color: red;
  235. width: 8px;
  236. display: inline-block;
  237. line-height: 26px;
  238. }
  239. .formLabel {
  240. margin: 0 16px;
  241. border-bottom: 1px solid #f1f1f1
  242. }
  243. .formLabel .van-cell {
  244. padding: 10px 0
  245. }
  246. .formLabel .van-cell::after {
  247. border: 0
  248. }
  249. .formLabel .van-field {
  250. border: 1px solid #f1f1f1;
  251. padding: 6px;
  252. width: 100%;
  253. border-radius: 4px;
  254. overflow: hidden
  255. }
  256. .formLabel .van-field__control {
  257. padding: 0 10px
  258. }
  259. .formLabel .formLabeltitle {
  260. position: absolute;
  261. top: 8px;
  262. }
  263. .z-checkbox .van-radio {
  264. padding: 6px 0;
  265. }
  266. .z-celly .van-cell__title{
  267. font-weight: initial;
  268. font-size: 14px;
  269. }
  270. </style>
  271. <style>
  272. .table-headermd {
  273. font-size: 1.2rem;
  274. text-align: center;
  275. position: initial;
  276. width: 94% !important;
  277. margin: 0 auto;
  278. border-right: 0;
  279. }
  280. .table-headermd .el-table__header,
  281. .table-headermd .el-table__body {
  282. width: 100% !important;
  283. }
  284. .table-headermd col {
  285. width: 5.8rem;
  286. }
  287. .table-headermd col:nth-child(2),
  288. .table-headermd col:nth-child(4),
  289. .table-headermd col:nth-child(3) {
  290. width: 5rem;
  291. }
  292. .table-headermd .van-cell {
  293. padding: 0 4px;
  294. height: 100%
  295. }
  296. .table-headermd th.el-table__cell > .cell {
  297. padding: 0 4px
  298. }
  299. .table-headermd th.el-table__cell {
  300. background-color: #1989fa;
  301. color: #fff;
  302. }
  303. .table-headermd .el-table__cell {
  304. padding: 4px 0;
  305. }
  306. .table-headermd .tipTitle {
  307. overflow: hidden;
  308. text-overflow: ellipsis;
  309. display: -webkit-box;
  310. -webkit-box-orient: vertical;
  311. -webkit-line-clamp: 2;
  312. }
  313. .table-headermd::before {
  314. height: 0
  315. }
  316. .f-right {
  317. text-align: right;
  318. margin: 0
  319. }
  320. .mg0 {
  321. margin: 6px 10px;
  322. color: #909090;
  323. font-size: 14px;
  324. }
  325. .selesetText {
  326. margin-bottom: 16px;
  327. }
  328. .z-cells .van-cell__title {
  329. font-weight: bold;
  330. color: #4a4a4a;
  331. }
  332. .z-cells .van-cell {
  333. padding-bottom: 0
  334. }
  335. </style>