ソースを参照

优化bannnner上传

lyy 1 年間 前
親
コミット
1121e01c19

+ 1 - 1
src/request/api.js

@@ -211,7 +211,7 @@ export const  apisystemdzbcOrderlist = query => {
     return service({
         url: '/api/system/dzbcOrder/list',
         method: 'GET',
-		data:query
+		params:query
     });
 };
 

+ 7 - 2
src/views/bannerman/index.vue

@@ -94,6 +94,7 @@ let headers={
   Authorization:'Bearer'+` ${Authorization}`,
   clientid:'e5cd7e4891bf95d1d19206ce24a7b32e'
 }
+let uploading=ref(false)
 let fileList=ref([])
 let name=ref('')
 let total=ref(0)
@@ -106,19 +107,23 @@ const tableData = ref([])
 //v-loading="excellloading" @click="downExcell"
 let activeName=ref('first')
 const handleChange=val=>{
-  
+  uploading.value=true
  if(val.response){
   ruleForm.addr=val.response.data.url
+  uploading.value=false
     ElMessage({
           message: '操作成功',
           type: 'success',
           duration: 3 * 1000
     });
   
+ }else{
+
  }
   
 }
 const addItem=data=>{
+  fileList.value=[]
   if(data.id){
     for(let key in data){
       ruleForm[key]=data[key]
@@ -333,7 +338,7 @@ onMounted(()=>{
                 
                 :on-change="handleChange"
                 :file-list="fileList">
-                <el-button size="small" type="primary">点击上传</el-button>
+                <el-button  v-loading="uploading" size="small" type="primary">{{ uploading?'上传中...':(ruleForm.addr?'重新上传':'点击上传') }}</el-button>
                
               </el-upload>
               </el-form-item>

+ 15 - 8
src/views/orderman/index.vue

@@ -1,7 +1,7 @@
 <script setup lang="ts">
 import { apisystemdzbcOrderlist,apisystemdzbcOrderexport,apisystemdzbcOrderDel,apisystemdzbcOrderUpdate } from '../../request/api.js'
 import type { ComponentSize, FormInstance, FormRules } from 'element-plus'
-import { ElMessage } from 'element-plus'
+import { ElMessage, SCOPE } from 'element-plus'
 interface RuleForm {
   id: any,
   name: string,
@@ -220,7 +220,7 @@ onMounted(()=>{
                     <div class="right-part">
                     
                       <el-button :loading="excellloading" @click="downExcell" :icon="Download">{{ excellloading?'正在导出':'导出' }}</el-button>
-                    <el-button :icon="Tools">设置</el-button>
+                    <!-- <el-button :icon="Tools">设置</el-button> -->
                     </div>
                 </div>
                     <el-table element-loading-text='加载中' header-row-class-name="reset-gray-head" :data="tableData"  style="width: 100%" v-loading="loading">
@@ -231,15 +231,16 @@ onMounted(()=>{
                          
                         </el-table-column>
                        
-                        <el-table-column prop="role" label="发车时间">
-                        
-                    </el-table-column>
+                       
                    
                   
                         <el-table-column prop="status" label="支付状态">
-                          <template #default>
-                           <div style="background:#DCFCE7;width:64px;height:20px;border-radius:9999px;display:flex;align-items: center;justify-content: center;">
-                            已支付
+                          <template #default="scope">
+                           <div v-if="scope.row.status==1" style="background:#DCFCE7;width:64px;height:20px;border-radius:9999px;display:flex;align-items: center;justify-content: center;">
+                           已支付
+                           </div>
+                           <div v-else style="background:#f5f5f5;width:64px;height:20px;border-radius:9999px;display:flex;align-items: center;justify-content: center;">
+                           未支付
                            </div>
                           </template>
                         </el-table-column>
@@ -258,6 +259,12 @@ onMounted(()=>{
                             </div>
                           </template>
                         </el-table-column>
+                        <el-table-column prop="price" label="单价">
+                         
+                        </el-table-column>
+                        <el-table-column prop="totalPrice" label="总价">
+                         
+                        </el-table-column>
                         <el-table-column fixed="right" label="操作" min-width="120">
                           <template #default="scope">
                             <el-button link type="primary" @click="addItem(scope.row)" size="small">

+ 13 - 1
src/views/routeman/index.vue

@@ -3,6 +3,7 @@ import { apisystemdzbcArealist,apisystemdzbcPathlist,apisystemdzbcPathexport,api
 import type { ComponentSize, FormInstance, FormRules } from 'element-plus'
 import { ElMessage } from 'element-plus'
 interface RuleForm {
+  costTime:any,
   id: any,
   name: string,
   startArea: any,
@@ -23,6 +24,7 @@ const initData={
 const formSize = ref<ComponentSize>('default')
 const ruleFormRef = ref<FormInstance>()
 const ruleForm = reactive<RuleForm>({
+  costTime:'',
   id:'',
   name: "",
   startArea: "",
@@ -245,7 +247,7 @@ onMounted(()=>{
                     <div class="right-part">
                     
                       <el-button :loading="excellloading" @click="downExcell" :icon="Download">{{ excellloading?'正在导出':'导出' }}</el-button>
-                    <el-button :icon="Tools">设置</el-button>
+                    <!-- <el-button :icon="Tools">设置</el-button> -->
                     </div>
                 </div>
                     <el-table element-loading-text='加载中' header-row-class-name="reset-gray-head" :data="tableData"  style="width: 100%" v-loading="loading">
@@ -259,6 +261,10 @@ onMounted(()=>{
                         <el-table-column prop="mtime" label="出发时间">
                         
                     </el-table-column>
+                    <el-table-column prop="costTime" label="路线花费时间">
+                        
+                      </el-table-column>
+                    
                     <!-- <el-table-column prop="role" label="基础票价(元)">
                         
                     </el-table-column>
@@ -369,6 +375,12 @@ onMounted(()=>{
                 <el-input placeholder="开始时间" v-model="ruleForm.mtime" />
               </el-form-item>
             </el-col>
+            <el-col :span="12">
+              <el-form-item label="路线花费时间">
+                <el-input placeholder="路线花费时间" v-model="ruleForm.costTime" />
+              </el-form-item>
+            </el-col>
+            
            
             <el-col :span="24">
               <el-form-item label="备注">