培训意愿
This commit is contained in:
@@ -103,13 +103,19 @@
|
||||
<view class="float-btn" @click="goDetail('add')">
|
||||
<uni-icons type="plusempty" color="#fff" size="30"></uni-icons>
|
||||
</view>
|
||||
<view>
|
||||
<!-- 提示窗示例 -->
|
||||
<uni-popup ref="alertDialog" type="dialog">
|
||||
<uni-popup-dialog type="warn" cancelText="取消" confirmText="确定" title="提示" content="确定要删除这条求职意愿吗?" @confirm="dialogConfirm"></uni-popup-dialog>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</view>
|
||||
</AppLayout>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { inject, ref, reactive, onMounted } from 'vue';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import { onLoad,onShow } from '@dcloudio/uni-app';
|
||||
const { $api, navTo, navBack } = inject('globalFunction');
|
||||
import config from "@/config.js"
|
||||
|
||||
@@ -130,6 +136,8 @@ const getBackgroundStyle = (imageName) => ({
|
||||
backgroundPosition: 'center', // 居中
|
||||
backgroundRepeat: 'no-repeat'
|
||||
});
|
||||
const alertDialog = ref(null);
|
||||
const currentItem=ref({})
|
||||
function getDictionary(){
|
||||
$api.myRequest('/system/public/dict/data/type/education').then((resData) => {
|
||||
if(resData && resData.code == 200){
|
||||
@@ -197,19 +205,45 @@ function scrollBottom(){
|
||||
function goDetail(val,item){
|
||||
if(val=='add'){
|
||||
navTo('/packageB/priority/jobWillEdit?goalPersonId=' + goalPersonId.value);
|
||||
}else{
|
||||
navTo('/packageB/priority/jobWillEdit?item=' + JSON.stringify(item));
|
||||
}
|
||||
|
||||
}
|
||||
function del(item){}
|
||||
function del(item){
|
||||
if (alertDialog.value) {
|
||||
alertDialog.value.open();
|
||||
currentItem.value=item
|
||||
}
|
||||
}
|
||||
function dialogConfirm(){
|
||||
let header={
|
||||
'Authorization':uni.getStorageSync('Padmin-Token'),
|
||||
'Content-Type': "application/x-www-form-urlencoded"
|
||||
}
|
||||
$api.myRequest('/dispatch/job/willingness/'+currentItem.value.id,{},'delete',9100,header).then((resData) => {
|
||||
console.log("resData",resData)
|
||||
if(resData.code==200){
|
||||
dataList.value=[]
|
||||
pageNum.value=1
|
||||
getDataList()
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
onLoad((options) => {
|
||||
id.value=options.id
|
||||
goalPersonId.value=options.goalPersonId
|
||||
runAsyncTasks()
|
||||
});
|
||||
const runAsyncTasks = async () => {
|
||||
await getDictionary()
|
||||
await getDataList()
|
||||
}
|
||||
onShow(()=>{
|
||||
dataList.value=[]
|
||||
pageNum.value=1
|
||||
runAsyncTasks()
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user