Browse Source

沟通-求简历

Xiao_123 1 tháng trước cách đây
mục cha
commit
ed6f60be6d
2 tập tin đã thay đổi với 54 bổ sung4 xóa
  1. 50 4
      pagesA/chart/index.vue
  2. 4 0
      static/style/index.scss

+ 50 - 4
pagesA/chart/index.vue

@@ -155,15 +155,25 @@
       </view>
     </view>
 
-    <!-- <uni-popup ref="invitePopup" background-color="#fff" type="bottom">
-			<view style="background-color: #fff; height: 70vh;">
+    <!-- 求简历 -->
+    <uni-popup ref="requestPopup" background-color="#fff" type="bottom">
+			<view style="background-color: #fff; height: 50vh; padding: 30px 20px;">
+        <uni-forms ref="requestFormRef" :modelValue="formData" :rules="formRules" validateTrigger="bind" label-width="80px" label-align="right" label-position="left">
+          <uni-forms-item name="jobId" label="招聘职位" required>
+            <view style="max-width: calc(100vw - 120px);">
+              <uni-data-select v-model="formData.jobId" :localdata="jobList"	@change="handleChangeJob"	placeholder="请选择要求简历的职位"></uni-data-select>
+            </view>
+          </uni-forms-item>
+        </uni-forms>
+		    <view style="margin-top: 50px;"></view>
+        <button class="send-button" @tap="handleRequestSubmit">提 交</button>
       </view>
-		</uni-popup> -->
+		</uni-popup>
   </view>
 </template>
 
 <script setup>
-import { ref, watch, onMounted, computed } from 'vue'
+import { ref, watch, onMounted, computed, unref } from 'vue'
 import { onLoad } from '@dcloudio/uni-app'
 import { useIMStore } from '@/store/im'
 import { userStore } from '@/store/user'
@@ -276,6 +286,16 @@ const getJobList = async () => {
 }
 
 // 求简历
+const requestPopup = ref()
+const requestFormRef = ref()
+const formData = ref({
+  jobId: null
+})
+const formRules = {
+	jobId: {
+		rules: [{ required: true, errorMessage: '请选择要求简历的职位' }]
+	}
+}
 const handleFindResume = async () => {
   if (!getAccessToken()) {
     showAuthModal()
@@ -290,6 +310,32 @@ const handleFindResume = async () => {
 		})
 		return
 	}
+  requestPopup.value.open()
+}
+
+const handleChangeJob = (e) => {
+  const job = jobList.value.find(item => item.value === e)
+	if (!job) return
+  formData.value.positionInfo = job
+}
+
+const handleRequestSubmit = async () => {
+  const valid = await unref(requestFormRef).validate()
+	if (!valid) return
+
+  const text = {
+    remark: '求简历',
+    query: {
+      src: '',
+      title: '',
+      id: '',
+      positionInfo: formData.value.positionInfo
+    },
+    type: 2
+  }
+  send (JSON.stringify(text), channelItem.value, 105)
+  formData.value = { jobId: null }
+  requestPopup.value.close()
 }
 
 // 邀约面试

+ 4 - 0
static/style/index.scss

@@ -506,4 +506,8 @@
 .uni-forms-item__content {
   max-width: 100% !important;
   // overflow: hidden !important;
+}
+
+.uni-select__input-box {
+	width: 100%;
 }