Commit fcb39f25 by 李宁

1

1 parent 488d0d0d
{
"permissions": {
"allow": [
"Bash(node:*)",
"Bash(python3:*)"
],
"deny": [],
"ask": []
}
}
\ No newline at end of file \ No newline at end of file
...@@ -87,6 +87,6 @@ ...@@ -87,6 +87,6 @@
<script src="js/vue.min.js"></script> <script src="js/vue.min.js"></script>
<script src="js/vant.min.js"></script> <script src="js/vant.min.js"></script>
<script src="js/util.js?12312313"></script> <script src="js/util.js?12312313"></script>
<script src="js/addOrder.js?00"></script> <script src="js/addOrder.js?1111"></script>
</body> </body>
</html> </html>
\ No newline at end of file \ No newline at end of file
...@@ -120,20 +120,18 @@ div{ ...@@ -120,20 +120,18 @@ div{
background: #fff; background: #fff;
border-radius: .08rem; border-radius: .08rem;
background: #FFF; background: #FFF;
padding: 0 .32rem; padding: .4rem .32rem;
margin-bottom: .2rem; margin-bottom: .2rem;
} }
.infoDiv .infoTop .detail{ .infoDiv .infoTop .detliU{
margin-top: .4rem; color: #333;
padding-top: .32rem; font-size: .4rem;
padding-bottom: .12rem; font-weight: 600;
border-top: 1px solid #F6F6F6; margin-bottom: .2rem;
} }
.infoDiv .infoTop .detail .detli{ .infoDiv .infoTop .detli{
display: flex;
color: #333; color: #333;
font-size: .32rem; font-size: .32rem;
margin-bottom: .28rem;
} }
.orderList .orderli{ .orderList .orderli{
......
...@@ -49,18 +49,18 @@ div{ ...@@ -49,18 +49,18 @@ div{
} }
.tab-item { .tab-item {
padding: .28rem .3rem; padding: .28rem 0;
font-size: .36rem; font-size: .36rem;
color: #333; color: #666;
cursor: pointer; cursor: pointer;
position: relative; position: relative;
margin-right: .4rem; margin-right: .48rem;
transition: all 0.3s; transition: all 0.3s;
font-weight: 500; font-weight: 500;
} }
.tab-item.active { .tab-item.active {
color: #007bff; color: #333;
font-weight: 700; font-weight: 700;
} }
...@@ -75,10 +75,6 @@ div{ ...@@ -75,10 +75,6 @@ div{
background-color: #007bff; background-color: #007bff;
} }
.tab-item:hover {
color: #007bff;
}
.search-section { .search-section {
padding: .2rem; padding: .2rem;
background: #F3F6FF; background: #F3F6FF;
...@@ -89,7 +85,6 @@ div{ ...@@ -89,7 +85,6 @@ div{
display: flex; display: flex;
align-items: center; align-items: center;
background: white; background: white;
border: 1px solid #ddd;
border-radius: .08rem; border-radius: .08rem;
padding: .2rem .24rem; padding: .2rem .24rem;
transition: border-color 0.3s; transition: border-color 0.3s;
...@@ -123,44 +118,98 @@ div{ ...@@ -123,44 +118,98 @@ div{
.list-section { .list-section {
flex: 1; flex: 1;
overflow-y: auto; overflow-y: auto;
padding: .24rem; padding: 0;
position: relative;
border-top: none;
} }
.list-item { .pull-refresh {
height: 0;
overflow: hidden;
transition: height 0.3s ease, opacity 0.3s ease;
display: flex; display: flex;
align-items: flex-start; flex-direction: column;
padding: .36rem .24rem; align-items: center;
background: white; justify-content: center;
border-radius: .16rem; color: #333;
margin-bottom: .2rem; border-radius: 0 0 .16rem .16rem;
background: #F7F8FA;
opacity: 0;
} }
.item-content { .pull-refresh.pulling {
flex: 1; height: 1.2rem;
min-width: 0; opacity: 1;
} }
.item-row { .pull-refresh.refreshing {
display: flex; height: 1.2rem;
align-items: center; opacity: 1;
margin-bottom: .26rem;
} }
.item-row:last-child { .pull-refresh-icon {
margin-bottom: 0; margin-bottom: .1rem;
} }
.item-icon-small { .refresh-spinner {
width: .32rem; width: .48rem;
height: .32rem; height: .48rem;
margin-right: .16rem; border: 3px solid rgba(255, 255, 255, 0.3);
flex-shrink: 0; border-top: 3px solid white;
border-radius: 50%;
animation: spin 1s linear infinite;
} }
.item-desc { .pull-refresh.refreshing .refresh-spinner {
font-size: .28rem; animation: spin 1s linear infinite;
}
.pull-refresh.pulling .refresh-spinner {
animation: none;
/* border-top-color: rgba(255, 255, 255, 0.7); */
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
@keyframes fadeOut {
from { opacity: 1; }
to { opacity: 0; }
}
.pull-refresh-text {
font-size: .24rem;
color: #333;
font-weight: 500;
}
.list-content {
padding: .24rem;
}
.list-item {
padding: .36rem .4rem;
background: white;
border-radius: .16rem;
margin-bottom: .2rem;
}
.item-row-up {
color: #333; color: #333;
line-height: .4rem; font-weight: 600;
font-size: .36rem;
margin-bottom: .28rem;
}
.item-row-down {
color: #666;
font-size: .28rem;
} }
.empty-state { .empty-state {
......
...@@ -63,7 +63,7 @@ div{ ...@@ -63,7 +63,7 @@ div{
margin: .28rem 0; margin: .28rem 0;
} }
.header-content .name{ .header-content .name{
font-weight: 500; font-weight: bold;
} }
.login-form { .login-form {
...@@ -79,7 +79,6 @@ div{ ...@@ -79,7 +79,6 @@ div{
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: .48rem; margin-bottom: .48rem;
border: 1px solid #ddd;
border-radius: .16rem; border-radius: .16rem;
height: .96rem;; height: .96rem;;
background: #f9f9f9; background: #f9f9f9;
...@@ -87,10 +86,6 @@ div{ ...@@ -87,10 +86,6 @@ div{
font-size: .32rem; font-size: .32rem;
} }
.input-group:focus-within {
border-color: #007bff;
}
.input-icon { .input-icon {
width: .4rem; width: .4rem;
height: .4rem; height: .4rem;
...@@ -111,9 +106,10 @@ div{ ...@@ -111,9 +106,10 @@ div{
} }
.verify-btn { .verify-btn {
color: #007bff; color: #0068EE;
font-size: .32rem; font-size: .32rem;
margin-right: .4rem; margin-right: .4rem;
flex-shrink: 0;
} }
.verify-btn:disabled { .verify-btn:disabled {
...@@ -121,7 +117,7 @@ div{ ...@@ -121,7 +117,7 @@ div{
cursor: not-allowed; cursor: not-allowed;
} }
.login-btn { /* .login-btn {
background: #007bff; background: #007bff;
color: white; color: white;
border: none; border: none;
...@@ -131,9 +127,31 @@ div{ ...@@ -131,9 +127,31 @@ div{
font-weight: bold; font-weight: bold;
cursor: pointer; cursor: pointer;
margin-top: .48rem; margin-top: .48rem;
transition: background-color 0.3s; text-align: center;
} }
.login-btn:hover { .login-btn:active,
background: #0056b3; .login-btn:focus {
background: #007bff;
color: white;
outline: none;
box-shadow: none;
} */
.login-btn {
background: #007bff;
color: white;
border: none;
padding: .32rem;
border-radius: .16rem;
font-size: .32rem;
font-weight: bold;
cursor: pointer;
margin-top: .48rem;
text-align: center;
outline: none !important;
box-shadow: none !important;
-webkit-tap-highlight-color: transparent;
-webkit-box-shadow: none !important;
-moz-box-shadow: none !important;
} }
\ No newline at end of file \ No newline at end of file
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>怀化移动</title> <title>怀化移动</title>
<link rel="stylesheet" href="https://xpo.oss-cn-beijing.aliyuncs.com/huaian/css/vant.css"/> <link rel="stylesheet" href="https://xpo.oss-cn-beijing.aliyuncs.com/huaian/css/vant.css"/>
<link rel="stylesheet" href="css/index.css?90909090"> <link rel="stylesheet" href="css/index.css?12333">
</head> </head>
<body> <body>
<!-- <script> <!-- <script>
...@@ -39,10 +39,8 @@ ...@@ -39,10 +39,8 @@
<div class="infoDiv"> <div class="infoDiv">
<div class="infoTop"> <div class="infoTop">
<div class="detail"> <div class="detliU">{{detail.accNbr}}</div>
<div class="detli">{{detail.accNbr}}</div> <div class="detli">地址:{{detail.addressName||'--'}}</div>
<div class="detli">地址:{{detail.addressName||'--'}}</div>
</div>
</div> </div>
<div class="orderList"> <div class="orderList">
...@@ -69,11 +67,11 @@ ...@@ -69,11 +67,11 @@
</div> </div>
<div class="infoTs" v-if="detail.finish!='1'"> <div class="infoTs" v-if="detail.finish!='1'">
<div class="infoLi" v-if="appParam.processType!='complaint'"> <div class="infoLi" v-if="detail.processType=='1'">
<div>工单未同步?查看</div> <div>工单未同步?查看</div>
<div class="blue" @click="orderError">解决办法</div> <div class="blue" @click="orderError">解决办法</div>
</div> </div>
<div v-if="appParam.processType!='complaint'"></div> <div v-if="detail.processType=='1'"></div>
<div class="infoLi"> <div class="infoLi">
<div>无法质检?</div> <div>无法质检?</div>
<div class="blue" @click="feedback">我要反馈</div> <div class="blue" @click="feedback">我要反馈</div>
...@@ -169,6 +167,6 @@ ...@@ -169,6 +167,6 @@
<script src="js/vue.min.js"></script> <script src="js/vue.min.js"></script>
<script src="js/vant.min.js"></script> <script src="js/vant.min.js"></script>
<script src="js/util.js?11111"></script> <script src="js/util.js?11111"></script>
<script src="js/index.js?1255333"></script> <script src="js/index.js?123"></script>
</body> </body>
</html> </html>
\ No newline at end of file \ No newline at end of file
...@@ -68,10 +68,6 @@ ...@@ -68,10 +68,6 @@
util.toast('请输入工单'+(i+1)+'的工单ID') util.toast('请输入工单'+(i+1)+'的工单ID')
return return
} }
if(p.orderCode.length<=21 || !/^[A-Za-z0-9_]+$/.test(p.orderCode) || !/\d/.test(p.orderCode) || !/_/.test(p.orderCode)){
util.toast('工单ID错误,请复制后直接在此处粘贴')
return
}
if(!p.serviceName){ if(!p.serviceName){
util.toast('请选择工单'+(i+1)+'的工单类型') util.toast('请选择工单'+(i+1)+'的工单类型')
return return
......
...@@ -21,7 +21,7 @@ if(window.location.origin.includes('hazj.lgyzpt.com')){ ...@@ -21,7 +21,7 @@ if(window.location.origin.includes('hazj.lgyzpt.com')){
let param = JSON.parse(sessionStorage.getItem('huaiAnAppParam')||'{}') let param = JSON.parse(sessionStorage.getItem('huaiAnAppParam')||'{}')
var applyId = param.applyId var applyId = param.applyId
if(param.processType == 'complaint'){ if(param.processType == '2'){
$("#beginTs").html('拍摄着装环节时,请手持工牌,并将工服上的logo置于屏幕中央,如图所示:') $("#beginTs").html('拍摄着装环节时,请手持工牌,并将工服上的logo置于屏幕中央,如图所示:')
$("#beginImg").attr('src', 'https://xpo.oss-cn-beijing.aliyuncs.com/huaian/gongfu.png') $("#beginImg").attr('src', 'https://xpo.oss-cn-beijing.aliyuncs.com/huaian/gongfu.png')
$("#beginImg").css('width','70%') $("#beginImg").css('width','70%')
......
...@@ -9,7 +9,15 @@ new Vue({ ...@@ -9,7 +9,15 @@ new Vue({
searchQuery: '', searchQuery: '',
todoData: [], todoData: [],
completedData: [] completedData: [],
// 下拉刷新相关
isRefreshing: false,
isPulling: false,
refreshText: '下拉刷新',
startY: 0,
currentY: 0,
pullDistance: 0
}, },
computed: { computed: {
currentData() { currentData() {
...@@ -41,20 +49,21 @@ new Vue({ ...@@ -41,20 +49,21 @@ new Vue({
}, },
handleItemClick(item) { handleItemClick(item) {
this.savePageState(item);
sessionStorage.removeItem('huaiAnAppParam') sessionStorage.removeItem('huaiAnAppParam')
sessionStorage.setItem('listInfoParam',JSON.stringify(item)) sessionStorage.setItem('listInfoParam',JSON.stringify(item))
window.location.href = 'index.html' window.location.href = 'index.html'
}, },
queryList(){ queryList(){
if(this.activeTab==='tab1' && this.todoData.length>0){ if(this.activeTab==='tab1' && this.todoData.length>0 && !this.isRefreshing){
return return Promise.resolve()
} }
if(this.activeTab==='tab2' && this.completedData.length>0){ if(this.activeTab==='tab2' && this.completedData.length>0 && !this.isRefreshing){
return return Promise.resolve()
} }
util.httpRequest({ return util.httpRequest({
url: '/zj/'+(this.activeTab==='tab1'?'pending':'completed'), url: '/zj/'+(this.activeTab==='tab1'?'pending':'completed'),
middleUrl: '/zhijian-trial/api', middleUrl: '/zhijian-trial/api',
data: { data: {
...@@ -64,28 +73,176 @@ new Vue({ ...@@ -64,28 +73,176 @@ new Vue({
}).then(res=>{ }).then(res=>{
if(res.code == 200){ if(res.code == 200){
if(this.activeTab==='tab1'){ if(this.activeTab==='tab1'){
let arr = res.data.records || [] this.todoData = res.data.records || []
let tArr = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]
tArr.forEach(item=>{
arr.push({
accNbr: 'testAccount'+item,
fullAddress: 'test地址'+item,
})
})
this.todoData = arr
} }
if(this.activeTab==='tab2'){ if(this.activeTab==='tab2'){
this.completedData = res.data.records || [] this.completedData = res.data.records || []
} }
this.$nextTick(() => {
const savedState = sessionStorage.getItem('listPageState');
sessionStorage.removeItem('listPageState');
if (savedState) {
const pageState = JSON.parse(savedState);
this.searchQuery = pageState.searchQuery || '';
setTimeout(() => {
this.scrollToSelected(pageState.selectedItemId);
}, 300);
}
});
}else if(res.code == 401){
util.toast('登录已过期,请重新登录')
setTimeout(()=>{
localStorage.removeItem('appLoginInfo');
window.location.replace('login.html');
},100)
}else{ }else{
util.toast(res.msg || '获取失败') util.toast(res.msg || '获取失败')
return Promise.reject(res.msg || '获取失败')
} }
}) })
}, },
savePageState(item) {
const pageState = {
searchQuery: this.searchQuery,
activeTab: this.activeTab,
selectedItemId: item.accNbr
};
sessionStorage.setItem('listPageState', JSON.stringify(pageState));
},
restorePageState() {
const savedState = sessionStorage.getItem('listPageState');
if (savedState) {
const pageState = JSON.parse(savedState);
this.activeTab = pageState.activeTab || 'tab1';
}
},
scrollToSelected(itemId) {
if (!itemId) return;
const elementRef = this.$refs['item-' + itemId];
if (elementRef && elementRef[0]) {
elementRef[0].scrollIntoView({
behavior: 'smooth',
block: 'center'
});
}
},
clearPageState() {
//sessionStorage.removeItem('listPageState');
},
// 下拉刷新相关方法
handleTouchStart(e) {
if (this.isRefreshing) return;
this.startY = e.touches[0].clientY;
const listSection = this.$refs.listSection;
if (listSection.scrollTop === 0) {
this.isPulling = true;
}
},
handleTouchMove(e) {
if (!this.isPulling || this.isRefreshing) return;
this.currentY = e.touches[0].clientY;
this.pullDistance = this.currentY - this.startY;
if (this.pullDistance > 0 && this.pullDistance <= 120) {
e.preventDefault();
const pullRefresh = this.$refs.pullRefresh;
const height = Math.min(this.pullDistance * 0.5, 60);
const opacity = Math.min(height / 60, 1);
pullRefresh.style.height = height + 'px';
pullRefresh.style.opacity = opacity;
if (this.pullDistance > 80) {
this.refreshText = '释放立即刷新';
} else {
this.refreshText = '下拉刷新';
}
}
},
handleTouchEnd(e) {
if (!this.isPulling || this.isRefreshing) return;
if (this.pullDistance > 80) {
this.triggerRefresh();
} else {
const pullRefresh = this.$refs.pullRefresh;
pullRefresh.style.transition = 'height 0.3s ease, opacity 0.3s ease';
this.resetPullRefresh();
}
this.isPulling = false;
this.pullDistance = 0;
},
triggerRefresh() {
this.isRefreshing = true;
this.refreshText = '正在刷新...';
this.queryList().then(() => {
setTimeout(() => {
this.resetPullRefresh();
this.isRefreshing = false;
this.refreshText = '刷新完成';
setTimeout(() => {
this.refreshText = '下拉刷新';
}, 1000);
}, 500);
}).catch(() => {
setTimeout(() => {
this.resetPullRefresh();
this.isRefreshing = false;
this.refreshText = '刷新失败';
setTimeout(() => {
this.refreshText = '下拉刷新';
}, 1000);
}, 200);
});
},
resetPullRefresh() {
const pullRefresh = this.$refs.pullRefresh;
pullRefresh.style.transition = 'height 0.3s ease, opacity 0.3s ease';
pullRefresh.style.height = '0';
pullRefresh.style.opacity = '0';
},
addPullRefreshListeners() {
const listSection = this.$refs.listSection;
if (listSection) {
listSection.addEventListener('touchstart', this.handleTouchStart, { passive: true });
listSection.addEventListener('touchmove', this.handleTouchMove, { passive: false });
listSection.addEventListener('touchend', this.handleTouchEnd, { passive: true });
}
},
removePullRefreshListeners() {
const listSection = this.$refs.listSection;
if (listSection) {
listSection.removeEventListener('touchstart', this.handleTouchStart);
listSection.removeEventListener('touchmove', this.handleTouchMove);
listSection.removeEventListener('touchend', this.handleTouchEnd);
}
}
}, },
mounted() { mounted() {
this.queryList() this.restorePageState();
} this.queryList();
// 添加下拉刷新事件监听
this.addPullRefreshListeners();
window.addEventListener('beforeunload', this.clearPageState);
},
beforeDestroy() {
// 移除下拉刷新事件监听
this.removePullRefreshListeners();
window.removeEventListener('beforeunload', this.clearPageState);
},
}); });
\ No newline at end of file \ No newline at end of file
...@@ -10,10 +10,16 @@ new Vue({ ...@@ -10,10 +10,16 @@ new Vue({
}, },
countdown: 0, countdown: 0,
countdownTimer: null, countdownTimer: null,
isLoggedIn: true isLoggedIn: true,
clickFlag: false
}, },
methods: { methods: {
getVerifyCode() { getVerifyCode() {
if(this.clickFlag){
return
}
this.clickFlag = true
let pa = this.loginForm let pa = this.loginForm
if (!pa.phoneNumber) { if (!pa.phoneNumber) {
...@@ -26,15 +32,6 @@ new Vue({ ...@@ -26,15 +32,6 @@ new Vue({
return; return;
} }
// 开始倒计时
this.countdown = 60;
this.countdownTimer = setInterval(() => {
this.countdown--;
if (this.countdown <= 0) {
clearInterval(this.countdownTimer);
}
}, 1000);
util.httpRequest({ util.httpRequest({
url: '/mobile/sendSms', url: '/mobile/sendSms',
middleUrl: '/zhijian-trial/api', middleUrl: '/zhijian-trial/api',
...@@ -45,7 +42,19 @@ new Vue({ ...@@ -45,7 +42,19 @@ new Vue({
}).then(res=>{ }).then(res=>{
if(res.code == 200){ if(res.code == 200){
util.toast('验证码已发送,请注意查收') util.toast('验证码已发送,请注意查收')
// 开始倒计时
let __this = this
this.countdown = 60;
this.countdownTimer = setInterval(() => {
this.countdown--;
if (this.countdown <= 0) {
clearInterval(this.countdownTimer);
__this.clickFlag = false
}
}, 1000);
}else{ }else{
this.clickFlag = false
util.toast(res.msg || '获取失败') util.toast(res.msg || '获取失败')
} }
}) })
......
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
return new Promise(function(resolve, reject){ return new Promise(function(resolve, reject){
axios ({ axios ({
method: 'post', method: 'post',
url:origin + middle + param.url, url: origin + middle + param.url,
timeout: param.time||15000, timeout: param.time||15000,
data:param.data, data:param.data,
headers: { headers: {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>列表页面</title> <title>列表页面</title>
<link rel="stylesheet" href="css/list.css"> <link rel="stylesheet" href="css/list.css?12322222223">
</head> </head>
<body> <body>
<div id="app" v-cloak> <div id="app" v-cloak>
...@@ -29,23 +29,22 @@ ...@@ -29,23 +29,22 @@
</div> </div>
</div> </div>
<div class="list-section"> <div class="list-section" ref="listSection">
<div class="pull-refresh" :class="{ 'refreshing': isRefreshing, 'pulling': isPulling }" ref="pullRefresh">
<div class="pull-refresh-icon">
<div class="refresh-spinner"></div>
</div>
<div class="pull-refresh-text">{{ refreshText }}</div>
</div>
<div class="list-content"> <div class="list-content">
<div <div
v-for="item in filteredData" v-for="item in filteredData"
:key="item.id" :key="item.accNbr"
class="list-item" class="list-item"
:ref="'item-' + item.accNbr"
@click="handleItemClick(item)"> @click="handleItemClick(item)">
<div class="item-content"> <div class="item-row-up">业务账号:{{ item.accNbr }}</div>
<div class="item-row"> <div class="item-row-down">地址:{{ item.fullAddress || '--' }}</div>
<!-- <img src="img/6.png" alt="账号图标" class="item-icon-small"> -->
<div class="item-desc">业务账号:{{ item.accNbr }}</div>
</div>
<div class="item-row">
<!-- <img src="img/5.png" alt="地址图标" class="item-icon-small"> -->
<div class="item-desc">地址:{{ item.fullAddress || '--' }}</div>
</div>
</div>
</div> </div>
<div v-if="filteredData.length === 0" class="empty-state"> <div v-if="filteredData.length === 0" class="empty-state">
...@@ -59,6 +58,6 @@ ...@@ -59,6 +58,6 @@
<script src="js/axios.min.js"></script> <script src="js/axios.min.js"></script>
<script src="js/vue.min.js"></script> <script src="js/vue.min.js"></script>
<script src="js/util.js"></script> <script src="js/util.js"></script>
<script src="js/list.js?1231234"></script> <script src="js/list.js?0933"></script>
</body> </body>
</html> </html>
\ No newline at end of file \ No newline at end of file
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>登录页面</title> <title>登录页面</title>
<link rel="stylesheet" href="css/login.css"> <link rel="stylesheet" href="css/login.css?3231002202">
</head> </head>
<body> <body>
<div id="app" v-cloak> <div id="app" v-cloak>
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<div class="header-content"> <div class="header-content">
<img src="img/logo.png" alt="Logo" class="logo"> <img src="img/logo.png" alt="Logo" class="logo">
<img src="img/hello.png" alt="Logo" class="hello"> <img src="img/hello.png" alt="Logo" class="hello">
<div class="name">欢迎登陆和家智“险”</div> <div class="name">欢迎登录和家智检</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -41,20 +41,22 @@ ...@@ -41,20 +41,22 @@
> >
</div> </div>
<div class="input-group"> <div class="input-group" style="justify-content: space-between;">
<img src="img/3.png" alt="验证码图标" class="input-icon"> <div style="display: flex; align-items: center;">
<input <img src="img/3.png" alt="验证码图标" class="input-icon">
type="text" <input
v-model="loginForm.verifyCode" type="text"
placeholder="请输入验证码" v-model="loginForm.verifyCode"
class="input-field" placeholder="请输入验证码"
> style="width: 2rem;"
<div class="verify-btn" @click="getVerifyCode">{{ countdown > 0 ? countdown + 's' : '获取验证码' }}</div> class="input-field">
</div>
<div class="verify-btn" @click="getVerifyCode">{{ countdown > 0 ? ('重新发送('+countdown + 's)') : '获取验证码' }}</div>
</button> </button>
</div> </div>
<button @click="login" class="login-btn">登录</button> <div @click="login" class="login-btn">登录</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -62,6 +64,6 @@ ...@@ -62,6 +64,6 @@
<script src="js/axios.min.js"></script> <script src="js/axios.min.js"></script>
<script src="js/vue.min.js"></script> <script src="js/vue.min.js"></script>
<script src="js/util.js"></script> <script src="js/util.js"></script>
<script src="js/login.js?123123"></script> <script src="js/login.js?1239123"></script>
</body> </body>
</html> </html>
\ No newline at end of file \ No newline at end of file
{ {
"permissions": { "permissions": {
"allow": [ "allow": [
"Bash(npm run build)" "Bash(npm run build)",
"Read(//Users/lining/Desktop/xsdCode/Activity/huaiHua/app/**)",
"Read(//Users/lining/Desktop/xsdCode/Activity/huaiHua/**)"
], ],
"deny": [], "deny": [],
"ask": [] "ask": []
......
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
<link rel="icon" href="/favicon.ico" /> <link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>视频质检系统</title> <title>视频质检系统</title>
<script type="module" crossorigin src="./assets/index-CYtkjjYo.js"></script> <script type="module" crossorigin src="./assets/index-Daub8TpA.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-CHzOEySi.css"> <link rel="stylesheet" crossorigin href="./assets/index-DQb40jF1.css">
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>
......
...@@ -83,6 +83,7 @@ const logout = async () => { ...@@ -83,6 +83,7 @@ const logout = async () => {
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
color: #2c3e50; color: #2c3e50;
min-width: 1400px;
} }
.el-header { .el-header {
......
...@@ -85,6 +85,7 @@ import { ref, reactive } from 'vue' ...@@ -85,6 +85,7 @@ import { ref, reactive } from 'vue'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { ElMessage, ElMessageBox } from 'element-plus' import { ElMessage, ElMessageBox } from 'element-plus'
import { login , queryCode} from '../utils/api' import { login , queryCode} from '../utils/api'
import suoImg from '../assets/suo.png'
const router = useRouter() const router = useRouter()
const loginFormRef = ref() const loginFormRef = ref()
...@@ -170,7 +171,7 @@ const handleForgetPassword = () => { ...@@ -170,7 +171,7 @@ const handleForgetPassword = () => {
ElMessageBox.alert(` ElMessageBox.alert(`
<div style="text-align: center; padding: 20px;"> <div style="text-align: center; padding: 20px;">
<div style="margin-bottom: 15px;"> <div style="margin-bottom: 15px;">
<img src="/src/assets/suo.png" alt="锁" style="width: 64px; height: 64px;"> <img src="${suoImg}" alt="锁" style="width: 64px; height: 64px;">
</div> </div>
<div style="color: #333; font-size: 16px; font-weight: 500; margin-bottom: 10px;"> <div style="color: #333; font-size: 16px; font-weight: 500; margin-bottom: 10px;">
忘记密码 忘记密码
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
<el-option label="已完成" value="1"></el-option> <el-option label="已完成" value="1"></el-option>
</el-select> </el-select>
</el-col> </el-col>
<el-col :span="3" style="text-align: right;"> <el-col :span="4" style="text-align: right;">
<el-button type="primary" @click="handleFilter">查询</el-button> <el-button type="primary" @click="handleFilter">查询</el-button>
<el-button @click="resetFilter">重置</el-button> <el-button @click="resetFilter">重置</el-button>
</el-col> </el-col>
......
...@@ -16,11 +16,18 @@ ...@@ -16,11 +16,18 @@
:before-upload="beforeUpload" :before-upload="beforeUpload"
accept=".csv,.xlsx,.xls" accept=".csv,.xlsx,.xls"
:show-file-list="false" :show-file-list="false"
:disabled="uploading"
> >
<el-icon class="el-icon--upload"><upload-filled /></el-icon> <div v-if="uploading" class="uploading-overlay">
<div class="el-upload__text"> <el-icon class="is-loading"><loading /></el-icon>
将文件拖到此处,或<em>点击上传</em> <div class="uploading-text">上传中...</div>
</div> </div>
<template v-else>
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
<div class="el-upload__text">
将文件拖到此处,或<em>点击上传</em>
</div>
</template>
<template #tip> <template #tip>
<div class="el-upload__tip"> <div class="el-upload__tip">
请上传CSV或Excel文件,且不超过10MB 请上传CSV或Excel文件,且不超过10MB
...@@ -94,12 +101,16 @@ ...@@ -94,12 +101,16 @@
<script setup> <script setup>
import { ref, reactive } from 'vue' import { ref, reactive } from 'vue'
import { useRouter } from 'vue-router'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import { Warning, SuccessFilled } from '@element-plus/icons-vue' import { Warning, SuccessFilled, Loading, UploadFilled } from '@element-plus/icons-vue'
import { submitWorkOrders, uploadOrderFile } from '../utils/api' import { submitWorkOrders, uploadOrderFile } from '../utils/api'
const router = useRouter()
const tableData = ref([]) const tableData = ref([])
const originalTableData = ref([]) // 保存原始数据的副本 const originalTableData = ref([]) // 保存原始数据的副本
const uploading = ref(false) // 上传状态
const filterForm = reactive({ const filterForm = reactive({
accNbr: '', accNbr: '',
campaignIdStr: '' campaignIdStr: ''
...@@ -127,6 +138,8 @@ const handleFileChange = async (file) => { ...@@ -127,6 +138,8 @@ const handleFileChange = async (file) => {
return return
} }
uploading.value = true // 开始上传
try { try {
// 使用自定义的uploadOrderFile接口上传文件 // 使用自定义的uploadOrderFile接口上传文件
const response = await uploadOrderFile(file.raw) const response = await uploadOrderFile(file.raw)
...@@ -143,6 +156,8 @@ const handleFileChange = async (file) => { ...@@ -143,6 +156,8 @@ const handleFileChange = async (file) => {
} catch (error) { } catch (error) {
ElMessage.error('文件上传失败: ' + error.message) ElMessage.error('文件上传失败: ' + error.message)
console.error('Upload error:', error) console.error('Upload error:', error)
} finally {
uploading.value = false // 上传结束
} }
} }
...@@ -218,6 +233,10 @@ const submitData = async () => { ...@@ -218,6 +233,10 @@ const submitData = async () => {
// 清空表格数据 // 清空表格数据
tableData.value = [] tableData.value = []
originalTableData.value = [] originalTableData.value = []
// 延迟跳转到质检信息列表页面
setTimeout(() => {
router.push('/quality-list')
}, 1500)
} else { } else {
ElMessage.error(response.msg || '数据提交失败') ElMessage.error(response.msg || '数据提交失败')
} }
...@@ -296,6 +315,29 @@ const handleDownloadTemplate = async () => { ...@@ -296,6 +315,29 @@ const handleDownloadTemplate = async () => {
text-decoration: underline; text-decoration: underline;
} }
/* 上传中的遮罩层样式 */
.uploading-overlay {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 40px;
background-color: rgba(255, 255, 255, 0.9);
border-radius: 6px;
}
.uploading-overlay .el-icon {
font-size: 32px;
color: #409eff;
margin-bottom: 16px;
}
.uploading-text {
font-size: 16px;
color: #409eff;
font-weight: 500;
}
/* 抖动动画效果 */ /* 抖动动画效果 */
@keyframes shake { @keyframes shake {
0%, 100% { transform: translateX(0); } 0%, 100% { transform: translateX(0); }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!