details.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401
  1. <template>
  2. <div class="details">
  3. <!-- -->
  4. <el-tabs v-model="activeName" @tab-change="handleClick(nowObj)">
  5. <el-tab-pane label="基本信息" name="jbxx">
  6. <el-descriptions :column="1">
  7. <el-descriptions-item
  8. v-for="(item, i) in jbxxs"
  9. :label="item.name"
  10. :key="i"
  11. >{{ infoObj[item.prop] }}
  12. </el-descriptions-item>
  13. </el-descriptions>
  14. </el-tab-pane>
  15. <el-tab-pane
  16. label="业务研判"
  17. name="ywyp"
  18. v-if="!formde || route.query.dataType != '1'"
  19. >
  20. <el-tabs v-model="ywyptab">
  21. <el-tab-pane
  22. v-for="ypitem in sheets"
  23. :label="ypitem.type"
  24. :name="ypitem.sheet"
  25. :key="ypitem.sheet"
  26. >
  27. <img :src="ypitem.photo" width="100%" />
  28. <el-row>
  29. <!-- <el-col :span="5">
  30. <el-button :plain="true" @click="open">2024年</el-button>
  31. <el-button :plain="true" @click="open">2024年</el-button>
  32. <el-button :plain="true" @click="open">2024年</el-button>
  33. <el-button :plain="true" @click="open">2024年</el-button>
  34. </el-col> -->
  35. <el-col :span="24">
  36. 压占{{ ypitem.type }}面积共{{ ypitem.yzmj }}平方米
  37. <!-- //,占图斑面积比为23.24%。 -->
  38. <el-table :data="ypitem.data_list">
  39. <el-table-column
  40. v-for="(item, i) in tdxzTable"
  41. :key="i"
  42. :label="item.label"
  43. :prop="item.prop"
  44. align="center"
  45. >
  46. <template #default="{ row }">
  47. <div v-if="item.slot == 'ratio'">
  48. {{ ((row.yzmj / ypitem.yzmj) * 100).toFixed(2) }}%
  49. </div>
  50. <div v-else-if="item.slot == 'action'">
  51. <el-button link type="primary" @click="todetails(row)"
  52. >查看
  53. </el-button>
  54. </div>
  55. <span v-else>{{ row[item.prop] }}</span>
  56. </template>
  57. </el-table-column>
  58. </el-table>
  59. </el-col>
  60. </el-row>
  61. </el-tab-pane>
  62. </el-tabs>
  63. </el-tab-pane>
  64. <el-tab-pane label="核查信息" name="hcxx" v-if="!formde">
  65. 共{{ hcxxList.length }}次外业核查
  66. <el-collapse v-model="hcxxtab" @change="handleChange">
  67. <el-collapse-item v-for="(hcit, hi) in hcxxList" :key="hi" :name="hi">
  68. <template #title>
  69. 核查时间:{{ hcit.createTime }} 核查人员:{{ hcit.createBy }}
  70. </template>
  71. <div></div>
  72. <div>
  73. <Hcxx ref="hcxxRef" @updateParent="changeData" :jcbh="11"></Hcxx>
  74. </div>
  75. <el-descriptions :column="1">
  76. <el-descriptions-item label="实际地类">
  77. {{ hcit.dlmc }}
  78. </el-descriptions-item>
  79. <el-descriptions-item label="核查初判">
  80. {{ hgx_decide.find((h) => h.value == hcit.decide).label }}
  81. </el-descriptions-item>
  82. <el-descriptions-item label="其它材料">
  83. <div class="imgList">
  84. <div class="imgDiv" v-for="(item, i) in hcit.fjs" :key="i">
  85. <span>{{ i + 1 }}</span>
  86. <img :src="item.fjPreview" />
  87. <p>{{ item.fjDatetime }}</p>
  88. </div>
  89. </div>
  90. </el-descriptions-item>
  91. <el-descriptions-item label="其它说明">
  92. {{ hcit.notes }}
  93. </el-descriptions-item>
  94. <el-descriptions-item label="数字签名">
  95. <img :src="hcit.fjPreview" />
  96. </el-descriptions-item>
  97. </el-descriptions>
  98. </el-collapse-item>
  99. </el-collapse>
  100. </el-tab-pane>
  101. <el-tab-pane label="业务记录" name="ywjl" v-if="!formde">
  102. <el-timeline>
  103. <el-timeline-item
  104. v-for="(acti, index) in activities"
  105. :key="index"
  106. :type="acti.successType == '0' ? 'primary' : ''"
  107. size="large"
  108. :hollow="true"
  109. :timestamp="acti.auditflowStepValue"
  110. placement="top"
  111. >
  112. <div class="timelinediv">
  113. <span class="name">[{{ acti.createBy }}] </span>
  114. <span class="operate">
  115. {{ audiText[acti.auditflowOperateType] || "" }}
  116. </span>
  117. <span class="time"> 于 {{ acti.createTime }}</span>
  118. <span
  119. v-if="['001', '002', '003'].includes(acti.auditflowOperateType)"
  120. class="time more"
  121. @click="moreAct(acti)"
  122. >更多</span
  123. >
  124. </div>
  125. <div
  126. v-if="['001', '002', '003'].includes(acti.auditflowOperateType)"
  127. >
  128. {{
  129. audiText[acti.auditflowOperateType].replace("合规性", "")
  130. }}结论:
  131. {{ acti.successType == "0" ? "通过" : "不通过" }}
  132. </div>
  133. </el-timeline-item>
  134. </el-timeline>
  135. </el-tab-pane>
  136. </el-tabs>
  137. <div class="btns">
  138. <el-button
  139. type="primary"
  140. v-show="route.query.dataType != 'normal'"
  141. :disabled="
  142. !steps.find((x) =>
  143. x.auditflowStep.includes(route.query.dataType + 'SH')
  144. )
  145. "
  146. @click="operate('SH')"
  147. >审核</el-button
  148. >
  149. <el-button
  150. type="warning"
  151. v-show="route.query.dataType == 'XJ'"
  152. :disabled="!steps.find((x) => x.auditflowStep.includes('XJHGX'))"
  153. @click="operate('HGX')"
  154. >合法性判定</el-button
  155. >
  156. <el-button
  157. type="success"
  158. v-show="['XJ', 'SJ', 'SJJ'].includes(route.query.dataType)"
  159. :disabled="
  160. !steps.find((x) =>
  161. x.auditflowStep.includes(route.query.dataType + 'TJ')
  162. )
  163. "
  164. @click="operate('TJ')"
  165. >提交</el-button
  166. >
  167. </div>
  168. <el-dialog :title="diatitle" v-model="open" width="500px" append-to-body>
  169. <div v-for="(note, nkey) in Object.keys(sheetinfos)" :key="nkey">
  170. {{ note }}:{{ sheetinfos[note] }}
  171. </div>
  172. </el-dialog>
  173. <shdialog ref="shdiaRef"></shdialog>
  174. <hgxdialog ref="hgxdiaRef"></hgxdialog>
  175. <tjdialog ref="tjdiaRef"></tjdialog>
  176. </div>
  177. </template>
  178. <script setup name="details">
  179. import Hcxx from "./hcxx.vue";
  180. import shdialog from "./components/shdialog.vue";
  181. import hgxdialog from "./components/hgxdialog.vue";
  182. import tjdialog from "./components/tjdialog.vue";
  183. import { getDetailsDk } from "@/api/rsmonitoring/dataEntry";
  184. import {
  185. getDkjbxx,
  186. getDkjbywy,
  187. getAuditflow,
  188. getStep,
  189. getHcInfo,
  190. } from "@/api/rsmonitoring/dkjbxx";
  191. import {
  192. jbxxs,
  193. tdxzTable,
  194. gtkjTable,
  195. gdTable,
  196. yjjbntTable,
  197. stbhTable,
  198. audiText,
  199. } from "./config";
  200. import { nextTick } from "vue";
  201. const emit = defineEmits(["tabClick"]);
  202. const { proxy } = getCurrentInstance();
  203. const route = useRoute();
  204. const router = useRouter();
  205. const formde = ref(route.query.form == "dataEntry");
  206. const props = defineProps({});
  207. let nowObj = ref({});
  208. const shdiaRef = ref(null);
  209. const hgxdiaRef = ref(null);
  210. const tjdiaRef = ref(null);
  211. const hcxxRef = ref(null);
  212. const data = reactive({
  213. activeName: "jbxx",
  214. infoObj: { name: "swed" },
  215. hcxxtab: 0,
  216. hcxxList: [],
  217. activities: [],
  218. });
  219. const steps = ref([]);
  220. const { hgx_decide } = proxy.useDict("hgx_decide");
  221. const { activeName, infoObj, hcxxtab, hcxxList, activities } = toRefs(data);
  222. const sheetdata = reactive({
  223. ywyptab: "1",
  224. sheets: [],
  225. open: false,
  226. diatitle: "",
  227. sheetinfos: [],
  228. });
  229. const { ywyptab, sheets, open, diatitle, sheetinfos } = toRefs(sheetdata);
  230. function handleClick({ id, auditflowId }, isfirst) {
  231. if (formde.value) {
  232. getDetailsDk(id).then((res) => {
  233. infoObj.value = res.data;
  234. if (res.data.sheetJson) {
  235. sheets.value = JSON.parse(res.data.sheetJson);
  236. ywyptab.value = sheets.value[0].sheet;
  237. }
  238. console.log(sheets.value);
  239. });
  240. } else {
  241. if (activeName.value == "jbxx" || isfirst)
  242. getDkjbxx(id).then((res) => {
  243. infoObj.value = res.data;
  244. });
  245. else if (activeName.value == "ywyp" || isfirst)
  246. getDkjbywy(id).then((res) => {
  247. if (res.data && res.data.sheetJson) {
  248. sheets.value = JSON.parse(res.data.sheetJson);
  249. ywyptab.value = sheets.value[0].sheet;
  250. console.log(sheets.value);
  251. }
  252. });
  253. else if (activeName.value == "ywjl" || isfirst)
  254. getAuditflow({ dkjdxxId: id }).then((res) => {
  255. activities.value = res.data;
  256. });
  257. else if (activeName.value == "hcxx" || isfirst)
  258. getHcInfo({ dkid: id, auditflowStep: "WYDC", auditflowId }).then(
  259. (res) => {
  260. hcxxList.value = res.data || [];
  261. nextTick(() => {
  262. for (let index = 0; index < hcxxList.value.length; index++) {
  263. hcxxRef.value[index].init(hcxxList.value[index].sdfjs);
  264. }
  265. });
  266. }
  267. );
  268. if (activeName.value !== "hcxx") {
  269. for (let index = 0; index < hcxxList.value.length; index++) {
  270. hcxxRef.value[index].delatePoi();
  271. }
  272. }
  273. emit("tabClick", activeName.value);
  274. }
  275. getStep({ dkjdxxId: id }).then((res) => {
  276. steps.value = res.data;
  277. });
  278. }
  279. function todetails(row) {
  280. open.value = true;
  281. diatitle.value = row.swid + "详情";
  282. sheetinfos.value = JSON.parse(row.sheetJson);
  283. }
  284. function getDetails({ pcsjid, id, auditflowId }) {
  285. activeName.value = "jbxx";
  286. infoObj.value = {};
  287. activities.value = [];
  288. nowObj.value = { pcsjid, id, auditflowId };
  289. handleClick({ pcsjid, id, auditflowId }, true);
  290. }
  291. function moreAct(actitem) {
  292. if (actitem.auditflowOperateType == "001")
  293. hgxdiaRef.value.moreAct(actitem, infoObj.value);
  294. else if (actitem.auditflowOperateType == "002")
  295. shdiaRef.value.moreAct(actitem, infoObj.value);
  296. else if (actitem.auditflowOperateType == "003")
  297. tjdiaRef.value.moreAct(actitem, infoObj.value);
  298. }
  299. function operate(oname) {
  300. let aStep = route.query.dataType + oname;
  301. if (oname == "SH") shdiaRef.value.operate(infoObj.value, aStep);
  302. else if (oname == "HGX") hgxdiaRef.value.operate(infoObj.value, aStep);
  303. else if (oname == "TJ") tjdiaRef.value.operate(infoObj.value, aStep);
  304. }
  305. defineExpose({ getDetails });
  306. </script>
  307. <style scoped lang="scss">
  308. .details {
  309. .el-button {
  310. // margin: 0px !important;
  311. margin-bottom: 12px !important;
  312. }
  313. .btns {
  314. position: absolute;
  315. bottom: 20px;
  316. .el-button {
  317. margin-left: 20px !important;
  318. }
  319. }
  320. .imgList {
  321. .imgDiv {
  322. width: 126px;
  323. height: 83px;
  324. margin-right: 10px;
  325. // background-color: rgba(0, 255, 255, 0.413);
  326. position: relative;
  327. margin: 4px 4px;
  328. img {
  329. width: 126px;
  330. height: 83px;
  331. }
  332. span {
  333. width: 26px;
  334. height: 26px;
  335. display: inline-block;
  336. position: absolute;
  337. top: 0;
  338. left: 0;
  339. background: #dbad70;
  340. text-align: center;
  341. line-height: 26px;
  342. }
  343. p {
  344. position: absolute;
  345. bottom: 0;
  346. font-size: 10px;
  347. color: #33ccff;
  348. text-align: center;
  349. width: 100%;
  350. height: 30px;
  351. line-height: 30px;
  352. }
  353. }
  354. }
  355. .timelinediv {
  356. .name {
  357. color: #95f204;
  358. }
  359. .operate {
  360. color: #f59a23;
  361. }
  362. .time {
  363. color: #5ba7f0;
  364. }
  365. .more {
  366. display: inline-block;
  367. position: absolute;
  368. right: 20px;
  369. cursor: pointer;
  370. }
  371. }
  372. }
  373. </style>
  374. <style lang="scss">
  375. .details {
  376. height: calc(100% - 40px);
  377. overflow: hidden;
  378. .el-tabs {
  379. height: 100%;
  380. }
  381. .el-tabs__content {
  382. height: calc(100% - 100px);
  383. overflow-y: auto;
  384. overflow-x: hidden;
  385. }
  386. }
  387. .usable {
  388. color: #3f93f5;
  389. cursor: pointer;
  390. }
  391. </style>