工具类型管理
This commit is contained in:
parent
22230101e1
commit
68b49753a8
60
src/App.vue
60
src/App.vue
|
|
@ -6,18 +6,18 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import ThemePicker from "@/components/ThemePicker";
|
||||
import { mapActions } from "vuex";
|
||||
import { get } from "@/utils/config";
|
||||
import { setToken } from "@/utils/auth";
|
||||
import ThemePicker from '@/components/ThemePicker'
|
||||
import { mapActions } from 'vuex'
|
||||
import { get } from '@/utils/config'
|
||||
import { setToken } from '@/utils/auth'
|
||||
|
||||
// import AlertNotification from "@/views/warning/AlertNotification.vue";
|
||||
|
||||
export default {
|
||||
name: "App",
|
||||
name: 'App',
|
||||
components: { ThemePicker },
|
||||
created() {
|
||||
get();
|
||||
get()
|
||||
// const originHref = window.location.href;
|
||||
// console.log(originHref, "originHref----");
|
||||
// if (originHref.indexOf("token") !== -1) {
|
||||
|
|
@ -25,30 +25,50 @@ export default {
|
|||
// setToken(token[1].slice(1));
|
||||
// this.$router.push({ path: "/" });
|
||||
// }
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
const token = urlParams.get('token');
|
||||
console.log('🚀 ~ created ~ token:', token);
|
||||
const urlParams = new URLSearchParams(window.location.search)
|
||||
const token = urlParams.get('token')
|
||||
console.log('🚀 ~ created ~ token:', token)
|
||||
if (token) {
|
||||
setToken(token);
|
||||
this.$router.push({ path: "/" });
|
||||
setToken(token)
|
||||
this.$router.push({ path: '/' })
|
||||
}
|
||||
},
|
||||
metaInfo() {
|
||||
return {
|
||||
title:
|
||||
this.$store.state.settings.dynamicTitle &&
|
||||
this.$store.state.settings.title,
|
||||
title: this.$store.state.settings.dynamicTitle && this.$store.state.settings.title,
|
||||
titleTemplate: (title) => {
|
||||
return title
|
||||
? `${title} - ${process.env.VUE_APP_TITLE}`
|
||||
: process.env.VUE_APP_TITLE;
|
||||
return title ? `${title} - ${process.env.VUE_APP_TITLE}` : process.env.VUE_APP_TITLE
|
||||
},
|
||||
};
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
<style scoped lang="scss">
|
||||
#app .theme-picker {
|
||||
display: none;
|
||||
}
|
||||
::v-deep .el-table {
|
||||
// 启用斑马纹
|
||||
&.el-table--striped .el-table__body {
|
||||
tr.el-table__row--striped td {
|
||||
background-color: #f6fbfa !important; // 浅紫色
|
||||
}
|
||||
}
|
||||
|
||||
.el-table__header {
|
||||
background: #e9f0ee;
|
||||
|
||||
th {
|
||||
background: #e9f0ee !important;
|
||||
color: #606266;
|
||||
font-weight: 600;
|
||||
height: 50px;
|
||||
}
|
||||
}
|
||||
|
||||
&.el-table--striped .el-table__body tr.el-table__row:hover > td.el-table__cell {
|
||||
background-color: #ccf1e9 !important;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import request from '@/utils/request'
|
|||
//机具类型管理
|
||||
export function getMaTypeList(query) {
|
||||
return request({
|
||||
url: '/material/ma_type/getMaTypeTreeSelect',
|
||||
url: '/material-mall/tool/getTreeSelect',
|
||||
method: 'get',
|
||||
params: query,
|
||||
})
|
||||
|
|
@ -12,7 +12,7 @@ export function getMaTypeList(query) {
|
|||
//机具类型管理列表信息
|
||||
export function getListByMaType(query) {
|
||||
return request({
|
||||
url: '/material/ma_type/getListByMaType',
|
||||
url: '/material-mall/tool/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
})
|
||||
|
|
@ -71,18 +71,19 @@ export function queryKeeperNameApi(query) {
|
|||
// }
|
||||
|
||||
// 物资类型管理--删除
|
||||
export function delMaType(typeId) {
|
||||
export function delMaType(data) {
|
||||
return request({
|
||||
url: '/material/ma_type/' + typeId,
|
||||
method: 'delete',
|
||||
url: '/material-mall/tool/delete',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 物资类型管理--修改
|
||||
export function updateMaType(data) {
|
||||
return request({
|
||||
url: '/material/ma_type',
|
||||
method: 'put',
|
||||
url: '/material-mall/tool/update',
|
||||
method: 'post',
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
|
|
@ -90,7 +91,7 @@ export function updateMaType(data) {
|
|||
// 物资类型管理--新增
|
||||
export function addMaType(data) {
|
||||
return request({
|
||||
url: '/material/ma_type',
|
||||
url: '/material-mall/tool/add',
|
||||
method: 'post',
|
||||
data: data,
|
||||
})
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@
|
|||
<el-col :span="6">
|
||||
<el-form-item label="计数单位" prop="unit">
|
||||
<!-- <el-input v-model="form.unit" placeholder="请输入计数单位" clearable maxlength="11" /> -->
|
||||
<el-select v-model="form.unit" placeholder="用户状态" clearable style="width: 100%">
|
||||
<el-select v-model="form.unit" placeholder="请选择计数单位" clearable style="width: 100%">
|
||||
<el-option
|
||||
v-for="dict in dict.type.dev_unit_type"
|
||||
:key="dict.label"
|
||||
|
|
|
|||
|
|
@ -389,7 +389,7 @@
|
|||
|
||||
<el-table
|
||||
:data="tableData"
|
||||
:height="tableHeight"
|
||||
:max-height="tableHeight"
|
||||
:key="Date.now()"
|
||||
@selection-change="handleSelectionChange"
|
||||
v-loading="tableLoading"
|
||||
|
|
@ -814,7 +814,7 @@ export default {
|
|||
treeSearchKey: '', //用于存储左侧树搜索框内容
|
||||
showSearch: true,
|
||||
total: 0,
|
||||
tableHeight: 550,
|
||||
tableHeight: 500,
|
||||
collapsed: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
|
|
@ -1063,7 +1063,7 @@ export default {
|
|||
*/
|
||||
toggleSearch() {
|
||||
this.searchExpanded = !this.searchExpanded
|
||||
this.searchExpanded ? (this.tableHeight = 340) : (this.tableHeight = 510)
|
||||
this.searchExpanded ? (this.tableHeight = 320) : (this.tableHeight = 500)
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
@ -1650,7 +1650,7 @@ export default {
|
|||
</script>
|
||||
|
||||
|
||||
<style scoped lang="scss">
|
||||
<style scoped lang="scss">
|
||||
.app-container {
|
||||
padding: 20px;
|
||||
background-color: #f5f7fa;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue