招聘网页
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

index.vue 7.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. <template>
  2. <div class="content-padding-inline" style="margin: 30px 0;">
  3. <a-row :gutter="[10,10]" type="flex" justify="center">
  4. <a-col span="18">
  5. <a-row :gutter="20">
  6. <a-col span="4">
  7. <div style="position: fixed; top: 90px; z-index:99;">
  8. <a-anchor style="width: 210px !important;" :get-container="getContainer" :target-offset="50" :items="menu_list"
  9. @click="anchorClick"></a-anchor>
  10. </div>
  11. </a-col>
  12. <a-col span="20">
  13. <div style="width: 100%;background-color: #fff;padding: 0 20px;border-radius: 8px;">
  14. <div ref="abc" class="abc" style="height: 100vh;overflow: auto;">
  15. <a-space direction="vertical" justify="space-between" :size="36"
  16. style="width: 100% !important;">
  17. <div id="basic">
  18. <a-typography style="margin-top: 20px;">
  19. <a-flex align="center" justify="space-between">
  20. <a-typography-title :level="4">
  21. <div class="text-decoration">
  22. <div class="text-content">基本资料</div>
  23. </div>
  24. </a-typography-title>
  25. <FormOutlined @click="edit('basic')" v-if="editObj.basic"
  26. style="color: #4FBE70;font-size: 24px;" />
  27. <PlusCircleOutlined @click="edit('basic')" v-else
  28. style="color: #4FBE70;font-size: 24px;" />
  29. </a-flex>
  30. <a-typography-paragraph>
  31. <company-basic :form_state="editObj.basic"
  32. @quitEdit="quitEdit"></company-basic>
  33. </a-typography-paragraph>
  34. </a-typography>
  35. </div>
  36. <div id="department">
  37. <a-typography style="margin-top: 20px;">
  38. <a-flex align="center" justify="space-between">
  39. <a-typography-title :level="4">
  40. <div class="text-decoration">
  41. <div class="text-content">企业部门</div>
  42. </div>
  43. </a-typography-title>
  44. <FormOutlined @click="edit('department')" v-if="editObj.department"
  45. style="color: #4FBE70;font-size: 24px;" />
  46. <PlusCircleOutlined @click="edit('department')" v-else
  47. style="color: #4FBE70;font-size: 24px;" />
  48. </a-flex>
  49. <a-typography-paragraph>
  50. <company-department :form_state="editObj.department"
  51. @quitEdit="quitEdit"
  52. @editEdit="edit('department')"></company-department>
  53. </a-typography-paragraph>
  54. </a-typography>
  55. </div>
  56. <div id="licence">
  57. <a-typography style="margin-top: 20px;">
  58. <a-flex align="center" justify="space-between">
  59. <a-typography-title :level="4">
  60. <div class="text-decoration">
  61. <div class="text-content">营业执照</div>
  62. </div>
  63. </a-typography-title>
  64. <FormOutlined @click="edit('licence')" v-if="editObj.licence"
  65. style="color: #4FBE70;font-size: 24px;" />
  66. <PlusCircleOutlined @click="edit('licence')" v-else
  67. style="color: #4FBE70;font-size: 24px;" />
  68. </a-flex>
  69. <a-typography-paragraph>
  70. <company-licence :form_state="editObj.licence"
  71. @quitEdit="quitEdit"></company-licence>
  72. </a-typography-paragraph>
  73. </a-typography>
  74. </div>
  75. <div id="image">
  76. <a-typography style="margin-top: 20px;">
  77. <a-flex align="center" justify="space-between">
  78. <a-typography-title :level="4">
  79. <div class="text-decoration">
  80. <div class="text-content">企业相册</div>
  81. </div>
  82. </a-typography-title>
  83. <FormOutlined @click="edit('image')" v-if="editObj.image"
  84. style="color: #4FBE70;font-size: 24px;" />
  85. <PlusCircleOutlined @click="edit('image')" v-else
  86. style="color: #4FBE70;font-size: 24px;" />
  87. </a-flex>
  88. <a-typography-paragraph>
  89. <company-image :form_state="editObj.image"
  90. @quitEdit="quitEdit"></company-image>
  91. </a-typography-paragraph>
  92. </a-typography>
  93. </div>
  94. </a-space>
  95. </div>
  96. </div>
  97. </a-col>
  98. </a-row>
  99. </a-col>
  100. </a-row>
  101. </div>
  102. </template>
  103. <script setup lang="ts">
  104. import { ref, computed, onMounted, createVNode } from 'vue';
  105. import CompanyBasic from '@/components/company/information/basic/index.vue'
  106. import CompanyDepartment from '@/components/company/information/department/index.vue'
  107. import CompanyLicence from '@/components/company/information/licence/index.vue'
  108. import CompanyImage from '@/components/company/information/image/index.vue'
  109. import { FormOutlined, PlusCircleOutlined } from '@ant-design/icons-vue';
  110. import { useCommon } from '@/hooks/useCommon';
  111. let { store, dayjs, richOption, ExclamationCircleOutlined, Modal } = useCommon();
  112. let menu_list = ref([
  113. { title: '基本资料', key: 1, href: '#basic' },
  114. { title: '企业部门', key: 2, href: '#department' },
  115. { title: '营业执照', key: 3, href: '#licence' },
  116. { title: '企业相册', key: 4, href: '#image' }])
  117. let editObj = ref<Object>({
  118. basic: false,
  119. department: false,
  120. licence: false,
  121. image: false
  122. })
  123. let editingKey = ref(null); // 存储当前正在编辑的键
  124. const edit = (key) => {
  125. if (editingKey.value && editingKey.value !== key) {
  126. Modal.confirm({
  127. title: '有内容在进行编辑,是否要退出当前编辑',
  128. icon: createVNode(ExclamationCircleOutlined),
  129. content: '当前编辑内容不会保存',
  130. okText: '退出',
  131. cancelText: '取消',
  132. onOk() {
  133. editObj.value[editingKey.value] = false;
  134. editingKey.value = key;
  135. editObj.value[key] = true;
  136. },
  137. onCancel() {
  138. return;
  139. },
  140. });
  141. // const confirmResult = window.confirm('您已在一个字段中进行编辑,继续将丢失未保存的更改,是否继续?');
  142. // console.log(confirmResult)
  143. // debugger
  144. // if (!confirmResult) {
  145. // return;
  146. // }
  147. // debugger
  148. // editObj.value[editingKey.value] = false;
  149. } else {
  150. editingKey.value = key;
  151. editObj.value[key] = true;
  152. }
  153. };
  154. // 退出编辑
  155. const quitEdit = () => {
  156. editObj.value[editingKey.value] = false;
  157. editingKey.value = null
  158. console.log(editObj.value)
  159. }
  160. const abc = ref(null)
  161. const getContainer = (val) => {
  162. return abc.value
  163. }
  164. const anchorClick = (e, link) => {
  165. e.preventDefault()
  166. if (link.href) {
  167. let element = document.getElementById(link.href)
  168. element && element.scrollIntoView({
  169. block: 'end',
  170. behavior: 'smooth',
  171. })
  172. }
  173. }
  174. </script>
  175. <style scoped>
  176. :deep(.ant-anchor) {
  177. background-color: #ffffff !important;
  178. border-radius: 8px !important;
  179. padding-inline-start: 2px;
  180. }
  181. :deep(.ant-anchor::before) {
  182. border-inline-start: 0 !important;
  183. }
  184. :deep(.ant-anchor-ink) {
  185. background-color: #ffffff !important;
  186. }
  187. :deep(.ant-anchor-link) {
  188. padding: 10px !important;
  189. }
  190. :deep(.ant-anchor-link-title-active) {
  191. font-weight: bold !important;
  192. color: #4FBE70 !important;
  193. }
  194. .text-decoration {
  195. position: relative;
  196. display: inline-block;
  197. overflow: visible;
  198. }
  199. .text-decoration::before {
  200. content: '';
  201. width: 6px;
  202. height: 22px;
  203. background-color: #4FBE70;
  204. position: absolute;
  205. top: 4px
  206. }
  207. .text-content {
  208. position: relative;
  209. margin-left: 20px;
  210. }
  211. </style>