首页新增查看按钮跳转对应页面并携带参数

This commit is contained in:
BianLzhaoMin 2024-04-15 18:03:00 +08:00
parent c83193c9a9
commit f4068ec667
7 changed files with 194 additions and 112 deletions

View File

@ -5,7 +5,7 @@
"author": "机具", "author": "机具",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"dev": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve", "dev": "vue-cli-service serve",
"build": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build", "build": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build",
"build:stage": "vue-cli-service build --mode staging", "build:stage": "vue-cli-service build --mode staging",
"preview": "node build/index.js --preview", "preview": "node build/index.js --preview",

View File

@ -0,0 +1,10 @@
module.exports = {
tabWidth: 4,
semi: false,
vueIndentScriptAndStyle: true,
singleQuote: true,
trailingComma: 'all',
proseWrap: 'never',
htmlWhitespaceSensitivity: 'strict',
endOfLine: 'auto',
}

View File

@ -729,6 +729,17 @@
}) })
}, },
}, },
watch: {
$route: {
handler(to) {
if (to.query.keyWord) {
this.queryParams.keyWord = to.query.keyWord
}
},
deep: true,
immediate: true,
},
},
} }
</script> </script>

View File

@ -568,7 +568,7 @@
getUnitData, getUnitData,
getProData, getProData,
getAgreementInfoById, getAgreementInfoById,
getUseNumByTypeId getUseNumByTypeId,
} from '@/api/claimAndRefund/receive.js' } from '@/api/claimAndRefund/receive.js'
import dialogForm from './dialogForm.vue' import dialogForm from './dialogForm.vue'
import Tree from './tree.vue' import Tree from './tree.vue'
@ -779,7 +779,7 @@
if (valid) { if (valid) {
let backApplyInfo = [] let backApplyInfo = []
for (let i = 0; i < this.loadingList.length; i++) { for (let i = 0; i < this.loadingList.length; i++) {
this.loadingList[i].companyId = this.companyId; this.loadingList[i].companyId = this.companyId
} }
backApplyInfo.push({ backApplyInfo.push({
backPerson: '张三', backPerson: '张三',
@ -882,11 +882,12 @@
getViewByApply(params).then((res) => { getViewByApply(params).then((res) => {
console.log(res) console.log(res)
this.loadingList = res.data.rows this.loadingList = res.data.rows
this.loadingList.forEach(item=>{ this.loadingList.forEach((item) => {
getUseNumByTypeId({ typeId:item.typeId }).then(res=>{ getUseNumByTypeId({ typeId: item.typeId }).then(
(res) => {
item.useNum = res.data item.useNum = res.data
}) },
)
}) })
this.loadingTotal = res.data.total this.loadingTotal = res.data.total
}) })
@ -967,6 +968,17 @@
this.deptOptions = res.data this.deptOptions = res.data
}, },
}, },
watch: {
$route: {
handler(to) {
if (to.query.keyWord) {
this.queryParams.keyWord = to.query.keyWord
}
},
deep: true,
immediate: true,
},
},
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -173,19 +173,22 @@
align="center" align="center"
class-name="small-padding fixed-width" class-name="small-padding fixed-width"
> >
<template slot-scope="scope"> <template slot-scope="{ row }">
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" @click="handlePreview(row.taskTypeId, row.taskCode)"
> </el-button > </el-button
> >
<!-- 代办事件为新购任务时显示催办按钮 -->
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" v-if="row.taskTypeId == 23"
@click="handleUpdate(row.taskTypeId)"
> </el-button > </el-button
> >
<!-- <el-button--> <!-- <el-button-->
@ -316,6 +319,30 @@
}, },
], ],
}, },
/* 列表查看跳转的路由地址 */
previewRouterList: [
/* 新购任务 */
{
taskTypeId: 23,
routerPath: 'store/newBuy/newDevicesList',
},
/* 领料任务 */
{
taskTypeId: 29,
routerPath: 'claimAndRefund/receive/receiveManage',
},
/* 退料任务 */
{
taskTypeId: 36,
routerPath: 'claimAndRefund/return/returnApply',
},
/* 维修任务 */
{
taskTypeId: 41,
routerPath: 'repairTest/repair/repair',
},
],
} }
}, },
created() { created() {
@ -447,6 +474,21 @@
this.$store.dispatch('dict/cleanDict') this.$store.dispatch('dict/cleanDict')
}) })
}, },
/**
* 列表查看操作===========================================================
*/
handlePreview(id, key) {
const [routerInfo] = this.previewRouterList.filter(
(e) => e.taskTypeId == id,
)
this.$router.push({
path: routerInfo.routerPath,
query: {
keyWord: key,
},
})
},
}, },
} }
</script> </script>

View File

@ -672,6 +672,17 @@
) )
}, },
}, },
watch: {
$route: {
handler(to) {
if (to.query.keyWord) {
this.queryParams.keyWord = to.query.keyWord
}
},
deep: true,
immediate: true,
},
},
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -42,11 +42,7 @@ module.exports = {
// target: `https://test-cc.zhgkxt.com`,//线上环境-南网 // target: `https://test-cc.zhgkxt.com`,//线上环境-南网
// target: `https://z.csgmall.com.cn`, // target: `https://z.csgmall.com.cn`,
// target: `http://10.40.92.8:8080`, //超 target: `http://10.40.92.14:8080`, //福
// target: `http://10.40.92.253:8080`,//韩
// target: `http://10.40.92.209:8080`,//川/
target: `http://10.40.92.153:8080`, //帅
// target: `http://10.40.92.14:8080`, //福
//******** 注意事项 ********* */ //******** 注意事项 ********* */
//1.全局替换qrUrl二维码扫码提供的网址-发布服务器的地址; //1.全局替换qrUrl二维码扫码提供的网址-发布服务器的地址;