InitConsultation.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460
  1. <template>
  2. <Dialog custom-show type="lg" title="发起会商" hide-footer @close="handleClose">
  3. <div class="content">
  4. <div class="left-content">
  5. <el-input v-model="queryParams.keyword" class="custom-input" placeholder="组织架构搜索">
  6. <template #prefix>
  7. <el-icon class="el-input__icon"><search /></el-icon>
  8. </template>
  9. </el-input>
  10. <div class="tree-container">
  11. <div class="tree-box">
  12. <el-tree :data="treeData" accordion @node-click="handleNodeClick" />
  13. </div>
  14. </div>
  15. </div>
  16. <div class="middle-content">
  17. <div class="search-box">
  18. <el-select
  19. v-model="queryParams.value1"
  20. class="custom-select select-box"
  21. placeholder="全部"
  22. popper-class="custom-select-popper"
  23. :teleported="false"
  24. >
  25. <el-option v-for="level in options" :key="level.value" :label="level.name" :value="level.value"></el-option>
  26. </el-select>
  27. <el-input v-model="queryParams.keyword" class="custom-input" placeholder="组织架构搜索">
  28. <template #prefix>
  29. <el-icon class="el-input__icon"><search /></el-icon>
  30. </template>
  31. </el-input>
  32. </div>
  33. <div class="user-box">
  34. <div class="user-table">
  35. <div class="tr">
  36. <div class="td2">
  37. <div :class="getCheckedClass()" @click="handleChecked"></div>
  38. </div>
  39. <div class="td">姓名</div>
  40. <div class="td3">职务</div>
  41. </div>
  42. <div class="table-content">
  43. <div v-for="(item, index) in userList" :key="index" class="tr2">
  44. <div class="td2">
  45. <div :class="item.checked ? 'common-checked-active' : 'common-checked'" @click="handleChecked2(item)"></div>
  46. </div>
  47. <div class="td">{{ item.name }}</div>
  48. <div class="td3">
  49. {{ item.duty }}
  50. <div class="phone-icon"></div>
  51. </div>
  52. </div>
  53. </div>
  54. </div>
  55. </div>
  56. </div>
  57. <div class="select-box2">
  58. <div class="select-header">
  59. <div class="left-item">
  60. <div>已选择:</div>
  61. <div class="text">{{ selectList.length }}</div>
  62. <div>人</div>
  63. </div>
  64. <div class="clear-btn" @click="clearSelect">清空</div>
  65. </div>
  66. <div class="select-content">
  67. <div v-for="(item, index) in selectList" :key="index" class="box-item">
  68. <div class="line">
  69. <div class="text1">{{ item.name }}</div>
  70. <div class="text2">{{ item.duty }}</div>
  71. </div>
  72. <div class="line" style="margin-top: 20px">
  73. <div class="text2">{{ item.dept }}</div>
  74. </div>
  75. <div class="close-btn" @click="deleteItem(item)"></div>
  76. </div>
  77. </div>
  78. </div>
  79. </div>
  80. <div class="footer">
  81. <div></div>
  82. <div class="btn-box">
  83. <div class="common-btn-primary2" style="margin-right: 20px" @click="handlePhoneCall">电话呼叫</div>
  84. <div class="common-btn-primary2" @click="handleStartMeeting">发起会议</div>
  85. </div>
  86. </div>
  87. </Dialog>
  88. </template>
  89. <script lang="ts" setup>
  90. import { Search } from '@element-plus/icons-vue';
  91. import { ConvergedCommunication } from '@/utils/convergedCommunication';
  92. const props = defineProps({
  93. modelValue: Boolean
  94. });
  95. const emits = defineEmits(['update:modelValue', 'close']);
  96. let activeIndex = ref(0);
  97. const options = ref([{ name: '全部', value: '全部' }]);
  98. const queryParams = ref({
  99. value1: '',
  100. keyword: ''
  101. });
  102. const menu = ref([{ name: '视频会商' }, { name: '无人机' }, { name: '单兵设备' }]);
  103. const treeData = ref([
  104. {
  105. label: '茂名市',
  106. children: [
  107. {
  108. label: '茂名市委',
  109. children: [
  110. {
  111. label: '茂名市纪委监委',
  112. isLeaf: true
  113. },
  114. {
  115. label: '茂名市委办公室',
  116. isLeaf: true
  117. },
  118. {
  119. label: '茂名市委组织部',
  120. isLeaf: true
  121. }
  122. ]
  123. },
  124. {
  125. label: '茂名市人大',
  126. children: [
  127. {
  128. label: '茂名市人大常委会秘书长、副秘书长',
  129. isLeaf: true
  130. },
  131. {
  132. label: '茂名市人大常委会办公室',
  133. isLeaf: true
  134. },
  135. {
  136. label: '茂名市人大常委会研究室',
  137. isLeaf: true
  138. }
  139. ]
  140. }
  141. ]
  142. }
  143. ]);
  144. const userList = ref([]);
  145. const selectList = computed(() => {
  146. const data = [];
  147. userList.value.forEach((item) => {
  148. if (item.checked) {
  149. data.push(item);
  150. }
  151. });
  152. return data;
  153. });
  154. const getCheckedClass = () => {
  155. let res = 'common-checked';
  156. const len = userList.value.length;
  157. const len2 = selectList.value.length;
  158. if (len2 > 0 && len2 === len) {
  159. res = 'common-checked-active';
  160. } else if (len2 > 0) {
  161. res = 'common-checked-half';
  162. }
  163. return res;
  164. };
  165. const handleNodeClick = (item) => {
  166. if (item.isLeaf) {
  167. const data = [
  168. {
  169. id: 1,
  170. name: '李莉莉',
  171. duty: '副主任',
  172. dept: '茂名市/茂名市政府/茂名应急管理局'
  173. },
  174. {
  175. id: 2,
  176. name: '何里',
  177. duty: '副主任',
  178. dept: '茂名市/茂名市政府/茂名应急管理局'
  179. },
  180. {
  181. id: 3,
  182. name: '张三',
  183. duty: '副主任',
  184. dept: '茂名市/茂名市政府/茂名应急管理局'
  185. },
  186. {
  187. id: 4,
  188. name: '张三',
  189. duty: '副主任',
  190. dept: '茂名市/茂名市政府/茂名应急管理局'
  191. },
  192. {
  193. id: 5,
  194. name: '张三',
  195. duty: '副主任',
  196. dept: '茂名市/茂名市政府/茂名应急管理局'
  197. },
  198. {
  199. id: 6,
  200. name: '张三',
  201. duty: '副主任',
  202. dept: '茂名市/茂名市政府/茂名应急管理局'
  203. }
  204. ];
  205. data.forEach((item) => {
  206. item.checked = false;
  207. });
  208. userList.value = data;
  209. }
  210. };
  211. // 全选、全取消
  212. const handleChecked = () => {
  213. const checkedClass = getCheckedClass();
  214. let flag = true;
  215. if (checkedClass === 'common-checked-active') {
  216. flag = false;
  217. }
  218. userList.value.forEach((item) => {
  219. item.checked = flag;
  220. });
  221. };
  222. // 单个选中、取消选中
  223. const handleChecked2 = (item) => {
  224. item.checked = !item.checked;
  225. };
  226. // 清空
  227. const clearSelect = () => {
  228. userList.value.forEach((item) => {
  229. if (item.checked) {
  230. item.checked = false;
  231. }
  232. });
  233. };
  234. // 清空指定项
  235. const deleteItem = (item) => {
  236. for (let i = 0; i < userList.value.length; i++) {
  237. if (item.id === userList.value[i].id) {
  238. userList.value[i].checked = false;
  239. break;
  240. }
  241. }
  242. };
  243. // 弹窗关闭后
  244. const handleClose = () => {
  245. emits('update:modelValue', false);
  246. };
  247. // 融合通信参数
  248. const handlePhoneCall = () => {
  249. emits('update:modelValue', false);
  250. }
  251. // 发起会议
  252. const handleStartMeeting = () => {
  253. const convergedCommunication = new ConvergedCommunication();
  254. convergedCommunication.start();
  255. emits('update:modelValue', false);
  256. };
  257. </script>
  258. <style lang="scss" scoped>
  259. .content {
  260. height: calc(100% - 136px);
  261. display: flex;
  262. margin-top: 12px;
  263. .left-content {
  264. width: 910px;
  265. padding-right: 30px;
  266. border-right: 1px solid #2187ff;
  267. }
  268. .middle-content {
  269. width: 910px;
  270. padding: 0 30px;
  271. border-right: 1px solid #2187ff;
  272. .search-box {
  273. display: flex;
  274. .select-box {
  275. flex-shrink: 0;
  276. width: 176px !important;
  277. height: 56px;
  278. line-height: 56px;
  279. margin: 0 10px;
  280. color: #83a3be;
  281. font-size: 32px;
  282. }
  283. }
  284. .user-box {
  285. margin-left: 10px;
  286. width: 100%;
  287. height: 100%;
  288. .user-table {
  289. padding: 15px 0;
  290. display: flex;
  291. flex-direction: column;
  292. font-size: 38px;
  293. color: #fbffff;
  294. .tr {
  295. background-color: #102e76;
  296. }
  297. .tr,
  298. .tr2 {
  299. display: flex;
  300. padding: 6px 0;
  301. .td {
  302. flex: 1;
  303. display: flex;
  304. align-items: center;
  305. }
  306. .td2 {
  307. width: 65px;
  308. display: flex;
  309. align-items: center;
  310. justify-content: center;
  311. }
  312. .td3 {
  313. flex: 2;
  314. display: flex;
  315. align-items: center;
  316. }
  317. }
  318. .table-content {
  319. height: 858px;
  320. overflow-y: auto;
  321. }
  322. .tr2 {
  323. margin-top: 10px;
  324. background-color: #122868;
  325. }
  326. .phone-icon {
  327. width: 62px;
  328. height: 63px;
  329. background: url('@/assets/images/emergencyCommandMap/communication/phone.png');
  330. cursor: pointer;
  331. }
  332. }
  333. }
  334. }
  335. .custom-select-popper {
  336. .el-scrollbar {
  337. .el-select-dropdown__item {
  338. color: #b1cae0;
  339. font-size: 32px;
  340. height: 56px;
  341. line-height: 56px;
  342. }
  343. }
  344. }
  345. .input {
  346. background: transparent;
  347. color: #83a3be;
  348. font-size: 32px;
  349. outline: none;
  350. appearance: none;
  351. height: 100%;
  352. border: none;
  353. &::placeholder {
  354. color: #83a3be;
  355. }
  356. }
  357. .tree-container {
  358. margin-top: 15px;
  359. display: flex;
  360. .tree-box {
  361. width: 100%;
  362. height: 920px;
  363. overflow-y: auto;
  364. padding: 15px 8px;
  365. :deep(.el-tree) {
  366. height: 100%;
  367. background-color: transparent;
  368. color: #fbffff;
  369. font-size: 38px;
  370. .el-tree-node__content {
  371. height: auto;
  372. padding-top: 10px;
  373. padding-bottom: 10px;
  374. white-space: normal;
  375. word-break: break-all;
  376. }
  377. .el-tree-node__expand-icon {
  378. color: #297cfc;
  379. font-size: 23px;
  380. }
  381. .el-tree-node:focus > .el-tree-node__content,
  382. .el-tree-node__content:hover {
  383. background-color: transparent !important;
  384. }
  385. }
  386. }
  387. }
  388. .select-box2 {
  389. margin-left: 30px;
  390. width: 910px;
  391. height: 100%;
  392. .select-header {
  393. display: flex;
  394. justify-content: space-between;
  395. align-items: center;
  396. color: #fbffff;
  397. font-size: 32px;
  398. border-bottom: 1px solid #247dff;
  399. padding: 20px;
  400. .left-item {
  401. display: flex;
  402. align-items: center;
  403. .text {
  404. margin: 0 10px;
  405. color: #00e8ff;
  406. font-family: 'BEBAS-1';
  407. }
  408. }
  409. .clear-btn {
  410. color: #00e8ff;
  411. cursor: pointer;
  412. }
  413. }
  414. .select-content {
  415. height: 858px;
  416. overflow-y: auto;
  417. .box-item {
  418. border-bottom: 1px solid #247dff;
  419. padding: 20px;
  420. position: relative;
  421. .line {
  422. color: #fff;
  423. font-size: 38px;
  424. display: flex;
  425. .text1 {
  426. margin-right: 35px;
  427. }
  428. .text2 {
  429. color: #a7ccdf;
  430. }
  431. }
  432. .close-btn {
  433. position: absolute;
  434. right: 10px;
  435. top: 50px;
  436. cursor: pointer;
  437. width: 29px;
  438. height: 29px;
  439. background: url('@/assets/images/emergencyCommandMap/communication/close.png') no-repeat;
  440. }
  441. }
  442. }
  443. }
  444. }
  445. .footer {
  446. height: 136px;
  447. display: flex;
  448. align-items: center;
  449. justify-content: space-between;
  450. .btn-box {
  451. display: flex;
  452. }
  453. }
  454. </style>