|
@@ -92,22 +92,22 @@
|
|
|
<!-- 详细地址 -->
|
|
|
<div class="detail-item">
|
|
|
<div class="detail-label">详细地址</div>
|
|
|
- <div class="detail-value" v-if="!isEditingDepartment">
|
|
|
- {{ positionData.department || '暂无' }}
|
|
|
- <el-button type="text" class="edit-title-btn" @click="startEditDepartment">
|
|
|
+ <div class="detail-value" v-if="!isDetailedAddress">
|
|
|
+ {{ positionData.detailed_address || '暂无' }}
|
|
|
+ <el-button type="text" class="edit-title-btn" @click="startDetailedAddress">
|
|
|
<el-icon><Edit /></el-icon>
|
|
|
</el-button>
|
|
|
</div>
|
|
|
<div class="title-edit-container" v-else>
|
|
|
<el-input
|
|
|
- v-model="editingDepartment"
|
|
|
+ v-model="detailed_address"
|
|
|
placeholder="请输入详细地址"
|
|
|
maxlength="30"
|
|
|
show-word-limit
|
|
|
/>
|
|
|
<div class="title-edit-actions">
|
|
|
- <el-button size="small" @click="cancelEditDepartment">取消</el-button>
|
|
|
- <el-button size="small" type="primary" @click="saveDepartment">保存</el-button>
|
|
|
+ <el-button size="small" @click="cancelDetailedAddress">取消</el-button>
|
|
|
+ <el-button size="small" type="primary" @click="saveDetailedAddress">保存</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -2650,7 +2650,8 @@ const positionData = reactive({
|
|
|
education_required: '',
|
|
|
competency_tags: [],
|
|
|
options: [],
|
|
|
- status: 0
|
|
|
+ status: 0,
|
|
|
+ detailed_address:''
|
|
|
});
|
|
|
|
|
|
// 招聘流程数据 - 修改为普通数组而非 ref 对象,添加type字段用于重复检查
|
|
@@ -3258,6 +3259,7 @@ const getPositionDetail = async () => {
|
|
|
const response = await api.GetObj(id); // 使用 infoReq 而不是 id
|
|
|
if (response && response.data) {
|
|
|
Object.assign(positionData, response.data);
|
|
|
+ console.log(positionData);
|
|
|
competencyTagOptions.value=response.data.competency_tags
|
|
|
const config = await GetConfig(id);
|
|
|
if (config && config.data) {
|
|
@@ -4652,6 +4654,43 @@ const saveTitle = async () => {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+/* 详细地址 */
|
|
|
+const isDetailedAddress = ref(false);
|
|
|
+const detailed_address = ref('');
|
|
|
+
|
|
|
+// 开始编辑职位名称
|
|
|
+const startDetailedAddress = () => {
|
|
|
+ detailed_address.value = positionData.detailed_address;
|
|
|
+ isDetailedAddress.value = true;
|
|
|
+};
|
|
|
+
|
|
|
+// 取消编辑职位名称
|
|
|
+const cancelDetailedAddress = () => {
|
|
|
+ isDetailedAddress.value = false;
|
|
|
+};
|
|
|
+const saveDetailedAddress = async()=>{
|
|
|
+ if (!detailed_address.value.trim()) {
|
|
|
+ ElMessage.warning('详细地址不能为空');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ try {
|
|
|
+ const id = route.query.id;
|
|
|
+ await api.UpdateObj({
|
|
|
+ id: id,
|
|
|
+ detailed_address: detailed_address.value.trim()
|
|
|
+ });
|
|
|
+
|
|
|
+ // 更新本地数据
|
|
|
+ positionData.detailed_address = detailed_address.value.trim();
|
|
|
+ isDetailedAddress.value = false;
|
|
|
+ ElMessage.success('详细地址已更新');
|
|
|
+ } catch (error) {
|
|
|
+ console.error('更新详细地址失败:', error);
|
|
|
+ ElMessage.error('更新详细地址失败');
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
// 工作地点编辑
|
|
|
const isEditingLocation = ref(false);
|
|
|
const editingLocation = ref('');
|