fix: 修改原型白名单的部分,修改跳转方式
This commit is contained in:
parent
1d276d5862
commit
0e1238636a
@ -266,6 +266,21 @@ export const dynamicRoutes = [
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
path: '/build/whiteList',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ['build:whiteListManagement:equepDetail'],
|
||||
children: [
|
||||
{
|
||||
path: 'equepDetail',
|
||||
component: () => import('@/views/FDS/whiteListManagement/equepDetail'),
|
||||
name: 'WhiteListManagementEquepDetail',
|
||||
meta: { title: '白名单设备详情', activeMenu: '/build/whiteListManagement' }
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
path: '/build/whiteList',
|
||||
component: Layout,
|
||||
|
@ -9,11 +9,11 @@
|
||||
>
|
||||
<el-form-item label="安装包名称" prop="installpackName">
|
||||
<el-input
|
||||
v-model="queryParams.installpackName"
|
||||
clearable
|
||||
placeholder="请输入安装包名称"
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
v-model="queryParams.installpackName"
|
||||
clearable
|
||||
placeholder="请输入安装包名称"
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
@ -33,14 +33,14 @@
|
||||
</el-table-column>
|
||||
<el-table-column align="center" class-name="small-padding fixed-width" label="操作" width="50">
|
||||
<template slot-scope="scope">
|
||||
<el-button circle icon="el-icon-plus" type="primary"
|
||||
<el-button circle icon="el-icon-plus" size="20" type="primary" @click="addPack"
|
||||
></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitAddForm()">确 定</el-button>
|
||||
</div>
|
||||
<!-- <div slot="footer" class="dialog-footer">-->
|
||||
<!-- <el-button type="primary" @click="submitAddForm()">确 定</el-button>-->
|
||||
<!-- </div>-->
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
@ -79,10 +79,10 @@ export default {
|
||||
getList() {
|
||||
this.loading = true
|
||||
listConfig(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
||||
this.dataList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
}
|
||||
this.dataList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
}
|
||||
)
|
||||
},
|
||||
|
||||
@ -101,19 +101,12 @@ export default {
|
||||
submitAddForm() {
|
||||
|
||||
},
|
||||
reset() {
|
||||
this.form = {
|
||||
whiteListType: undefined,
|
||||
whiteListName: undefined,
|
||||
remark: undefined
|
||||
}
|
||||
this.resetForm('form')
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.reset()
|
||||
this.closeModal()
|
||||
|
||||
/** 新增当前包的按钮 */
|
||||
addPack() {
|
||||
|
||||
},
|
||||
|
||||
closeModal() {
|
||||
this.$emit('close')
|
||||
},
|
||||
|
@ -4,41 +4,41 @@
|
||||
<el-form-item label="选择APP" prop="configName">
|
||||
<el-select v-model="queryParams.configType" clearable placeholder="请选择APP">
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_yes_no"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
v-for="dict in dict.type.sys_yes_no"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="版本号" prop="version">
|
||||
<el-input
|
||||
v-model="queryParams.version"
|
||||
clearable
|
||||
placeholder="请输入版本号"
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
v-model="queryParams.version"
|
||||
clearable
|
||||
placeholder="请输入版本号"
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="公开时间">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
end-placeholder="结束日期"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
style="width: 240px"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
v-model="dateRange"
|
||||
end-placeholder="结束日期"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
style="width: 240px"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="configType">
|
||||
<el-select v-model="queryParams.configType" clearable placeholder="请选择状态">
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_yes_no"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
v-for="dict in dict.type.sys_yes_no"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@ -51,35 +51,35 @@
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
v-hasPermi="['system:config:add']"
|
||||
icon="el-icon-plus"
|
||||
plain
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:config:add']"
|
||||
icon="el-icon-plus"
|
||||
plain
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="handleAdd"
|
||||
>新增
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
:disabled="multiple"
|
||||
icon="el-icon-plus"
|
||||
plain
|
||||
size="mini"
|
||||
type="info"
|
||||
@click="handlePublish"
|
||||
:disabled="multiple"
|
||||
icon="el-icon-plus"
|
||||
plain
|
||||
size="mini"
|
||||
type="info"
|
||||
@click="handlePublish"
|
||||
>批量发布
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
v-hasPermi="['system:config:add']"
|
||||
:disabled="multiple"
|
||||
icon="el-icon-plus"
|
||||
plain
|
||||
size="mini"
|
||||
type="info"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['system:config:add']"
|
||||
:disabled="multiple"
|
||||
icon="el-icon-plus"
|
||||
plain
|
||||
size="mini"
|
||||
type="info"
|
||||
@click="handleDelete"
|
||||
>批量删除
|
||||
</el-button>
|
||||
</el-col>
|
||||
@ -93,9 +93,9 @@
|
||||
<el-table-column :show-overflow-tooltip="true" align="center" label="版本号" prop="version"/>
|
||||
<el-table-column :show-overflow-tooltip="true" align="center" label="子版本号" prop="configValue"/>
|
||||
<el-table-column
|
||||
label="系统"
|
||||
min-width="80"
|
||||
prop="platform"
|
||||
label="系统"
|
||||
min-width="80"
|
||||
prop="platform"
|
||||
>
|
||||
<template scope="scope">
|
||||
<div>{{ scope.row.platform === '0' ? '安卓' : 'IOS' }}</div>
|
||||
@ -133,16 +133,16 @@
|
||||
|
||||
<el-table-column :show-overflow-tooltip="true" align="center" label="更新说明" prop="remark"/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="二维码"
|
||||
min-width="80"
|
||||
align="center"
|
||||
label="二维码"
|
||||
min-width="80"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
|
||||
<el-image
|
||||
:preview-src-list="srcList"
|
||||
:src="url"
|
||||
style="width: 80px; height: 80px"
|
||||
:preview-src-list="srcList"
|
||||
:src="url"
|
||||
style="width: 80px; height: 80px"
|
||||
>
|
||||
</el-image>
|
||||
|
||||
@ -163,19 +163,19 @@
|
||||
<el-table-column align="center" class-name="small-padding fixed-width" label="操作" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
v-hasPermi="['system:config:edit']"
|
||||
icon="el-icon-bottom"
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleDown(scope.row)"
|
||||
v-hasPermi="['system:config:edit']"
|
||||
icon="el-icon-bottom"
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleDown(scope.row)"
|
||||
>下架
|
||||
</el-button>
|
||||
<el-button
|
||||
v-hasPermi="['system:config:edit']"
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleEdit(scope.row)"
|
||||
v-hasPermi="['system:config:edit']"
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleEdit(scope.row)"
|
||||
>修改
|
||||
</el-button>
|
||||
<el-dropdown size="mini"
|
||||
@ -204,11 +204,11 @@
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:total="total"
|
||||
@pagination="getList"
|
||||
v-show="total>0"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:total="total"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
</div>
|
||||
@ -263,32 +263,30 @@ export default {
|
||||
]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
applicationInfo: function() {
|
||||
return this.$store.state.applicationInfo
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
mounted() {
|
||||
console.log(this.$store.getters.applicationId)
|
||||
console.log(this.applicationInfo)
|
||||
|
||||
},
|
||||
methods: {
|
||||
/** 查询参数列表 */
|
||||
getList() {
|
||||
this.loading = true
|
||||
listConfig(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
||||
this.configList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
}
|
||||
this.configList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
}
|
||||
)
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
configId: undefined,
|
||||
configName: undefined,
|
||||
configKey: undefined,
|
||||
configValue: undefined,
|
||||
configType: 'Y',
|
||||
remark: undefined
|
||||
}
|
||||
this.resetForm('form')
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div class="app-container">
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div>新增文件</div>
|
||||
<div>新增白名单</div>
|
||||
<el-divider/>
|
||||
</el-header>
|
||||
<el-main>
|
||||
@ -17,6 +17,15 @@
|
||||
<el-option label="白名单设备" value="1"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="白名单模式" prop="whitePattern">
|
||||
<el-select v-model="form.whitePattern" clearable placeholder="请选择白名单模式">
|
||||
<el-option label="正则模式" value="0"/>
|
||||
<el-option label="普通模式" value="1"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model="form.remark" placeholder="请输入内容" type="textarea"/>
|
||||
</el-form-item>
|
||||
@ -32,7 +41,7 @@
|
||||
|
||||
</template>
|
||||
<script>
|
||||
import { addConfig, updateConfig } from '@/api/system/config'
|
||||
import { addConfig } from '@/api/system/config'
|
||||
|
||||
export default {
|
||||
name: 'WhiteAdd',
|
||||
@ -45,45 +54,55 @@ export default {
|
||||
// 文件存放的路径
|
||||
fileList: [],
|
||||
rules: {
|
||||
configName: [
|
||||
{ required: true, message: '上传方式不能为空', trigger: 'change' }
|
||||
whiteListName: [
|
||||
{ required: true, message: '白名单名称不能为空', trigger: 'blur' }
|
||||
],
|
||||
configKey: [
|
||||
{ required: true, message: '安装包名称不能为空', trigger: 'blur' }
|
||||
whiteListType: [
|
||||
{ required: true, message: '白名单类型不能为空', trigger: 'change' }
|
||||
],
|
||||
whitePattern: [
|
||||
{ required: true, message: '白名单模式不能为空', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
activeTabs: '1'
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
mounted() {
|
||||
this.reset()
|
||||
},
|
||||
methods: {
|
||||
reset() {
|
||||
this.form = {
|
||||
whiteListType: undefined,
|
||||
whiteListName: undefined,
|
||||
whitePattern: undefined,
|
||||
remark: undefined
|
||||
}
|
||||
this.resetForm('form')
|
||||
},
|
||||
/** 提交按钮 */
|
||||
/** 新增按钮 */
|
||||
submitAddForm: function() {
|
||||
this.$refs['form'].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.configId != undefined) {
|
||||
updateConfig(this.form).then(response => {
|
||||
this.$modal.msgSuccess('修改成功')
|
||||
})
|
||||
} else {
|
||||
addConfig(this.form).then(response => {
|
||||
this.$modal.msgSuccess('新增成功')
|
||||
})
|
||||
}
|
||||
|
||||
addConfig(this.form).then(response => {
|
||||
this.$modal.msgSuccess('新增成功')
|
||||
})
|
||||
this.$router.push({ path: '/build/whiteListManagement' })
|
||||
// if (this.form.configId != undefined) {
|
||||
// updateConfig(this.form).then(response => {
|
||||
// this.$modal.msgSuccess('修改成功')
|
||||
// })
|
||||
// } else {
|
||||
// addConfig(this.form).then(response => {
|
||||
// this.$modal.msgSuccess('新增成功')
|
||||
// })
|
||||
// }
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
cancel() {
|
||||
this.history.back()
|
||||
this.$router.push({ path: '/build/whiteListManagement' })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12,11 +12,11 @@
|
||||
<el-form-item label="添加方式" prop="configName">
|
||||
<el-radio-group v-model="configForm.addMode">
|
||||
<el-radio
|
||||
:label="1"
|
||||
:label="1"
|
||||
>手动添加
|
||||
</el-radio>
|
||||
<el-radio
|
||||
:label="2"
|
||||
:label="2"
|
||||
>批量添加
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
@ -28,32 +28,19 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<template v-if="configForm.addMode==1">
|
||||
<el-form-item v-if="configForm.whiteListType==0" label="白名单电话" prop="phone">
|
||||
<el-input v-model="configForm.phone" placeholder="请输入电话号码"/>
|
||||
<el-form-item v-if="configForm.whiteListType==0" label="用户ID" prop="userId">
|
||||
<el-input v-model="configForm.userId" placeholder="请输入用户ID" type="textarea"/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="configForm.whiteListType==0" label="姓名">
|
||||
<el-input v-model="configForm.name" placeholder="请输入姓名"/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="configForm.whiteListType==1" label="白名单设备">
|
||||
<el-form-item v-if="configForm.whiteListType==1" label="白名单设备" prop="equepid">
|
||||
<el-input v-model="configForm.equepid" placeholder="请输入设备信息" type="textarea"/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<el-form-item v-else-if="configForm.addMode==2" label="白名单文件">
|
||||
<el-upload
|
||||
ref="whiteListFiles"
|
||||
:auto-upload="true"
|
||||
:before-remove="beforeRemove"
|
||||
:before-upload="beforeAvatarUpload"
|
||||
:file-list="fileList"
|
||||
:headers="{tokenId: tokenId}"
|
||||
:multiple="false"
|
||||
:on-success="handleSuccess"
|
||||
accept=".txt"
|
||||
action="https://jsonplaceholder.typicode.com/posts/"
|
||||
class="upload"
|
||||
>
|
||||
<el-button slot="trigger" size="small" type="primary">上传文件</el-button>
|
||||
</el-upload>
|
||||
<el-form-item v-else-if="configForm.addMode==2" label="白名单文件" prop="file">
|
||||
|
||||
|
||||
<image-upload v-model="configForm.file" :fileType="['txt']" :limit="1"
|
||||
:listType="'text'"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="configForm.remark" placeholder="请输入备注" type="textarea"/>
|
||||
@ -65,7 +52,6 @@
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-main>
|
||||
<!--安装包弹窗-->
|
||||
</el-container>
|
||||
</div>
|
||||
|
||||
@ -75,7 +61,6 @@ import { addConfig, updateConfig } from '@/api/system/config'
|
||||
|
||||
export default {
|
||||
name: 'WhiteAddConfig',
|
||||
dicts: ['sys_yes_no'],
|
||||
data() {
|
||||
|
||||
return {
|
||||
@ -88,7 +73,8 @@ export default {
|
||||
whiteListType: '',
|
||||
whitelistIds: '',
|
||||
remark: '',
|
||||
equepid: ''
|
||||
equepid: '',
|
||||
file: []
|
||||
},
|
||||
configRules: {
|
||||
addMode: [
|
||||
@ -96,7 +82,17 @@ export default {
|
||||
],
|
||||
whiteListType: [
|
||||
{ required: true, message: '白名单类型不能为空', trigger: 'change' }
|
||||
],
|
||||
userId: [
|
||||
{ required: true, message: '用户Id不能为空', trigger: 'blur' }
|
||||
],
|
||||
equepid: [
|
||||
{ required: true, message: '设备信息不能为空', trigger: 'blur' }
|
||||
],
|
||||
file: [
|
||||
{ required: true, message: '白名单文件不能为空', trigger: 'change' }
|
||||
]
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -104,9 +100,11 @@ export default {
|
||||
methods: {
|
||||
reset() {
|
||||
this.form = {
|
||||
addMode: undefined,
|
||||
whiteListType: undefined,
|
||||
whiteListName: undefined,
|
||||
remark: undefined
|
||||
userId: undefined,
|
||||
equepid: undefined,
|
||||
file: undefined
|
||||
}
|
||||
this.resetForm('form')
|
||||
},
|
||||
@ -121,40 +119,16 @@ export default {
|
||||
} else {
|
||||
addConfig(this.form).then(response => {
|
||||
this.$modal.msgSuccess('新增成功')
|
||||
|
||||
})
|
||||
}
|
||||
this.$router.push({ path: '/build/whiteListManagement' })
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/** 在上传之前进行校验 */
|
||||
beforeAvatarUpload(file) {
|
||||
const formatList = file.name.split('.')
|
||||
const isFormat = file.type === 'text/plain' || formatList[formatList.length - 1] === 'txt'
|
||||
if (!isFormat) {
|
||||
this.$message.error(`上传格式只能是名称后缀为.txt的文本文件!`)
|
||||
}
|
||||
const isLt2M = file.size / 1024 / 1024 < 5
|
||||
if (!isLt2M) {
|
||||
this.$message.error(`上传文件大小不能超过5M!`)
|
||||
}
|
||||
return isLt2M && isFormat
|
||||
},
|
||||
/** 上传文件 */
|
||||
handleSuccess(file) {
|
||||
this.fileList = []
|
||||
const nameList = file.context.path.split('/')
|
||||
this.fileList.push({
|
||||
name: file.context.name || nameList[nameList.length - 1],
|
||||
url: file.context.path
|
||||
})
|
||||
this.addFormData.path = file.context.path
|
||||
},
|
||||
beforeRemove(files, filesList) {
|
||||
return this.$confirm(`确定要移除${files.name}?`)
|
||||
},
|
||||
cancel() {
|
||||
this.history.back()
|
||||
this.$router.push({ path: '/build/whiteListManagement' })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,17 +1,17 @@
|
||||
<template>
|
||||
|
||||
<el-dialog :modal-append-to-body="false" :title="title" v-bind="$attrs" width="500px"
|
||||
@close="onClose"
|
||||
@open="onOpen"
|
||||
v-on="$listeners"
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input v-model="form.whiteListName" placeholder="请输入名称"/>
|
||||
<el-form-item v-if="type==1" label="用户Id" prop="userId">
|
||||
<el-input v-model="form.userId" placeholder="请输入用户Id"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="电话" prop="phoneNumber">
|
||||
<el-input v-model="form.phoneNumber" placeholder="请输入电话"/>
|
||||
|
||||
<el-form-item v-else label="设备号" prop="equepid">
|
||||
<el-input v-model="form.equepid" placeholder="请输入设备号"/>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitAddForm()">保 存</el-button>
|
||||
@ -20,30 +20,29 @@
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import { addConfig, updateConfig } from '@/api/system/config'
|
||||
import { updateConfig } from '@/api/system/config'
|
||||
|
||||
export default {
|
||||
name: 'EditWhiteList',
|
||||
dicts: ['sys_yes_no'],
|
||||
|
||||
props: {
|
||||
// 图片数量限制
|
||||
title: {
|
||||
type: String,
|
||||
default: '添加白名单'
|
||||
//类型
|
||||
type: {
|
||||
type: Number,
|
||||
default: 1
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
configName: undefined,
|
||||
form: {},
|
||||
// 白名单配置表单验证
|
||||
title: '编辑',
|
||||
// 详情信息
|
||||
rules: {
|
||||
whiteListName: [
|
||||
{ required: true, message: '名称不能为空', trigger: 'blur' }
|
||||
userId: [
|
||||
{ required: true, message: '用户Id不能为空', trigger: 'blur' }
|
||||
],
|
||||
whiteListType: [
|
||||
{ required: true, message: '白名单类型不能为空', trigger: 'change' }
|
||||
equepid: [
|
||||
{ required: true, message: '设备号不能为空', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -54,25 +53,17 @@ export default {
|
||||
submitAddForm: function() {
|
||||
this.$refs['form'].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.configId != undefined) {
|
||||
updateConfig(this.form).then(response => {
|
||||
this.$modal.msgSuccess('修改成功')
|
||||
this.closeModal()
|
||||
})
|
||||
} else {
|
||||
addConfig(this.form).then(response => {
|
||||
this.$modal.msgSuccess('新增成功')
|
||||
this.closeModal()
|
||||
})
|
||||
}
|
||||
updateConfig(this.form).then(response => {
|
||||
this.$modal.msgSuccess('修改成功')
|
||||
this.closeModal()
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
reset() {
|
||||
this.form = {
|
||||
whiteListType: undefined,
|
||||
whiteListName: undefined,
|
||||
remark: undefined
|
||||
userId: undefined,
|
||||
equepid: undefined
|
||||
}
|
||||
this.resetForm('form')
|
||||
},
|
||||
@ -83,12 +74,6 @@ export default {
|
||||
},
|
||||
closeModal() {
|
||||
this.$emit('close')
|
||||
},
|
||||
onOpen() {
|
||||
this.active = this.current
|
||||
this.key = ''
|
||||
},
|
||||
onClose() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,11 +3,11 @@
|
||||
<el-form v-show="showSearch" ref="queryForm" :inline="true" :model="queryParams" label-width="90px" size="small">
|
||||
<el-form-item label="白名单信息" prop="phoneNumber">
|
||||
<el-input
|
||||
v-model="queryParams.phoneNumber"
|
||||
clearable
|
||||
placeholder="请输入电话号码"
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
v-model="queryParams.phoneNumber"
|
||||
clearable
|
||||
placeholder="请输入用户Id"
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
@ -19,13 +19,13 @@
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
v-hasPermi="['system:config:delete']"
|
||||
:disabled="multiple"
|
||||
icon="el-icon-plus"
|
||||
plain
|
||||
size="mini"
|
||||
type="info"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['system:config:delete']"
|
||||
:disabled="multiple"
|
||||
icon="el-icon-plus"
|
||||
plain
|
||||
size="mini"
|
||||
type="info"
|
||||
@click="handleDelete"
|
||||
>批量删除
|
||||
</el-button>
|
||||
</el-col>
|
||||
@ -33,47 +33,48 @@
|
||||
</el-row>
|
||||
<el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange">
|
||||
<el-table-column align="center" type="selection" width="55"/>
|
||||
<el-table-column align="center" label="姓名" prop="configId"/>
|
||||
<el-table-column :show-overflow-tooltip="true" align="center" label="电话" prop="configName"/>
|
||||
<el-table-column :show-overflow-tooltip="true" align="center" label="用户Id" prop="configName"/>
|
||||
<el-table-column :show-overflow-tooltip="true" align="center" label="添加时间" prop="configKey"/>
|
||||
<el-table-column :show-overflow-tooltip="true" align="center" label="备注" prop="configValue"/>
|
||||
<el-table-column align="center" class-name="small-padding fixed-width" label="操作" width="250">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
v-hasPermi="['system:config:edit']"
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleEdit(scope.row)"
|
||||
v-hasPermi="['system:config:edit']"
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleEdit(scope.row)"
|
||||
>编辑
|
||||
</el-button>
|
||||
|
||||
<el-button
|
||||
v-hasPermi="['system:config:delete']"
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:config:delete']"
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:total="total"
|
||||
@pagination="getList"
|
||||
v-show="total>0"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:total="total"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<EditWhiteList :visible.sync="editWhiteListOpen" @close="closeEditWhiteList"/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { delConfig, getConfig, listConfig } from '@/api/system/config'
|
||||
import { delConfig, listConfig } from '@/api/system/config'
|
||||
import EditWhiteList from '@/views/FDS/whiteListManagement/components/editWhiteList.vue'
|
||||
|
||||
export default {
|
||||
name: 'WhiteListDetail',
|
||||
components: { EditWhiteList },
|
||||
dicts: ['sys_yes_no'],
|
||||
data() {
|
||||
return {
|
||||
@ -90,19 +91,10 @@ export default {
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 参数表格数据
|
||||
|
||||
dataList: [],
|
||||
|
||||
configList: [],
|
||||
// 弹出层标题
|
||||
title: '',
|
||||
// 是否显示安装包上传弹出框
|
||||
addOpen: false,
|
||||
// 是否显示安装包详情弹出框
|
||||
detailOpen: false,
|
||||
tokenId: '',
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
editWhiteListOpen: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
@ -121,22 +113,17 @@ export default {
|
||||
getList() {
|
||||
this.loading = true
|
||||
listConfig(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
||||
this.dataList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
}
|
||||
this.dataList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
}
|
||||
)
|
||||
},
|
||||
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
configId: undefined,
|
||||
configName: undefined,
|
||||
configKey: undefined,
|
||||
configValue: undefined,
|
||||
configType: 'Y',
|
||||
remark: undefined
|
||||
phoneNumber: undefined
|
||||
}
|
||||
this.resetForm('form')
|
||||
},
|
||||
@ -147,16 +134,9 @@ export default {
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.dateRange = []
|
||||
this.resetForm('queryForm')
|
||||
this.handleQuery()
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset()
|
||||
this.addOpen = true
|
||||
this.title = '上传安装包'
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.configId)
|
||||
@ -180,40 +160,17 @@ export default {
|
||||
handleEdit(row) {
|
||||
this.reset()
|
||||
const configId = row.configId || this.ids
|
||||
getConfig(configId).then(response => {
|
||||
this.form = response.data
|
||||
this.addOpen = true
|
||||
this.title = '修改安装包'
|
||||
})
|
||||
},
|
||||
/** 查看详情弹窗 **/
|
||||
handleDetail() {
|
||||
this.detailOpen = true
|
||||
},
|
||||
|
||||
/** 切换TAB触发的事件 */
|
||||
handleClickTabs() {
|
||||
this.getList()
|
||||
},
|
||||
|
||||
/** 下载按钮 */
|
||||
handleDownload(row) {
|
||||
const configIds = row.configId || this.ids
|
||||
this.$modal.confirm('是否确认下载编号为"' + configIds + '"的数据项?').then(function() {
|
||||
return delConfig(configIds)
|
||||
}).then(() => {
|
||||
this.getList()
|
||||
this.$modal.msgSuccess('下载成功')
|
||||
}).catch(() => {
|
||||
})
|
||||
this.editWhiteListOpen = true
|
||||
// getConfig(configId).then(response => {
|
||||
// this.form = response.data
|
||||
// this.addOpen = true
|
||||
// this.title = '修改安装包'
|
||||
// })
|
||||
},
|
||||
/** 关闭新增弹出框*/
|
||||
closeAdd() {
|
||||
this.addOpen = false
|
||||
closeEditWhiteList() {
|
||||
this.editWhiteListOpen = false
|
||||
this.getList()
|
||||
},
|
||||
closeAddConfig() {
|
||||
this.detailOpen = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
140
sf-ui/src/views/FDS/whiteListManagement/edit.vue
Normal file
140
sf-ui/src/views/FDS/whiteListManagement/edit.vue
Normal file
@ -0,0 +1,140 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div>编辑白名单</div>
|
||||
<el-divider/>
|
||||
</el-header>
|
||||
<el-main>
|
||||
<div class="form-main">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="白名单名称" prop="whiteListName">
|
||||
<el-input v-model="form.whiteListName" placeholder="请输入白名单名称"/>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item label="白名单类型" prop="whiteListType">
|
||||
<el-select v-model="form.whiteListType" clearable placeholder="请选择白名单类型">
|
||||
<el-option label="白名单人员" value="0"/>
|
||||
<el-option label="白名单设备" value="1"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="白名单模式" prop="whitePattern">
|
||||
<el-select v-model="form.whitePattern" clearable placeholder="请选择白名单模式">
|
||||
<el-option label="正则模式" value="0"/>
|
||||
<el-option label="普通模式" value="1"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model="form.remark" placeholder="请输入内容" type="textarea"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="page-footer">
|
||||
<el-button type="primary" @click="submitAddForm()">保 存</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
<script>
|
||||
import { updateConfig } from '@/api/system/config'
|
||||
|
||||
export default {
|
||||
name: 'WhiteAdd',
|
||||
dicts: ['sys_yes_no'],
|
||||
data() {
|
||||
|
||||
return {
|
||||
form: {},
|
||||
tokenId: '',
|
||||
// 文件存放的路径
|
||||
fileList: [],
|
||||
rules: {
|
||||
whiteListName: [
|
||||
{ required: true, message: '白名单名称不能为空', trigger: 'blur' }
|
||||
],
|
||||
whiteListType: [
|
||||
{ required: true, message: '白名单类型不能为空', trigger: 'change' }
|
||||
],
|
||||
whitePattern: [
|
||||
{ required: true, message: '白名单模式不能为空', trigger: 'change' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
// reset() {
|
||||
// this.form = {
|
||||
// whiteListType: undefined,
|
||||
// whiteListName: undefined,
|
||||
// whitePattern: undefined,
|
||||
// remark: undefined
|
||||
// }
|
||||
// this.resetForm('form')
|
||||
// },
|
||||
/** 提交按钮 */
|
||||
submitAddForm: function() {
|
||||
this.$refs['form'].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.configId != undefined) {
|
||||
updateConfig(this.form).then(response => {
|
||||
this.$modal.msgSuccess('修改成功')
|
||||
})
|
||||
}
|
||||
this.$router.push({ path: '/build/whiteListManagement' })
|
||||
|
||||
// else {
|
||||
// addConfig(this.form).then(response => {
|
||||
// this.$modal.msgSuccess('新增成功')
|
||||
// })
|
||||
// }
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
cancel() {
|
||||
this.$router.push({ path: '/build/whiteListManagement' })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.app-container {
|
||||
background: #ffffff;
|
||||
margin: 24px;
|
||||
}
|
||||
|
||||
.form-main {
|
||||
width: 700px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
::v-deep .el-input.is-disabled .el-input__inner, .el-textarea.is-disabled .el-textarea__inner {
|
||||
border: 1px solid #E4E7ED !important;
|
||||
}
|
||||
|
||||
.tag-group {
|
||||
.el-tag {
|
||||
cursor: pointer;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.el-tag + .el-tag {
|
||||
margin-left: 10px
|
||||
}
|
||||
|
||||
.page-footer {
|
||||
margin: 0 auto;
|
||||
width: 700px;
|
||||
justify-content: center;
|
||||
display: flex;
|
||||
}
|
||||
</style>
|
@ -3,11 +3,11 @@
|
||||
<el-form v-show="showSearch" ref="queryForm" :inline="true" :model="queryParams" label-width="90px" size="small">
|
||||
<el-form-item label="白名单信息" prop="phoneNumber">
|
||||
<el-input
|
||||
v-model="queryParams.phoneNumber"
|
||||
clearable
|
||||
placeholder="请输入设备号"
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
v-model="queryParams.equepId"
|
||||
clearable
|
||||
placeholder="请输入设备号"
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
@ -19,13 +19,13 @@
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
v-hasPermi="['system:config:delete']"
|
||||
:disabled="multiple"
|
||||
icon="el-icon-plus"
|
||||
plain
|
||||
size="mini"
|
||||
type="info"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['system:config:delete']"
|
||||
:disabled="multiple"
|
||||
icon="el-icon-plus"
|
||||
plain
|
||||
size="mini"
|
||||
type="info"
|
||||
@click="handleDelete"
|
||||
>批量删除
|
||||
</el-button>
|
||||
</el-col>
|
||||
@ -39,41 +39,45 @@
|
||||
<el-table-column align="center" class-name="small-padding fixed-width" label="操作" width="250">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
v-hasPermi="['system:config:edit']"
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleEdit(scope.row)"
|
||||
v-hasPermi="['system:config:edit']"
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleEdit(scope.row)"
|
||||
>编辑
|
||||
</el-button>
|
||||
|
||||
<el-button
|
||||
v-hasPermi="['system:config:delete']"
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:config:delete']"
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:total="total"
|
||||
@pagination="getList"
|
||||
v-show="total>0"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:total="total"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<EditWhiteList :visible.sync="editWhiteListOpen" @close="closeEditWhiteList"/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { delConfig, getConfig, listConfig } from '@/api/system/config'
|
||||
import { delConfig, listConfig } from '@/api/system/config'
|
||||
import EditWhiteList from './components/editWhiteList.vue'
|
||||
|
||||
export default {
|
||||
name: 'WhiteListEquepDetail',
|
||||
dicts: ['sys_yes_no'],
|
||||
components: {
|
||||
EditWhiteList
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
@ -95,18 +99,13 @@ export default {
|
||||
configList: [],
|
||||
// 弹出层标题
|
||||
title: '',
|
||||
// 是否显示安装包上传弹出框
|
||||
addOpen: false,
|
||||
// 是否显示安装包详情弹出框
|
||||
detailOpen: false,
|
||||
tokenId: '',
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
// 是否显示编辑详情弹窗
|
||||
editWhiteListOpen: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
phoneNumber: undefined
|
||||
equepId: undefined
|
||||
},
|
||||
// 表单参数
|
||||
form: {}
|
||||
@ -120,22 +119,17 @@ export default {
|
||||
getList() {
|
||||
this.loading = true
|
||||
listConfig(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
||||
this.dataList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
}
|
||||
this.dataList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
}
|
||||
)
|
||||
},
|
||||
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
configId: undefined,
|
||||
configName: undefined,
|
||||
configKey: undefined,
|
||||
configValue: undefined,
|
||||
configType: 'Y',
|
||||
remark: undefined
|
||||
equepId: undefined
|
||||
}
|
||||
this.resetForm('form')
|
||||
},
|
||||
@ -150,12 +144,6 @@ export default {
|
||||
this.resetForm('queryForm')
|
||||
this.handleQuery()
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset()
|
||||
this.addOpen = true
|
||||
this.title = '上传安装包'
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.configId)
|
||||
@ -179,40 +167,17 @@ export default {
|
||||
handleEdit(row) {
|
||||
this.reset()
|
||||
const configId = row.configId || this.ids
|
||||
getConfig(configId).then(response => {
|
||||
this.form = response.data
|
||||
this.addOpen = true
|
||||
this.title = '修改安装包'
|
||||
})
|
||||
},
|
||||
/** 查看详情弹窗 **/
|
||||
handleDetail() {
|
||||
this.detailOpen = true
|
||||
this.editWhiteListOpen = true
|
||||
// getConfig(configId).then(response => {
|
||||
// this.form = response.data
|
||||
// this.editWhiteListOpen = true
|
||||
// })
|
||||
},
|
||||
|
||||
/** 切换TAB触发的事件 */
|
||||
handleClickTabs() {
|
||||
this.getList()
|
||||
},
|
||||
|
||||
/** 下载按钮 */
|
||||
handleDownload(row) {
|
||||
const configIds = row.configId || this.ids
|
||||
this.$modal.confirm('是否确认下载编号为"' + configIds + '"的数据项?').then(function() {
|
||||
return delConfig(configIds)
|
||||
}).then(() => {
|
||||
this.getList()
|
||||
this.$modal.msgSuccess('下载成功')
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
/** 关闭新增弹出框*/
|
||||
closeAdd() {
|
||||
this.addOpen = false
|
||||
closeEditWhiteList() {
|
||||
this.editWhiteListOpen = false
|
||||
this.getList()
|
||||
},
|
||||
closeAddConfig() {
|
||||
this.detailOpen = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,40 +3,40 @@
|
||||
<el-form v-show="showSearch" ref="queryForm" :inline="true" :model="queryParams" label-width="90px" size="small">
|
||||
<el-form-item label="名单类型" prop="whiteListType">
|
||||
<el-input
|
||||
v-model="queryParams.whiteListType"
|
||||
clearable
|
||||
placeholder="请输入名单类型"
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
v-model="queryParams.whiteListType"
|
||||
clearable
|
||||
placeholder="请输入名单类型"
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="名称" prop="whiteListName">
|
||||
<el-input
|
||||
v-model="queryParams.whiteListName"
|
||||
clearable
|
||||
placeholder="请输入名称"
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
v-model="queryParams.whiteListName"
|
||||
clearable
|
||||
placeholder="请输入名称"
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
end-placeholder="结束日期"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
style="width: 240px"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
v-model="dateRange"
|
||||
end-placeholder="结束日期"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
style="width: 240px"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="configType">
|
||||
<el-select v-model="queryParams.status" clearable placeholder="请选择状态">
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_yes_no"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
v-for="dict in dict.type.sys_yes_no"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@ -49,34 +49,34 @@
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
v-hasPermi="['system:config:add']"
|
||||
icon="el-icon-plus"
|
||||
plain
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:config:add']"
|
||||
icon="el-icon-plus"
|
||||
plain
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="handleAdd"
|
||||
>新增
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
:disabled="multiple"
|
||||
icon="el-icon-plus"
|
||||
plain
|
||||
size="mini"
|
||||
type="info"
|
||||
@click="handlePublish"
|
||||
:disabled="multiple"
|
||||
icon="el-icon-plus"
|
||||
plain
|
||||
size="mini"
|
||||
type="info"
|
||||
@click="handlePublish"
|
||||
>批量发布
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
:disabled="multiple"
|
||||
icon="el-icon-plus"
|
||||
plain
|
||||
size="mini"
|
||||
type="info"
|
||||
@click="handleDelete"
|
||||
:disabled="multiple"
|
||||
icon="el-icon-plus"
|
||||
plain
|
||||
size="mini"
|
||||
type="info"
|
||||
@click="handleDelete"
|
||||
>批量删除
|
||||
</el-button>
|
||||
</el-col>
|
||||
@ -104,52 +104,52 @@
|
||||
<el-table-column align="center" class-name="small-padding fixed-width" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleDown(scope.row)"
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleDown(scope.row)"
|
||||
>下架
|
||||
</el-button>
|
||||
<el-button
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handlePublish(scope.row)"
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handlePublish(scope.row)"
|
||||
>发布
|
||||
</el-button>
|
||||
|
||||
<el-button
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleConfig(scope.row)"
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleConfig(scope.row)"
|
||||
>名单配置
|
||||
</el-button>
|
||||
|
||||
<el-button
|
||||
v-hasPermi="['system:config:edit']"
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleEdit(scope.row)"
|
||||
v-hasPermi="['system:config:edit']"
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleEdit(scope.row)"
|
||||
>修改
|
||||
</el-button>
|
||||
|
||||
<el-button
|
||||
v-hasPermi="['system:config:edit']"
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleDetail(scope.row)"
|
||||
v-hasPermi="['system:config:edit']"
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleDetail(scope.row)"
|
||||
>详情
|
||||
</el-button>
|
||||
|
||||
<el-button
|
||||
v-hasPermi="['system:config:remove']"
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:config:remove']"
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除
|
||||
</el-button>
|
||||
</template>
|
||||
@ -157,11 +157,11 @@
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:total="total"
|
||||
@pagination="getList"
|
||||
v-show="total>0"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:total="total"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
</div>
|
||||
@ -223,10 +223,10 @@ export default {
|
||||
getList() {
|
||||
this.loading = true
|
||||
listConfig(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
||||
this.configList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
}
|
||||
this.configList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
}
|
||||
)
|
||||
},
|
||||
// 表单重置
|
||||
@ -325,11 +325,12 @@ export default {
|
||||
/** 查看详情按钮操作 */
|
||||
handleDetail(row) {
|
||||
if (row.type == 1) {
|
||||
|
||||
this.$tab.openPage('白名单详情', '/build/WhiteList/detail/', '')
|
||||
this.$router.push({
|
||||
path: '/build/WhiteList/detail'
|
||||
})
|
||||
} else {
|
||||
this.$router.push({
|
||||
path: 'whiteList/equepDetail'
|
||||
path: '/build/WhiteList/equepDetail'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ module.exports = {
|
||||
// 部署生产环境和开发环境下的URL。
|
||||
// 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上
|
||||
// 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
|
||||
publicPath: process.env.NODE_ENV === "production" ? "/" : "/",
|
||||
publicPath: process.env.NODE_ENV === 'production' ? '/' : '/',
|
||||
// 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
|
||||
outputDir: 'dist',
|
||||
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
|
||||
@ -35,7 +35,7 @@ module.exports = {
|
||||
proxy: {
|
||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||
[process.env.VUE_APP_BASE_API]: {
|
||||
target: `http://172.24.0.2:7781`,
|
||||
target: `http://192.168.1.23:22009`,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
['^' + process.env.VUE_APP_BASE_API]: ''
|
||||
@ -47,7 +47,7 @@ module.exports = {
|
||||
css: {
|
||||
loaderOptions: {
|
||||
sass: {
|
||||
sassOptions: { outputStyle: "expanded" }
|
||||
sassOptions: { outputStyle: 'expanded' }
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -67,7 +67,7 @@ module.exports = {
|
||||
algorithm: 'gzip', // 使用gzip压缩
|
||||
minRatio: 0.8 // 压缩率小于1才会压缩
|
||||
})
|
||||
],
|
||||
]
|
||||
},
|
||||
chainWebpack(config) {
|
||||
config.plugins.delete('preload') // TODO: need test
|
||||
@ -91,44 +91,44 @@ module.exports = {
|
||||
.end()
|
||||
|
||||
config.when(process.env.NODE_ENV !== 'development', config => {
|
||||
config
|
||||
.plugin('ScriptExtHtmlWebpackPlugin')
|
||||
.after('html')
|
||||
.use('script-ext-html-webpack-plugin', [{
|
||||
// `runtime` must same as runtimeChunk name. default is `runtime`
|
||||
inline: /runtime\..*\.js$/
|
||||
}])
|
||||
.end()
|
||||
config
|
||||
.plugin('ScriptExtHtmlWebpackPlugin')
|
||||
.after('html')
|
||||
.use('script-ext-html-webpack-plugin', [{
|
||||
// `runtime` must same as runtimeChunk name. default is `runtime`
|
||||
inline: /runtime\..*\.js$/
|
||||
}])
|
||||
.end()
|
||||
|
||||
config.optimization.splitChunks({
|
||||
chunks: 'all',
|
||||
cacheGroups: {
|
||||
libs: {
|
||||
name: 'chunk-libs',
|
||||
test: /[\\/]node_modules[\\/]/,
|
||||
priority: 10,
|
||||
chunks: 'initial' // only package third parties that are initially dependent
|
||||
},
|
||||
elementUI: {
|
||||
name: 'chunk-elementUI', // split elementUI into a single package
|
||||
test: /[\\/]node_modules[\\/]_?element-ui(.*)/, // in order to adapt to cnpm
|
||||
priority: 20 // the weight needs to be larger than libs and app or it will be packaged into libs or app
|
||||
},
|
||||
commons: {
|
||||
name: 'chunk-commons',
|
||||
test: resolve('src/components'), // can customize your rules
|
||||
minChunks: 3, // minimum common number
|
||||
priority: 5,
|
||||
reuseExistingChunk: true
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
config.optimization.runtimeChunk('single'),
|
||||
{
|
||||
from: path.resolve(__dirname, './public/robots.txt'), //防爬虫文件
|
||||
to: './' //到根目录下
|
||||
config.optimization.splitChunks({
|
||||
chunks: 'all',
|
||||
cacheGroups: {
|
||||
libs: {
|
||||
name: 'chunk-libs',
|
||||
test: /[\\/]node_modules[\\/]/,
|
||||
priority: 10,
|
||||
chunks: 'initial' // only package third parties that are initially dependent
|
||||
},
|
||||
elementUI: {
|
||||
name: 'chunk-elementUI', // split elementUI into a single package
|
||||
test: /[\\/]node_modules[\\/]_?element-ui(.*)/, // in order to adapt to cnpm
|
||||
priority: 20 // the weight needs to be larger than libs and app or it will be packaged into libs or app
|
||||
},
|
||||
commons: {
|
||||
name: 'chunk-commons',
|
||||
test: resolve('src/components'), // can customize your rules
|
||||
minChunks: 3, // minimum common number
|
||||
priority: 5,
|
||||
reuseExistingChunk: true
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
config.optimization.runtimeChunk('single'),
|
||||
{
|
||||
from: path.resolve(__dirname, './public/robots.txt'), //防爬虫文件
|
||||
to: './' //到根目录下
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user