From 2591e298a3fd1332ad0ca33059f6ba0b7d426f51 Mon Sep 17 00:00:00 2001 From: pengwei <2071057782@qq.com> Date: 星期四, 20 三月 2025 10:08:00 +0800 Subject: [PATCH] 最新代码提交 --- 项目代码/client/src/views/tts/TheCurrentJob/Thecurrentjob.vue | 156 ++++++++++++++++++++++++++++++++++++---------------- 1 files changed, 108 insertions(+), 48 deletions(-) diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/views/tts/TheCurrentJob/Thecurrentjob.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/views/tts/TheCurrentJob/Thecurrentjob.vue" index ac87e60..a1b9d84 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/views/tts/TheCurrentJob/Thecurrentjob.vue" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/views/tts/TheCurrentJob/Thecurrentjob.vue" @@ -3,18 +3,21 @@ <div class="content"> <div class="checkbox"> <div + v-if="show == '瓒呯骇' || show == '鏈烘'" :class="['item', isactive == '鏈烘' ? 'isactive' : '']" @click="changeactive('鏈烘')" > 鏈烘 </div> <div + v-if="show == '瓒呯骇' || show == '鐢垫皵'" :class="['item', isactive == '鐢垫皵' ? 'isactive' : '']" @click="changeactive('鐢垫皵')" > 鐢垫皵 </div> <div + v-if="show == '瓒呯骇' || show == '鍦版矡'" :class="['item', isactive == '鍦版矡' ? 'isactive' : '']" @click="changeactive('鍦版矡')" > @@ -59,7 +62,7 @@ size="small" /> </div> - <!-- <div class="serch_box"> + <div class="serch_box"> <div class="serchb"> <el-select v-model="queryForm.selectType" @@ -80,7 +83,7 @@ placeholder="璇疯緭鍏ュ叧閿瘝鎼滅储" style="border-left: 0.06rem solid #e2e2e2" /> - </div> --> + </div> <el-button @click="handleQuery" type="primary" @@ -201,11 +204,15 @@ label="娲惧伐鏃ユ湡" align="center" /> - <el-table-column - prop="finishedtime" - label="瀹屾垚鏃ユ湡" - align="center" - /> + <el-table-column prop="finishedtime" label="瀹屾垚鏃ユ湡" align="center"> + <template #default="scope"> + {{ + scope.row.finishedtime != "1900-01-01 00:00:00" + ? scope.row.finishedtime + : "" + }} + </template></el-table-column + > <el-table-column label="鎿嶄綔" align="center"> <template #default="scope"> <el-button @@ -224,7 +231,7 @@ v-if="scope.row.pustatus == 1" size="small" type="text" - @click="router.push('/Startjob')" + @click="toDetail(scope.row, isactive)" >寮�濮嬩綔涓�</el-button > <el-button @@ -344,11 +351,15 @@ label="娲惧伐鏃ユ湡" align="center" /> - <el-table-column - prop="finishedtime" - label="瀹屾垚鏃ユ湡" - align="center" - /> + <el-table-column prop="finishedtime" label="瀹屾垚鏃ユ湡" align="center"> + <template #default="scope"> + {{ + scope.row.finishedtime != "1900-01-01 00:00:00" + ? scope.row.finishedtime + : "" + }} + </template> + </el-table-column> <el-table-column label="鎿嶄綔" align="center"> <template #default="scope"> <el-button @@ -367,7 +378,7 @@ v-if="scope.row.pustatus == 1" size="small" type="text" - @click="claim(scope.row, 2)" + @click="toDetail(scope.row, isactive)" >寮�濮嬩綔涓�</el-button > <el-button @@ -487,11 +498,15 @@ label="娲惧伐鏃ユ湡" align="center" /> - <el-table-column - prop="finishedtime" - label="瀹屾垚鏃ユ湡" - align="center" - /> + <el-table-column prop="finishedtime" label="瀹屾垚鏃ユ湡" align="center"> + <template #default="scope"> + {{ + scope.row.finishedtime != "1900-01-01 00:00:00" + ? scope.row.finishedtime + : "" + }} + </template> + </el-table-column> <el-table-column label="鎿嶄綔" align="center"> <template #default="scope"> <el-button @@ -510,7 +525,7 @@ v-if="scope.row.pustatus == 1" size="small" type="text" - @click="claim(scope.row, 2)" + @click="toDetail(scope.row, isactive)" >寮�濮嬩綔涓�</el-button > <el-button @@ -638,9 +653,7 @@ <template #footer> <div class="dialog-footer" style="text-align: right"> <el-button @click="claimdialogVisible2 = false">鍙栨秷</el-button> - <el-button type="primary" @click="claimdialogVisible = false"> - 纭 - </el-button> + <el-button type="primary" @click="changeStatus"> 纭 </el-button> </div> </template> </el-dialog> @@ -685,13 +698,19 @@ </div> </template> <script setup> -import { ref, reactive, onMounted } from "vue"; +import { ref, reactive, onMounted, toRef } from "vue"; import { ElMessage, ElMessageBox } from "element-plus"; import { useRouter } from "vue-router"; -import { GetPageData, ExportApi } from "@/api/newapi/Thecurrentjob"; import { formatTime } from "@/utils/index.js"; -import { GetDetail, ChangeStatus } from "@/api/newapi/Thecurrentjob"; +import { + GetDetail, + ChangeStatus, + GetPageData, + ExportApi, + GetPageDataNew, +} from "@/api/newapi/Thecurrentjob"; import { GetSleeveandStep } from "@/api/newapi/Process"; +import { GetUserInfo } from "@/api/user"; const router = useRouter(); const obj = { @@ -700,12 +719,7 @@ selectType: "", inputcontent: "", }; -const queryForm = ref({ - selectName: "", - selectTime: [], // 鏃堕棿鑼冨洿 - selectType: "", - inputcontent: "", -}); +const queryForm = toRef({ ...obj }); const selectoptions = ref([ { value: "takename", @@ -718,6 +732,14 @@ { value: "gonzhang", label: "妫�淇伐闀�", + }, + { + value: "zhijianyuan", + label: "璐ㄦ鍛�", + }, + { + value: "lijuzouyeyuan", + label: "鍔涚煩浣滀笟鍛�", }, ]); const tableData = ref([]); @@ -763,21 +785,16 @@ queryForm.selectType = value; initData(); }; -//寮瑰嚭妗� -const dialogVisible = ref(false); -//鍒犻櫎鏂规硶 -const add = () => { - dialogVisible.value = true; -}; -//缂栬緫鏂规硶 -const Edit = () => { - dialogVisible.value = true; -}; + const claimdata = ref({ id: "", gruops: "", + creater: JSON.parse(localStorage.getItem("user")).userName, + createDate: formatTime(new Date()), }); const TTnum = ref(0); +//椤甸潰鏁� +const pageTotal = ref(0); //纭棰嗗彇 const claim = (val, num) => { claimdata.value.id = val.njtakeid; @@ -801,13 +818,17 @@ } }); }; - +//鏀瑰彉鐘舵�� const changeStatus = () => { + console.log(claimdata.value); ChangeStatus(claimdata.value).then((res) => { ElMessage({ - message: res.msg, + message: "鎴愬姛", type: "success", }); + claimdialogVisible.value = false; + claimdialogVisible1.value = false; + claimdialogVisible2.value = false; initData(); }); }; @@ -825,7 +846,7 @@ page: 1, //褰撳墠椤甸潰 rows: 10, //姣忛〉鏄剧ず鏉℃暟 order: "desc", //鎺掑簭鏂瑰紡 - sort: "dispatchtime", //鎺掑簭瀛楁 + sort: "", //鎺掑簭瀛楁 wheres: "", //鏉′欢鏌ヨ }); @@ -840,8 +861,18 @@ pageQuery.value.page = val; initData(); }; -const pageTotal = ref(0); +//鏁版嵁鍒濆鍖� const initData = () => { + let obj = { + userId: JSON.parse(localStorage.getItem("user")).id, + group: isactive.value, + }; + console.log(obj); + + // GetPageDataNew(obj).then((res) => { + // tableData.value = res.data; + // pageTotal.value = res.data.length; + // }); // 鏌ヨ鏉′欢 const startTime = formatTime(queryForm.value.selectTime[0]); const endTime = formatTime(queryForm.value.selectTime[1]); @@ -854,7 +885,7 @@ { name: queryForm.value.selectType, value: queryForm.value.inputcontent, - displayType: "String", + displayType: "like", }, { name: "pustatus", @@ -872,7 +903,7 @@ pageTotal.value = res.total; }); }; - +//鎵撳嵃鏁版嵁 const printExcel = () => { // 鏌ヨ鏉′欢 const startTime = formatTime(queryForm.value.selectTime[0]); @@ -906,15 +937,44 @@ pageQuery.value.page = 1; initData(); }; + +//閲嶇疆妫�绱簨浠� const resetQuery = () => { queryForm.value = Object.assign({}, obj); pageQuery.value.page = 1; initData(); }; +//閲嶇疆琛ㄥ崟 +const resetForm = (formEl) => { + if (!formEl) return; + formEl.resetFields(); +}; const userInfo = ref(""); +//璺敱璺宠浆 +const toDetail = (row, title) => { + router.push({ + name: "Startjob", + state: { info: JSON.stringify(row), title: title }, + }); +}; +const show = ref(""); +const getuserinfo = () => { + GetUserInfo().then((res) => { + console.log(res); + show.value = res.data.roleName.substring(0, 2); + if (show.value != "瓒呯骇") { + isactive.value = show.value; + initData(); + } + }); +}; + +//鏁版嵁鍒濆鍖� onMounted(() => { initData(); + getuserinfo(); + userInfo.value = JSON.parse(localStorage.getItem("user")).userName; }); </script> -- Gitblit v1.9.3