From 1288a7890deb3b180b1e8df7015b1036514c4e71 Mon Sep 17 00:00:00 2001 From: pengwei <2071057782@qq.com> Date: 星期四, 27 三月 2025 09:07:12 +0800 Subject: [PATCH] 3.27优化 --- 项目代码/client/src/views/tts/BasicInformation/Basicinformation.vue | 22 ++++ 项目代码/client/src/views/tts/DataLogging/Datalogging.vue | 34 ++++++-- 项目代码/client/src/views/tts/UserManagement/Usermanagement.vue | 20 ++--- 项目代码/client/src/views/tts/TheCurrentJob/Startjob.vue | 122 ++++++++++++++++++++++++------ 项目代码/client/src/views/system/UserInfo.vue | 29 ++++++ 项目代码/client/src/views/tts/TaskManagement/Taskmanagement.vue | 6 + 项目代码/client/dist.7z | 0 7 files changed, 182 insertions(+), 51 deletions(-) diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/client/dist.7z" "b/\351\241\271\347\233\256\344\273\243\347\240\201/client/dist.7z" index 19ef8fe..ff00b08 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/client/dist.7z" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/client/dist.7z" Binary files differ diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/views/system/UserInfo.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/views/system/UserInfo.vue" index ca911b1..636a6a0 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/views/system/UserInfo.vue" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/views/system/UserInfo.vue" @@ -11,7 +11,7 @@ > <el-image style="width: 100px; height: 100px" - :src="'http://192.168.0.80:5000' + userInfo.headImageUrl" + :src="'http://115.159.85.185:9098' + userInfo.headImageUrl" :fit="fit" /> <!-- <img @@ -327,11 +327,37 @@ if (!formEl) return; await formEl.validate((valid, fields) => { if (valid) { + if ( + Passwordform.value.newPwd == "" || + Passwordform.value.oldPwd == "" || + newPwd.value == "" + ) { + ElMessage({ + message: "杈撳叆妗嗕笉鑳戒负绌�", + type: "warning", + }); + return; + } + if (Passwordform.value.newPwd == Passwordform.value.oldPwd) { + ElMessage({ + message: "涓ゆ瀵嗙爜涓�鑷�", + type: "warning", + }); + return; + } + if (Passwordform.value.newPwd != newPwd.value) { + ElMessage({ + message: "鏂板瘑鐮佷笉涓�鑷�", + type: "warning", + }); + return; + } UpdatePassword(Passwordform.value).then((res) => { ElMessage({ message: "淇敼鎴愬姛", type: "success", }); + dialogVisible.value = false; console.log(res); }); } else { @@ -359,7 +385,6 @@ upload.value.handleRemove(file); }; const onSubmit = () => { - if (form.value.files == "") { ElMessage({ message: "鍥剧墖涓嶈兘涓虹┖", type: "warning" }); return; diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/views/tts/BasicInformation/Basicinformation.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/views/tts/BasicInformation/Basicinformation.vue" index af304b1..d126bca 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/views/tts/BasicInformation/Basicinformation.vue" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/views/tts/BasicInformation/Basicinformation.vue" @@ -106,7 +106,8 @@ ><el-icon style="margin-right: 0.2rem"> <Plus /> </el-icon >鏂板缓</el-button > - <!-- <el-button + <el-button + @click="importDialogVisible = true" size="small" style="width: 5.5rem; height: 2rem; font-size: 0.88rem" >鎵归噺瀵煎叆</el-button @@ -116,7 +117,7 @@ style="width: 5.5rem; height: 2rem; font-size: 0.88rem" @click="printExcel" >鎵归噺瀵煎嚭</el-button - > --> + > <el-button @click="deleteAll" size="small" @@ -482,12 +483,27 @@ </div> </template> </el-dialog> + + <el-dialog v-model="importDialogVisible"> + <UploadExcel + @importExcelAfter="importExcelAfter" + :url="isactive == 1 ? 'api/ArticleInfom/Import' : 'api/Tools/Import'" + :template="{ + url: + isactive == 1 + ? 'api/ArticleInfom/DownLoadTemplate' + : 'api/Tools/DownLoadTemplate', + fileName: isactive == 1 ? '淇℃伅瀵煎叆妯℃澘' : '宸ュ叿瀵煎叆妯℃澘', + }" + /> + </el-dialog> </div> </template> <script setup> import { ref, reactive, onMounted, toRef } from "vue"; import { ElMessage, ElMessageBox } from "element-plus"; import { formatTime } from "@/utils/index.js"; +import UploadExcel from "@/components/basic/UploadExcel.vue"; import { getBasicinformation, addBasicinformation, @@ -515,7 +531,7 @@ const isactive = ref(1); const dialogVisible = ref(false); const dialogVisible1 = ref(false); - +const importDialogVisible = ref(false); // 瀵煎叆 const selectoptions = ref([]); const infoOpitions = ref([ { diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/views/tts/DataLogging/Datalogging.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/views/tts/DataLogging/Datalogging.vue" index a274660..f2318c7 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/views/tts/DataLogging/Datalogging.vue" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/views/tts/DataLogging/Datalogging.vue" @@ -1,7 +1,10 @@ <template> <div class="Datalogging"> <div class="content"> - <div class="checkbox"> + <div + class="checkbox" + :style="{ width: roleINFO == 1 ? '16rem' : '11rem' }" + > <div :class="['item', isactive == 1 ? 'isactive' : '']" @click="changeactive(1)" @@ -15,6 +18,7 @@ 浣滀笟鍗曡褰� </div> <div + v-if="roleINFO == 1" :class="['item', isactive == 3 ? 'isactive' : '']" @click="changeactive(3)" > @@ -849,7 +853,9 @@ > <span style="width: 6rem; text-align: right; display: block" >浠诲姟鍚嶇О锛�</span - ><span>{{ pesonData[0].takename }}</span> + ><span>{{ + pesonData.length != 0 ? pesonData[0].takename : "" + }}</span> </div> <div style=" @@ -861,7 +867,9 @@ > <span style="width: 6rem; text-align: right; display: block" >鎶�鏈憳锛�</span - ><span>{{ pesonData[0].jishuyuan }}</span> + ><span>{{ + pesonData.length != 0 ? pesonData[0].jishuyuan : "" + }}</span> </div> <div style=" @@ -873,7 +881,9 @@ > <span style="width: 6rem; text-align: right; display: block" >妫�淇伐闀匡細</span - ><span>{{ pesonData[0].gonzhang }}</span> + ><span>{{ + pesonData.length != 0 ? pesonData[0].gonzhang : "" + }}</span> </div> <div style=" @@ -885,7 +895,9 @@ > <span style="width: 6rem; text-align: right; display: block" >璐ㄦ鍛橈細</span - ><span>{{ pesonData[0].zhijianyuan }}</span> + ><span>{{ + pesonData.length != 0 ? pesonData[0].zhijianyuan : "" + }}</span> </div> <div style=" @@ -897,7 +909,9 @@ > <span style="width: 6rem; text-align: right; display: block" >鍔涚煩浣滀笟鍛橈細</span - ><span>{{ pesonData[0].lijuzouyeyuan }}</span> + ><span>{{ + pesonData.length != 0 ? pesonData[0].lijuzouyeyuan : "" + }}</span> </div> <div style=" @@ -909,7 +923,9 @@ > <span style="width: 6rem; text-align: right; display: block" >杈呭姪鍛橈細</span - ><span>{{ pesonData[0].fuzyuan }}</span> + ><span>{{ + pesonData.length != 0 ? pesonData[0].fuzyuan : "" + }}</span> </div> <div style=" @@ -1158,6 +1174,8 @@ ], }).then((res) => { pesonData.value = res.rows; + console.log(res.rows); + TorquedialogVisible.value = true; }); }; @@ -1469,7 +1487,7 @@ const roleINFO = ref(); onMounted(() => { initData(); - roleINFO.value = JSON.parse(localStorage.getItem("user")); + roleINFO.value = JSON.parse(localStorage.getItem("user")).roleId; console.log(roleINFO.value); }); </script> diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/views/tts/TaskManagement/Taskmanagement.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/views/tts/TaskManagement/Taskmanagement.vue" index 3943c65..b0e2359 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/views/tts/TaskManagement/Taskmanagement.vue" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/views/tts/TaskManagement/Taskmanagement.vue" @@ -142,6 +142,12 @@ > <el-table-column type="selection" align="center" min-width="1%" /> <el-table-column + prop="takeName" + label="浠诲姟鍚嶇О" + align="center" + min-width="2%" + /> + <el-table-column prop="trainKind" label="杞﹀瀷" align="center" diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/views/tts/TheCurrentJob/Startjob.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/views/tts/TheCurrentJob/Startjob.vue" index 66c4238..0a01bb0 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/views/tts/TheCurrentJob/Startjob.vue" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/views/tts/TheCurrentJob/Startjob.vue" @@ -171,7 +171,7 @@ > </span> </div> - <div style="position: absolute; width: 47rem; height: 2.5rem"> + <div style="position: absolute; width: 62rem; height: 2.5rem"> <el-table empty-text="鏆傛棤鏁版嵁" style="margin-top: 0.88rem" @@ -191,7 +191,7 @@ <el-table-column property="craftsStep" label="宸ヨ壓椤圭偣/姝ラ" - min-width="30%" + min-width="13%" > <template #default="scope"> <span @@ -205,16 +205,41 @@ " >{{ scope.row.craftsStep }} </span></template - ></el-table-column - > + > + </el-table-column> + <el-table-column property="craftContent" label="宸ヨ壓鍐呭" - min-width="70%" + min-width="40%" > <template #default="scope"> + <el-tooltip placement="bottom" effect="light"> + <template #content> + <span style="display: block; width: 15rem">{{ + scope.row.craftContent + }}</span> + </template> + <span + @click="true" + style=" + color: #ffffff; + font-size: 0.88rem; + display: -webkit-box; /* 璁剧疆涓篧ebKit鍐呮牳鐨勫脊鎬х洅瀛愭ā鍨� */ + -webkit-box-orient: vertical; /* 鍨傜洿鎺掑垪 */ + -webkit-line-clamp: 2; /* 闄愬埗鏄剧ず涓よ */ + overflow: hidden; /* 闅愯棌瓒呭嚭鑼冨洿鐨勫唴瀹� */ + text-overflow: ellipsis; /* 浣跨敤鐪佺暐鍙� */ + " + >{{ scope.row.craftContent }}</span + > + </el-tooltip> + </template></el-table-column + > + <el-table-column property="tools" label="宸ュ叿" min-width="12%"> + <template #default="scope"> <span - @click="true" + ref="spanHide" style=" color: #ffffff; font-size: 0.88rem; @@ -224,12 +249,32 @@ overflow: hidden; /* 闅愯棌瓒呭嚭鑼冨洿鐨勫唴瀹� */ text-overflow: ellipsis; /* 浣跨敤鐪佺暐鍙� */ " - >{{ scope.row.craftContent }}</span + >{{ scope.row.tools }} + </span></template + ></el-table-column + > + <el-table-column + property="craftsStep" + label="鐗╂枡" + min-width="15%" + > + <template #default="scope"> + <span + style=" + color: #ffffff; + font-size: 0.88rem; + display: -webkit-box; /* 璁剧疆涓篧ebKit鍐呮牳鐨勫脊鎬х洅瀛愭ā鍨� */ + -webkit-box-orient: vertical; /* 鍨傜洿鎺掑垪 */ + -webkit-line-clamp: 2; /* 闄愬埗鏄剧ず涓よ */ + overflow: hidden; /* 闅愯棌瓒呭嚭鑼冨洿鐨勫唴瀹� */ + text-overflow: ellipsis; /* 浣跨敤鐪佺暐鍙� */ + " + >{{ scope.row.material }}</span ></template ></el-table-column > </el-table> - <div class="consten" v-if="contentShow"> + <div class="consten" v-show="contentShow"> <el-table empty-text="鏆傛棤鏁版嵁" :data="gridData" @@ -363,7 +408,7 @@ justify-content: center; align-items: center; position: absolute; - top: 35%; + top: 38%; left: 50%; transform: translateX(-50%); z-index: 999; @@ -419,7 +464,7 @@ > <el-button :disabled="obj.setpNum == sunNUm" - @click="Next(false)" + @click="DialogVisible = true" type="primary" :style="{ width: '5rem', @@ -454,13 +499,30 @@ <!-- 寮哄埗璺宠浆纭妗� --> <el-dialog v-model="centerDialogVisible" title="纭" width="300" center> - <span> 褰撳墠浠诲姟鏈畬鎴愶紝鏄惁寮哄埗璺宠浆鍒颁笅涓�姝ワ紵 </span> + <span sty> 褰撳墠浠诲姟鏈畬鎴愶紝鏄惁寮哄埗璺宠浆鍒颁笅涓�姝ワ紵 </span> <template #footer> <div class="dialog-footer"> <el-button style="width: 5rem" @click="centerDialogVisible = false" >鍙栨秷</el-button > <el-button style="width: 5rem" type="primary" @click="Next(true)"> + 纭 + </el-button> + </div> + </template> + </el-dialog> + + <!-- 鏄惁鍚堟牸鎴栧凡瀹屾垚 --> + <el-dialog v-model="DialogVisible" title="纭" width="300" center> + <span style="display: block; text-align: center; font-size: 1.5rem"> + 璇风‘璁ゅ綋鍓嶆楠ゅ凡瀹屾垚涓斿悎鏍� + </span> + <template #footer> + <div class="dialog-footer"> + <el-button style="width: 5rem" @click="DialogVisible = false" + >鍙栨秷</el-button + > + <el-button style="width: 5rem" type="primary" @click="Next(false)"> 纭 </el-button> </div> @@ -491,12 +553,11 @@ const container = ref(null); -// let scene, camera, renderer, controls; - const router = useRouter(); const gridData = ref([]); const contentShow = ref(false); const contentShow1 = ref(false); +const DialogVisible = ref(false); const info = ref({}); info.value = history.state?.info ? JSON.parse(history.state?.info) : {}; const title = ref(""); @@ -507,7 +568,7 @@ const Torque = ref(""); const showDetail1 = (va1) => { contentShow1.value = false; - contentShow.value = va1; + contentShow.value = true; }; const showDetail = (va1) => { contentShow1.value = va1; @@ -591,11 +652,13 @@ obj.value = res.data.nowdate[0]; if (res.data.nowdate[0].setpNum == obj.value.setpNum) { centerDialogVisible.value = true; + DialogVisible.value = false; return; } return; } centerDialogVisible.value = false; + DialogVisible.value = false; gridData.value = [res.data.nex]; xPos.value = gridData.value[0].pointAxisXYZ != null && @@ -631,7 +694,6 @@ from.value.gruops = info.value.grouptype; from.value.id = info.value.njtakeid; from.value.creater = info.value.creater; - console.log(from.value, info.value); ChangeStatus(from.value).then((res) => { ElMessage({ @@ -737,6 +799,7 @@ const BASE_COLOR = [0.2, 0.4, 0.6]; const RED_COLOR = [3.0, 0.2, 0.4]; const GREEN_COLOR = [0.0, 1.0, 0.0]; + const xPos = ref(""); const yPos = ref(""); const zPos = ref(""); @@ -788,7 +851,6 @@ material.needsUpdate = true; // 寮哄埗鏇存柊鏉愯川 }); }); - console.log(part.split(",")); if ( part == "鎶楄泧琛屽噺鎸櫒铻烘爴1,鎶楄泧琛屽噺鎸櫒铻烘爴2,鎶楄泧琛屽噺鎸櫒铻烘爴3,鎶楄泧琛屽噺鎸櫒铻烘爴4" @@ -886,12 +948,12 @@ [] ); }; -window.addEventListener("resize", () => { - console.log("鍒濆鍖栧満鏅�", window.innerWidth, window.innerHeight); - // camera.aspect = window.innerWidth / window.innerHeight; - // camera.updateProjectionMatrix(); - // renderer.setSize(window.innerWidth, window.innerHeight); -}); +// window.addEventListener("resize", () => { +// // console.log("鍒濆鍖栧満鏅�", window.innerWidth, window.innerHeight); +// // camera.aspect = window.innerWidth / window.innerHeight; +// // camera.updateProjectionMatrix(); +// // renderer.setSize(window.innerWidth, window.innerHeight); +// }); const nodeList = [ "杞悜鏋�", "鎶楄泧琛屽噺鎸櫒铻烘爴1,鎶楄泧琛屽噺鎸櫒铻烘爴2,鎶楄泧琛屽噺鎸櫒铻烘爴3,鎶楄泧琛屽噺鎸櫒铻烘爴4", @@ -990,7 +1052,7 @@ onMounted(() => { // 鍒濆鍖栧満鏅� - renderer.setSize(window.innerWidth / 1.5, window.innerHeight / 2); + renderer.setSize(window.innerWidth / 1.01, window.innerHeight / 2.1); renderer.setClearColor(0xeeeeee); // 璁剧疆鑳屾櫙鑹� // 鍚敤鐗╃悊娓叉煋妯″紡 // renderer.physicallyCorrectLights = true; @@ -1000,6 +1062,12 @@ // 娣诲姞浜や簰鎺у埗鍣紙榧犳爣鎷栨嫿缂╂斁锛� const controls = new OrbitControls(camera, renderer.domElement); + controls.enablePan = false; //绂佹鍙抽敭鎷栨嫿 + //鐩告満浣嶇疆涓庤瀵熺洰鏍囩偣鏈�灏忓�� + controls.minDistance = 650; + //鐩告満浣嶇疆涓庤瀵熺洰鏍囩偣鏈�澶у�� + controls.maxDistance = 900; + camera.position.set(...CAMERA_POS); controls.update(); @@ -1135,10 +1203,11 @@ } .rect-item2 { - width: 49.88rem; + width: 65rem; height: 15.38rem; border: 0.1rem solid #02cde6; padding: 0.69rem 1.44rem; + position: relative; .el-table :deep(.el-table__header th) { border: solid 1px #1ac0f6; @@ -1146,8 +1215,9 @@ } .consten { - position: relative; - top: 0; + width: 100%; + position: absolute; + top: 10rem; z-index: 999; } } diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/views/tts/UserManagement/Usermanagement.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/views/tts/UserManagement/Usermanagement.vue" index c6acb24..239ce0f 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/views/tts/UserManagement/Usermanagement.vue" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/client/src/views/tts/UserManagement/Usermanagement.vue" @@ -425,11 +425,11 @@ size="small" > <el-option - :disabled="item.value == 20" + :disabled="item.roleId == 1" v-for="item in groupOptions" - :key="item.value" - :label="item.label" - :value="item.value" + :key="item.roleId" + :label="item.roleName" + :value="item.roleId" /> </el-select> </el-form-item> @@ -811,17 +811,11 @@ { value: 1, label: "鏄�" }, ]); //鍒嗙粍 -const groupOptions = ref([ - { value: 20, label: "瓒呯骇绠$悊鍛�" }, - { value: 21, label: "璐ㄦ缁�" }, - { value: 22, label: "鐢垫皵缁�" }, - { value: 23, label: "鏈烘缁�" }, - { value: 24, label: "鍦版矡缁�" }, -]); +const groupOptions = ref([]); const formUser = ref({ user_Id: undefined, userName: "", - role_Id: 21, + role_Id: 2, roleName: "", phoneNo: "", remark: "", @@ -988,6 +982,7 @@ tableData.value = res.rows; pageTotal.value = res.total; }); + getRole(); }; //鍒嗛〉璇锋眰鍙傛暟 const pageQuery = ref({ @@ -1258,6 +1253,7 @@ GetPageDataApi({ ...pageQuery.value, filter }).then((res) => { grideData.value = res.rows; pageTotal.value = res.total; + groupOptions.value = res.rows; }); }; //鎵撳嵃鏁版嵁 -- Gitblit v1.9.3