Commit 46bf04e0 by 林家欣

修改等级显示传参问题

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