Commit 46bf04e0 by 林家欣

修改等级显示传参问题

parent 4d19c97a
...@@ -5,7 +5,7 @@ import store from '@/store' ...@@ -5,7 +5,7 @@ import store from '@/store'
/** /**
* 获取uuid * 获取uuid
*/ */
export function getUUID () { export function getUUID() {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, c => { return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, c => {
return (c === 'x' ? (Math.random() * 16 | 0) : ('r&0x3' | '0x8')).toString(16) return (c === 'x' ? (Math.random() * 16 | 0) : ('r&0x3' | '0x8')).toString(16)
}) })
...@@ -15,7 +15,7 @@ export function getUUID () { ...@@ -15,7 +15,7 @@ export function getUUID () {
* 是否有权限 * 是否有权限
* @param {*} key * @param {*} key
*/ */
export function isAuth (key) { export function isAuth(key) {
return JSON.parse(localStorage.getItem('permissions') || '[]').indexOf(key) !== -1 || false return JSON.parse(localStorage.getItem('permissions') || '[]').indexOf(key) !== -1 || false
} }
...@@ -25,7 +25,7 @@ export function isAuth (key) { ...@@ -25,7 +25,7 @@ export function isAuth (key) {
* @param {*} id * @param {*} id
* @param {*} pid * @param {*} pid
*/ */
export function treeDataTranslate (data, id = 'id', pid = 'parentId') { export function treeDataTranslate(data, id = 'id', pid = 'parentId') {
var res = [] var res = []
var temp = {} var temp = {}
for (var i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
...@@ -51,8 +51,54 @@ export function treeDataTranslate (data, id = 'id', pid = 'parentId') { ...@@ -51,8 +51,54 @@ export function treeDataTranslate (data, id = 'id', pid = 'parentId') {
/** /**
* 清除登录信息 * 清除登录信息
*/ */
export function clearLoginInfo () { export function clearLoginInfo() {
localStorage.removeItem('token') localStorage.removeItem('token')
store.commit('resetStore') store.commit('resetStore')
router.options.isAddDynamicMenuRoutes = false router.options.isAddDynamicMenuRoutes = false
} }
/**
* 等级参数配置
*/
export const piclevelList = [
{
name: '隐藏',
value: 0
},
{
name: '1',
value: 1
},
{
name: '2',
value: 2
},
{
name: '3',
value: 3
},
{
name: '4',
value: 4,
},
{
name: '5',
value: 5
},
{
name: '6',
value: 6
},
{
name: '7',
value: 7
},
{
name: '8',
value: 8
},
{
name: '9',
value: 9
}
]
...@@ -59,9 +59,9 @@ ...@@ -59,9 +59,9 @@
> >
<el-option <el-option
v-for="item in piclevelList" v-for="item in piclevelList"
:key="item" :key="item.value"
:label="item" :label="item.name"
:value="item" :value="item.value"
> >
</el-option> </el-option>
</el-select> </el-select>
...@@ -147,6 +147,7 @@ ...@@ -147,6 +147,7 @@
</template> </template>
<script> <script>
import { piclevelList } from '@/utils'
import Ueditor from "../temps/ueditor"; import Ueditor from "../temps/ueditor";
export default { export default {
components: { components: {
...@@ -200,7 +201,7 @@ export default { ...@@ -200,7 +201,7 @@ export default {
value: "", value: "",
config: {}, config: {},
}, },
piclevelList: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], piclevelList,
id: [], id: [],
classidList: [], classidList: [],
title: "", title: "",
......
...@@ -34,12 +34,12 @@ ...@@ -34,12 +34,12 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label='级别' prop='levels'> <el-form-item label='级别' prop='levels'>
<el-select v-model="dataForm.levels" placeholder="请输入级别" clearable> <el-select v-model="dataForm.levels" placeholder="请选择级别" clearable>
<el-option <el-option
v-for="item in piclevelList" v-for="item in piclevelList"
:key="item" :key="item.value"
:label="item" :label="item.name"
:value="item"> :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -181,6 +181,7 @@ ...@@ -181,6 +181,7 @@
</template> </template>
<script> <script>
import { piclevelList } from '@/utils'
import AddOrUpdate from './news-add-or-update' import AddOrUpdate from './news-add-or-update'
export default { export default {
components: { components: {
...@@ -192,7 +193,7 @@ ...@@ -192,7 +193,7 @@
dataForm: { dataForm: {
'title': '', 'title': '',
'classId': '', 'classId': '',
'levels': 0, 'levels': null,
'author': '', 'author': '',
'editor': '', 'editor': '',
'keyword': '', 'keyword': '',
...@@ -220,7 +221,7 @@ ...@@ -220,7 +221,7 @@
} }
], ],
columnList:[], columnList:[],
piclevelList: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], piclevelList,
updateDate: [], updateDate: [],
releaseDate: [] releaseDate: []
} }
......
...@@ -45,9 +45,9 @@ ...@@ -45,9 +45,9 @@
> >
<el-option <el-option
v-for="item in piclevelList" v-for="item in piclevelList"
:key="item" :key="item.value"
:label="item" :label="item.name"
:value="item" :value="item.value"
> >
</el-option> </el-option>
</el-select> </el-select>
...@@ -98,6 +98,7 @@ ...@@ -98,6 +98,7 @@
</template> </template>
<script> <script>
import { piclevelList } from '@/utils'
import Ueditor from "../temps/ueditor"; import Ueditor from "../temps/ueditor";
export default { export default {
components: { components: {
...@@ -183,7 +184,7 @@ export default { ...@@ -183,7 +184,7 @@ export default {
value: "", value: "",
config: {}, config: {},
}, },
piclevelList: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], piclevelList,
}; };
}, },
methods: { methods: {
......
...@@ -50,9 +50,9 @@ ...@@ -50,9 +50,9 @@
<el-select v-model="dataForm.levels" placeholder="请输入级别" clearable> <el-select v-model="dataForm.levels" placeholder="请输入级别" clearable>
<el-option <el-option
v-for="item in piclevelList" v-for="item in piclevelList"
:key="item" :key="item.value"
:label="item" :label="item.name"
:value="item" :value="item.value"
> >
</el-option> </el-option>
</el-select> </el-select>
...@@ -251,6 +251,7 @@ ...@@ -251,6 +251,7 @@
</template> </template>
<script> <script>
import { piclevelList } from '@/utils'
import AddOrUpdate from "./cases-add-or-update"; import AddOrUpdate from "./cases-add-or-update";
export default { export default {
components: { components: {
...@@ -264,7 +265,7 @@ export default { ...@@ -264,7 +265,7 @@ export default {
editor: "", editor: "",
status: "", status: "",
service: "", service: "",
levels: 0, levels: null,
}, },
dataList: [], dataList: [],
pageIndex: 1, pageIndex: 1,
...@@ -332,7 +333,7 @@ export default { ...@@ -332,7 +333,7 @@ export default {
label: "其他", label: "其他",
}, },
], ],
piclevelList: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], piclevelList,
updateDate: [], updateDate: [],
releaseDate: [], releaseDate: [],
}; };
......
...@@ -92,9 +92,9 @@ ...@@ -92,9 +92,9 @@
> >
<el-option <el-option
v-for="item in piclevelList" v-for="item in piclevelList"
:key="item" :key="item.value"
:label="item" :label="item.name"
:value="item" :value="item.value"
> >
</el-option> </el-option>
</el-select> </el-select>
...@@ -136,6 +136,7 @@ ...@@ -136,6 +136,7 @@
</template> </template>
<script> <script>
import { piclevelList } from '@/utils'
import Ueditor from "../temps/ueditor"; import Ueditor from "../temps/ueditor";
export default { export default {
components: { components: {
...@@ -251,7 +252,7 @@ export default { ...@@ -251,7 +252,7 @@ export default {
value: "", value: "",
config: {}, config: {},
}, },
piclevelList: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], piclevelList,
}; };
}, },
methods: { methods: {
......
...@@ -66,9 +66,9 @@ ...@@ -66,9 +66,9 @@
<el-select v-model="dataForm.levels" placeholder="请输入级别" clearable> <el-select v-model="dataForm.levels" placeholder="请输入级别" clearable>
<el-option <el-option
v-for="item in piclevelList" v-for="item in piclevelList"
:key="item" :key="item.value"
:label="item" :label="item.name"
:value="item" :value="item.value"
> >
</el-option> </el-option>
</el-select> </el-select>
...@@ -274,6 +274,7 @@ ...@@ -274,6 +274,7 @@
</template> </template>
<script> <script>
import { piclevelList } from '@/utils'
import AddOrUpdate from "./partners-add-or-update"; import AddOrUpdate from "./partners-add-or-update";
export default { export default {
components: { components: {
...@@ -288,7 +289,7 @@ export default { ...@@ -288,7 +289,7 @@ export default {
status: "", status: "",
technology: "", technology: "",
service: "", service: "",
levels: 0, levels: null,
}, },
dataList: [], dataList: [],
pageIndex: 1, pageIndex: 1,
...@@ -378,7 +379,7 @@ export default { ...@@ -378,7 +379,7 @@ export default {
label: "其他", label: "其他",
}, },
], ],
piclevelList: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], piclevelList,
updateDate: [], updateDate: [],
releaseDate: [], releaseDate: [],
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment