wenhongquan 3 年之前
父節點
當前提交
3ccb3b6314
共有 4 個文件被更改,包括 17 次插入5 次删除
  1. 1 1
      .env.production
  2. 1 1
      .env.staging
  3. 14 2
      src/views/task/list/index.vue
  4. 1 1
      vite.config.js

+ 1 - 1
.env.production

@@ -5,4 +5,4 @@ VITE_APP_TITLE = 南宁北排管理系统
 ENV = 'production'
 
 # 若依管理系统/生产环境
-VITE_APP_BASE_API = 'http://nnbpbg.xt.wenhq.top:8083'
+VITE_APP_BASE_API = '/api'

+ 1 - 1
.env.staging

@@ -7,4 +7,4 @@ NODE_ENV = production
 ENV = 'staging'
 
 # 若依管理系统/测试环境
-VITE_APP_BASE_API = 'http://nnbpbg.xt.wenhq.top:8083'
+VITE_APP_BASE_API = '/api'

+ 14 - 2
src/views/task/list/index.vue

@@ -76,6 +76,11 @@
               <el-form-item>
                 <el-button type="primary" @click="getList">查询</el-button>
               </el-form-item>
+               <el-form-item v-if="route.params.status==6">
+              <el-button  type="primary" @click="exportexcel2(queryparameters)"
+                >导出成本记录
+              </el-button>
+              </el-form-item>
               <el-form-item>
                 <el-button type="success" @click="addtask">新增</el-button>
               </el-form-item>
@@ -120,7 +125,7 @@
           <el-table-column prop="taskAddrRoad" label="道路名" />
           <el-table-column prop="taskContent" label="任务内容" />
           <el-table-column prop="taskTime" label="来件时间" />
-           <el-table-column prop="taskTime" label="剩余时间" >
+           <el-table-column prop="taskTime" label="剩余时间" v-if="currentstatus!=6">
               <template #default="scope"><div>
                 <div v-if="scope.row.taskReqCompleteTime!=null && scope.row.status<5" :class="moment(scope.row.taskReqCompleteTime).diff(moment(),'days')<2?'tip-e':(moment(scope.row.taskReqCompleteTime).diff(moment(),'days')<3?'tip-w':(moment(scope.row.taskReqCompleteTime).diff(moment(),'days')>5?'tip-i':''))">
                    <el-icon style="vertical-align: middle;"><Clock /></el-icon> <span> {{ moment(scope.row.taskReqCompleteTime).diff(moment(),'days')}}天</span>
@@ -133,7 +138,7 @@
                 </div>
               </template>
            </el-table-column>
-          <el-table-column prop="address" label="操作">
+          <el-table-column prop="address" label="操作" :width="currentstatus==6?'400px':''">
             <template #default="scope">
               <el-button text size="small" @click.stop="edittask(scope.row)"
                 >修改
@@ -149,6 +154,7 @@
               <el-button v-if="scope.row.status==6" text size="small" @click.stop="exportexcel1(scope.row)"
                 >导出热线照片
               </el-button>
+
             </template>
           </el-table-column>
         </el-table>
@@ -385,6 +391,12 @@ const exportexcel1 = (row) => {
   }, `${row.taskCode}热线照片.xlsx`);
 
 }
+const exportexcel2 = (row) => {
+  proxy.download("system/task/export2", {
+    ...{ "taskId": row.taskId},
+  }, `${row.taskCode}成本记录.xlsx`);
+
+}
 
 
 onMounted(() => {});

+ 1 - 1
vite.config.js

@@ -37,7 +37,7 @@ export default defineConfig(({ mode, command }) => {
             proxy: {
                 // 'http://nnbpbg.xt.wenhq.top:8083'
                 "/dev-api": {
-                    target: "http://localhost:8080/",
+                    target: "http://localhost:8080/api",
                     changeOrigin: true,
                     rewrite: (p) => p.replace(/^\/dev-api/, ""),
                 },