封装table组件,封装上传组件,修改消息发布,修改bug
| | |
| | | <template> |
| | | <div class="Table"> |
| | | <div class="datatable"> |
| | | <el-table ref="multipleTable" :data="tableData" style="width: 100%" |
| | | :header-cell-style="{background:'#06122c','font-size':'12px',color:'#4b9bb7','font-weight':'650','line-height':'45px'}" |
| | | :row-class-name="tableRowClassName"> |
| | | <el-table-column type="selection" :min-width="5"> |
| | | </el-table-column> |
| | | <el-table-column v-for="(item,idx) in option.group" :key="item.prop" :label="item.label" :prop="item.prop" |
| | | :min-width="item['min-width'] ? item['item.min-width']:'10'"> |
| | | <el-table-column v-for="(item,idx) in option.group" :key="item.prop" :label="item.label" |
| | | :prop="item.prop" :min-width="item['min-width'] ? item['item.min-width']:'10'"> |
| | | <template slot-scope="scope"> |
| | | <div v-if="item.type === 'text'"> |
| | | {{scope.row[item.prop]}} |
| | | </div> |
| | | <div v-else class="operationBox"> |
| | | <slot v-else name="operation" :info="scope"> |
| | | <div class="operationBox"> |
| | | <div class="divider" v-for="(child,index) in item.children" :key="child.operationName"> |
| | | <span @click="backMykey(scope.$index,child.mykey)">{{child.operationName}}</span> |
| | | <el-divider direction="vertical" v-if="index !== item.children.length-1"></el-divider> |
| | | <!-- @click="backMykey(scope.$index,child.mykey)" --> |
| | | <span>{{child.operationName}}</span> |
| | | <el-divider direction="vertical" v-if="index !== item.children.length-1"> |
| | | </el-divider> |
| | | </div> |
| | | </div> |
| | | </slot> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <!-- tools --> |
| | | <div class="tools"> |
| | | <div class="funs"> |
| | | <div class="funsItem sp-item"> |
| | | <el-checkbox v-model="all" @change="selectAll()">全选</el-checkbox> |
| | | </div> |
| | | <div class="funsItem sp-item"> |
| | | <el-checkbox v-model="unsame" @change="disSame(tableData)">反选</el-checkbox> |
| | | </div> |
| | | <div class="funsItem"> |
| | | <el-select v-model="myIdx" placeholder="批量操作" @change="selectChange"> |
| | | <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" |
| | | :disabled="item.disabled"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | <div class="pagination"> |
| | | <el-pagination background :current-page="currentPage" layout="prev, pager, next" :total="myTotalNum" |
| | | :page-size="pageSize" @current-change="changeCurrentPage"> |
| | | </el-pagination> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <script> |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | |
| | | myTotalNum: null, |
| | | pageSize: 2, |
| | | currentPage: 1, |
| | | all: false, |
| | | unsame: false, |
| | | myIdx: null, |
| | | options: [ |
| | | { |
| | | value: 1, |
| | | label: '批量启用', |
| | | }, |
| | | { |
| | | value: 2, |
| | | label: '批量禁用', |
| | | }, |
| | | { |
| | | value: 3, |
| | | label: '批量删除', |
| | | } |
| | | ], |
| | | tempList: [] |
| | | } |
| | | }, |
| | | props: { |
| | | // 表格数据 |
| | | tableData: { |
| | | type: Array, |
| | | dafault: () => [], |
| | | }, |
| | | // 表头、prop、类型 |
| | | tableOption: { |
| | | type: Object, |
| | | default: () => { } |
| | | }, |
| | | // 弹窗 |
| | | openDialog:{ |
| | | type:Function, |
| | | default:()=>{()=>{console.log(1)}} |
| | | default: () => {} |
| | | }, |
| | | // 获取当前页 |
| | | getCurrentPage:{ |
| | | type: Function, |
| | | default: () => {} |
| | | }, |
| | | // 分页总数 |
| | | totalNum:{ |
| | | type:Number, |
| | | default:1 |
| | | } |
| | | }, |
| | | created(){ |
| | | this.myTotalNum = JSON.parse(JSON.stringify(this.totalNum)); |
| | | }, |
| | | computed: { |
| | | option() { |
| | |
| | | } |
| | | return ''; |
| | | }, |
| | | // 获取点击的关键字 |
| | | backMykey(index,value){ |
| | | this.$emit('openDialog',{index,mykey:value}) |
| | | // 当前页改变触发事件 |
| | | changeCurrentPage(page) { |
| | | this.currentPage = page; |
| | | this.$emit('getCurrentPage',page); |
| | | }, |
| | | // 全选 |
| | | selectAll() { |
| | | this.$refs.multipleTable.toggleAllSelection(); |
| | | }, |
| | | // 反选 |
| | | disSame(list) { |
| | | list.forEach(row => { |
| | | this.$refs.multipleTable.toggleRowSelection(row) |
| | | }) |
| | | }, |
| | | // 分页下拉框批量操作 |
| | | async selectChange(list) { |
| | | console.log(this.tempList); |
| | | if (this.tempList.length !== 0) { |
| | | if (list === 3) { |
| | | await this.handleDelete(this.tempList); |
| | | } else if (list === 2) { |
| | | await this.mulUpdateStatus(this.tempList, 0); |
| | | } else { |
| | | await this.mulUpdateStatus(this.tempList, 1); |
| | | } |
| | | this.myIdx = null; |
| | | } else { |
| | | this.myIdx = null; |
| | | this.$message({ |
| | | type: 'warning', |
| | | message: '您还没选中任何数据', |
| | | }) |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .Table { |
| | | width: 100%; |
| | | |
| | | .el-table{ |
| | | color: #4b9bb7; |
| | | } |
| | | .tools { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | padding: 0 20px; |
| | | |
| | | .funs { |
| | | display: flex; |
| | | .sp-item{ |
| | | border: 1px solid #17324c; |
| | | } |
| | | .funsItem { |
| | | line-height: 28px; |
| | | display: flex; |
| | | align-items: center; |
| | | border-radius: 4px; |
| | | font-size: 12px; |
| | | margin-left: 10px; |
| | | |
| | | .el-checkbox { |
| | | width: 80px; |
| | | padding: 0 10px; |
| | | } |
| | | |
| | | .el-select { |
| | | width: 120px; |
| | | } |
| | | |
| | | &::v-deep .el-input__inner { |
| | | border: none; |
| | | background-color: #09152f; |
| | | } |
| | | |
| | | &:hover .el-checkbox { |
| | | color: #4b9bb7; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | .pagination { |
| | | margin-top: 50px; |
| | | display: flex; |
| | | line-height: 50px; |
| | | justify-content: center; |
| | | |
| | | .el-pagination { |
| | | |
| | | &::v-deep li, |
| | | &::v-deep .btn-prev, |
| | | &::v-deep .btn-next { |
| | | background-color: #071f39; |
| | | color: #4b9bb7; |
| | | } |
| | | |
| | | &::v-deep .active { |
| | | background-color: #409eff; |
| | | color: #fff; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | &::v-deep .warning-row { |
| | | background-color: #06122c; |
| | |
| | | &::v-deep .success-row { |
| | | background-color: #071f39; |
| | | } |
| | | |
| | | .operationBox{ |
| | | display: flex; |
| | | } |
| | | |
| | | .el-divider{ |
| | | background-color: #4b9bb7; |
| | | } |
New file |
| | |
| | | <template> |
| | | <div class="my-upload"> |
| | | <el-upload :file-list="fileList" class="upload-demo" action="/sccg/file/medias" :multiple="multiple" |
| | | :show-file-list="flag" :before-upload="beforeUpload" :limit="limit" :on-success="handleSuccess" |
| | | :on-error="handleError" :list-type="listType" :headers="getToken()"> |
| | | <div class="upload-btn" :style="{'height':btnHeight,'width':btnWidth}"> |
| | | <i class="el-icon-plus"></i> |
| | | <span>上传图片</span> |
| | | </div> |
| | | </el-upload> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | // 文件列表 |
| | | fileList: [], |
| | | // 是否显示文件列表 |
| | | flag: true, |
| | | // 多选 |
| | | multiple: false, |
| | | // 限制 |
| | | limit: 50, |
| | | // 按钮高度 |
| | | btnHeight: '120px', |
| | | // 按钮宽度 |
| | | btnWidth: '120px', |
| | | // 文件列表类型 |
| | | listType: 'picture-card' |
| | | }; |
| | | }, |
| | | methods: { |
| | | // 上传之前回调 |
| | | beforeUpload(rawFile) { |
| | | console.log(rawFile); |
| | | if (rawFile.type !== 'image/png' && rawFile.type !== 'image/svg+xml' && rawFile.type !== 'image/jpg' && rawFile.type !== 'image/jpeg') { |
| | | this.$message.error('图片必须是 jpg/svg/jpeg/png 格式!') |
| | | return false |
| | | } else if (rawFile.size / 105 / 105 > 2) { |
| | | this.$message.error('上传图片不能超过 2MB!') |
| | | return false |
| | | } |
| | | return true |
| | | }, |
| | | // 上传成功回调 |
| | | handleSuccess(res, file, filelist) { |
| | | console.log(res); |
| | | }, |
| | | // 上传失败回调 |
| | | handleError(err, file, fileList) { |
| | | console.log(err); |
| | | }, |
| | | // 获取token |
| | | getToken() { |
| | | const token = sessionStorage.getItem('token'); |
| | | const tokenHead = sessionStorage.getItem('tokenHead'); |
| | | if (token && tokenHead) { |
| | | return { Authorization: tokenHead + token } |
| | | } |
| | | } |
| | | }, |
| | | props: { |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .my-upload { |
| | | .upload-demo { |
| | | display: flex; |
| | | } |
| | | |
| | | :deep(.el-upload--picture-card) { |
| | | width: 120px; |
| | | height: 120px; |
| | | } |
| | | :deep(.el-upload-list__item){ |
| | | width: 120px; |
| | | height: 120px; |
| | | } |
| | | .upload-btn { |
| | | // background-color: rgba(249, 249, 249, 1); |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: center; |
| | | align-items: center; |
| | | border-radius: 4px; |
| | | |
| | | &:hover i{ |
| | | color: #409eff; |
| | | } |
| | | |
| | | i { |
| | | font-size: 30px; |
| | | font-weight: 650; |
| | | } |
| | | |
| | | span { |
| | | line-height: 22px; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | component: () => import('@/views/systemSetting/baseSetting/role') |
| | | }, |
| | | { |
| | | path: 'authority', |
| | | name: 'authority', |
| | | component: () => import('@/views/systemSetting/baseSetting/authority') |
| | | }, |
| | | { |
| | | path: 'department', |
| | | name: 'department', |
| | | component: () => import('@/views/systemSetting/baseSetting/department') |
| | |
| | | name: 'illegalBuild', |
| | | component: () => import('@/views/operate/baseSetting/illegalBuild'), |
| | | }, |
| | | { |
| | | path: "threepack", |
| | | name: 'threepack', |
| | | component: () => import('@/views/operate/baseSetting/threepack'), |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | |
| | | position: absolute; |
| | | top: 60px; |
| | | width: 120px; |
| | | |
| | | z-index: 3000; |
| | | .user-card__item { |
| | | padding: 5px 0; |
| | | |
| | |
| | | top: 60px; |
| | | width: 180px; |
| | | left: -50px; |
| | | |
| | | z-index: 3000; |
| | | :deep(.el-card__body) { |
| | | padding: 0; |
| | | } |
| | |
| | | </template> |
| | | <script> |
| | | import MyMap from '@/components/map' |
| | | import {parseTime} from '@/utils/index' |
| | | import { validateName, validatePhone, validateCardId, validateNum } from '@/utils/validate' |
| | | export default { |
| | | components: { |
| | |
| | | that.$axios({ |
| | | method: 'post', |
| | | url: 'sccg/base_case/addition_illegal_building', |
| | | data: ill, |
| | | data: { |
| | | ...ill, |
| | | alarmTime:parseTime(ill.alarmTime) |
| | | }, |
| | | }) |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | |
| | | <MyIll v-if="newAddType === 1" :refresh="getUserList" :mytype=newAddType |
| | | @changeDialog=changeDialog /> |
| | | <!-- 违规登记 --> |
| | | <myVio v-else :mytype=newAddType @changeDialog=changeDialog :refresh="getUserList" /> |
| | | <myVio v-else :refresh="getUserList" :mytype=newAddType @changeDialog=changeDialog /> |
| | | </el-dialog> |
| | | </div> |
| | | </div> |
| | |
| | | <span>{{scope.row.eventSource === 2 ? '人工上报' : '视频上传'}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column :prop="mystatus === 1 ? 'category' :'category'" :label="mystatus===1 ? '大类名称' : '违建类别'" :min-width="mystatus===1?'10':'20'"> |
| | | <el-table-column :prop="mystatus === 1 ? 'category' :'category'" |
| | | :label="mystatus===1 ? '大类名称' : '违建类别'" :min-width="mystatus===1?'10':'15'"> |
| | | </el-table-column> |
| | | <el-table-column :prop="mystatus === 1 ? 'type' :'site'" :label="mystatus===1 ? '小类名称' : '违建地点'" min-width="10"> |
| | | <el-table-column :prop="mystatus === 1 ? 'type' :'site'" :label="mystatus===1 ? '小类名称' : '违建地点'" |
| | | min-width="10"> |
| | | </el-table-column> |
| | | <el-table-column :prop="mystatus === 1 ? 'actionCause' :'communityId'" :label="mystatus===1 ? '案由' : '所属社区'" min-width="10"> |
| | | <el-table-column :prop="mystatus === 1 ? 'actionCause' :'communityId'" |
| | | :label="mystatus===1 ? '案由' : '所属社区'" min-width="10"> |
| | | </el-table-column> |
| | | <el-table-column :prop="mystatus === 1 ? 'site' :''" :label="mystatus===1 ? '报警点位' : '违法建筑长、宽、高'" :min-width="mystatus===1?'10' :'20' "> |
| | | <el-table-column :prop="mystatus === 1 ? 'site' :''" :label="mystatus===1 ? '报警点位' : '违法建筑长、宽、高'" |
| | | :min-width="mystatus===1?'10' :'20' "> |
| | | <template slot-scope="scope"> |
| | | <div v-if="mystatus ===2"><span>{{scope.row.buildingLength+'米'+'、'+ scope.row.buildingWidth+'米'+'、'+scope.row.buildingHigh+'米'}}</span></div> |
| | | <div v-if="mystatus ===2"><span>{{scope.row.buildingLength+'米'+'、'+ |
| | | scope.row.buildingWidth+'米'+'、'+scope.row.buildingHigh+'米'}}</span></div> |
| | | <div v-else>{{scope.row.site}}</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column :prop="mystatus === 1 ? 'street' :'buildingArea'" :label="mystatus===1 ? '所属区域' : '违法建筑面积'" min-width="10"> |
| | | <el-table-column :prop="mystatus === 1 ? 'street' :'buildingArea'" |
| | | :label="mystatus===1 ? '所属区域' : '违法建筑面积'" min-width="10"> |
| | | </el-table-column> |
| | | <el-table-column prop="alarmTime" label="报警时间" min-width="15" v-if="mystatus===1"> |
| | | <template slot-scope="scope"> |
| | | <span>{{filterTime(scope.row.alarmTime)}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column :prop="mystatus === 1 ? 'continueTime' :'materials'" :label="mystatus===1 ? '持续时间' : '违法建筑材料'" min-width="10"> |
| | | <el-table-column :prop="mystatus === 1 ? 'continueTime' :'materials'" |
| | | :label="mystatus===1 ? '持续时间' : '违法建筑材料'" min-width="10"> |
| | | </el-table-column> |
| | | <el-table-column prop="operation" label="操作" min-width="20"> |
| | | <template slot-scope="scope"> |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | main { |
| | | background-color: #09152f; |
| | | margin-top: 20px; |
| | |
| | | |
| | | .funs { |
| | | display: flex; |
| | | |
| | | .funs-sp{ |
| | | border: 1px solid #17324c; |
| | | } |
| | | |
| | | .funsItem { |
| | | line-height: 28px; |
| | | display: flex; |
| | |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | | } |
| | | |
| | | .operation { |
| | | display: flex; |
| | | |
| | |
| | | <template> |
| | | <div class="law-enforcement"> |
| | | <MyTable :tableData="list" :tableOption="tableOption" @openDialog="changeDialog"> |
| | | <!-- table表格展示 --> |
| | | <MyTable |
| | | :tableData="list" |
| | | :tableOption="tableOption" |
| | | :totalNum="totalNum" |
| | | @getCurrentPage="getCurrentPage" |
| | | @openDialog="changeDialog"> |
| | | <template #operation="{info}"> |
| | | <div class="btn"> |
| | | <!-- 操作区域 --> |
| | | <!-- {{getData(info)}} --> |
| | | <span @click="dataView(info)">查看</span> |
| | | </div> |
| | | </template> |
| | | </MyTable> |
| | | <!-- 组件区 --> |
| | | <!-- 弹窗 --> |
| | | <div class="dialog"> |
| | | <el-dialog v-if="visible" :visible.async="visible" title="问题登记" width="60%" :before-close="handleClose"> |
| | | <MyView :viewData=showData /> |
| | |
| | | ] |
| | | }, |
| | | visible:false, |
| | | totalNum:'', |
| | | showData:{}, |
| | | } |
| | | }, |
| | | created(){ |
| | | this.totalNum = this.list.length; |
| | | }, |
| | | methods:{ |
| | | // 关闭对话框 |
| | |
| | | console.log(index,mykey); |
| | | this.showData = this.list[index]; |
| | | this.visible = true; |
| | | }, |
| | | // 数据展示 |
| | | dataView(data) { |
| | | console.log(data); |
| | | }, |
| | | // 获取当前页数据 |
| | | getCurrentPage(current){ |
| | | console.log(current); |
| | | } |
| | | } |
| | | } |
| | |
| | | </div> |
| | | <div class="message-status"> |
| | | <span>操作类型:</span> |
| | | <el-select v-model="operationType" style="margin-left:20px"> |
| | | <el-select v-model="operationType"> |
| | | <el-option v-for="item in operationTypeList" :key="item.id" :label="item.operationType" |
| | | :value="item.operationType"> |
| | | </el-option> |
| | |
| | | </div> |
| | | <div class="message-kind"> |
| | | <span>时间范围:</span> |
| | | <el-input placeholder="选择时间范围" v-model="timeArea"></el-input> |
| | | <el-date-picker v-model="mytime" type="daterange" range-separator="-" start-placeholder="开始日期" |
| | | end-placeholder="结束日期"> |
| | | </el-date-picker> |
| | | <!-- <el-input placeholder="选择时间范围" v-model="timeArea"></el-input> --> |
| | | </div> |
| | | <div class="find"> |
| | | <el-button type="primary" icon="el-icon-search" @click="setTableData">查询</el-button> |
| | |
| | | </div> |
| | | </div> |
| | | <!-- 数据展示 --> |
| | | <el-table ref="multipleTable" |
| | | <el-table ref="multipleTable" :default-sort="{prop: 'createTime'}" |
| | | :header-cell-style="{background:'#06122c','font-size':'12px',color:'#4b9bb7','font-weight':'650','line-height':'45px'}" |
| | | :data="tableData" style="width: 100%" :row-class-name="tableRowClassName" |
| | | :data="tableData" style="width: 100%" @sort-change="sortTime" :row-class-name="tableRowClassName" |
| | | @selection-change="tableChange"> |
| | | <el-table-column type="selection" min-width="5"> |
| | | </el-table-column> |
| | | <el-table-column prop="createTime" label="日志时间" min-width="10"> |
| | | <el-table-column prop="createTime" sortable label="日志时间" min-width="10"> |
| | | <template slot-scope="scope"> |
| | | <span>{{changeTime(scope.row.createTime)}}</span> |
| | | </template> |
| | |
| | | label: '批量删除', |
| | | } |
| | | ], |
| | | mysort: 0, |
| | | tempList: [], |
| | | timeArea: '', |
| | | operationType: '全部', |
| | | operationTypeList: [], |
| | | mytime: '', |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | current: currentPage, |
| | | size: pageSize, |
| | | }); |
| | | let fileName = arr.headers['content-disposition']; |
| | | console.log(fileName); |
| | | if (fileName) { |
| | | fileName = fileName.slice(fileName.indexOf('filename=') + 9); |
| | | } |
| | | const blob = new Blob([arr.data], { |
| | | type: 'application/octet-stream' |
| | | }) |
| | |
| | | const href = window.URL.createObjectURL(blob) |
| | | downloadElement.href = href |
| | | // // 下载后文件名 |
| | | // downloadElement.download = '日志报告'+'.xlsx' |
| | | downloadElement.download = fileName |
| | | document.body.appendChild(downloadElement) |
| | | // 点击下载 |
| | | downloadElement.click() |
| | |
| | | // 获取操作类型 |
| | | async getOperationType() { |
| | | let arr = await this.getLogsOperationType(); |
| | | console.log(arr); |
| | | arr.data.data.unshift({ id: 0, operationType: '全部' }) |
| | | return arr.data.data; |
| | | }, |
| | |
| | | this.tableData = arr.records; |
| | | this.totalNum = arr.total |
| | | }, |
| | | // 时间排序 |
| | | sortTime({ column, prop, order }) { |
| | | if (order === 'ascending') { |
| | | this.mysort = 0 |
| | | } else { |
| | | this.mysort = 1 |
| | | } |
| | | this.setTableData(); |
| | | }, |
| | | // 获取日志数据 |
| | | async getLogList() { |
| | | const { currentPage, pageSize, context, operationType } = this; |
| | | const { currentPage, pageSize, context, operationType, mysort } = this; |
| | | let arr = await this.getLogsList({ |
| | | content: context, |
| | | current: currentPage, |
| | | endTime: '', |
| | | id: '', |
| | | operationType: operationType === '全部' ? '' : operationType, |
| | | portEqulpment: '', |
| | | portEquipment: '', |
| | | size: pageSize, |
| | | startTime: '', |
| | | sort: mysort |
| | | }) |
| | | console.log(arr) |
| | | return arr.data.data; |
| | | }, |
| | | // 批量下拉框操作 |
| | |
| | | if (index === 1) { |
| | | this.setTableData(); |
| | | } |
| | | }, |
| | | // |
| | | timechange(data) { |
| | | console.log(data); |
| | | } |
| | | } |
| | | } |
| | |
| | | .message-kind { |
| | | display: flex; |
| | | justify-content: flex-start; |
| | | |
| | | span { |
| | | align-items: center; |
| | | flex: 1; |
| | | } |
| | | |
| | | .el-input { |
| | | flex: 2; |
| | | flex: 1; |
| | | color: #1d3f57; |
| | | |
| | | &::v-deep .el-input__inner { |
| | | background-color: #09152f; |
| | | border: 1px solid #17324c; |
| | | } |
| | | } |
| | | .el-select{ |
| | | flex: 1; |
| | | } |
| | | .el-date-editor{ |
| | | flex: 1; |
| | | } |
| | | :deep(.el-range-input){ |
| | | background-color: #09152f; |
| | | } |
| | | |
| | | } |
| | |
| | | margin-top: -2px; |
| | | |
| | | .el-button { |
| | | padding: 12px 25px; |
| | | padding: 10px 20px; |
| | | border-radius: 20px; |
| | | } |
| | | } |
| | |
| | | <!-- 提醒方式 --> |
| | | <el-form-item class="optionItem" label="提醒方式:" prop="channelCode"> |
| | | <el-radio-group v-model="role.channelCode"> |
| | | <el-radio :label="1">站内信</el-radio> |
| | | <el-radio :label="2">邮件</el-radio> |
| | | <el-radio :label="3">短信</el-radio> |
| | | <el-radio label="01">站内信</el-radio> |
| | | <el-radio label="02">邮件</el-radio> |
| | | <el-radio label="03">短信</el-radio> |
| | | </el-radio-group> |
| | | <span class="message-tip">(短信可用数: 1000条)</span> |
| | | </el-form-item> |
| | |
| | | targetTo: '', |
| | | targetFrom:null, |
| | | body: '', |
| | | channelCode: 1, |
| | | channelCode: '01', |
| | | }, |
| | | createRoleRules: { |
| | | messageType: [ |
| | |
| | | </div> |
| | | <div class="message-status"> |
| | | <span>消息状态:</span> |
| | | <el-input placeholder="请输入内容" v-model="context"></el-input> |
| | | <el-select v-model="messageStatus" placeholder="请选择消息状态"> |
| | | <el-option v-for="item in statusList" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="message-kind"> |
| | | <span>消息分类:</span> |
| | | <el-input placeholder="请输入内容" v-model="context"></el-input> |
| | | <el-select v-model="messageStatus" placeholder="请选择消息分类"> |
| | | <el-option v-for="item in statusList" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="find"> |
| | | <el-button type="primary" icon="el-icon-search">查询</el-button> |
| | |
| | | <span>{{changeTime(scope.row)}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="targetFrom" label="发布人员" min-width="10"> |
| | | <el-table-column prop="targetFrom" label="发布人员" min-width="15"> |
| | | </el-table-column> |
| | | <el-table-column prop="channelCode" label="消息分类" min-width="10"> |
| | | <template slot-scope="scope"> |
| | |
| | | label: '批量删除', |
| | | } |
| | | ], |
| | | tempList: [] |
| | | tempList: [], |
| | | messageStatus: 0, |
| | | messageKind: 0, |
| | | statusList: [ |
| | | { |
| | | label: '全部', |
| | | value: 0, |
| | | }, |
| | | { |
| | | label: '未发布', |
| | | value: 1, |
| | | }, |
| | | { |
| | | label: '已发布', |
| | | value: 2, |
| | | } |
| | | ], |
| | | kindList: [ |
| | | { |
| | | label: '全部', |
| | | value: 0, |
| | | }, |
| | | { |
| | | label: '全部', |
| | | value: 0, |
| | | }, |
| | | { |
| | | label: '全部', |
| | | value: 0, |
| | | }, |
| | | ] |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | <template> |
| | | <div class="userList"> |
| | | <div class="headerTitle"> |
| | | 运营管理》基础设置》违规事项设置 |
| | | 运营管理》我的待办 |
| | | </div> |
| | | <header> |
| | | <div class="headerContent"> |
| | |
| | | <el-button type="primary" @click="getUserList">查询</el-button> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="addUser"> |
| | | <el-button class="addBtn" type="primary" @click="dialogCreate = true">新增违规类型</el-button> |
| | | <el-dialog :visible.sync="dialogCreate" title="新增违规类型" width="45%" v-if="dialogCreate" |
| | | :before-close="handleClose"> |
| | | <createUser :refresh="getUserList" /> |
| | | </el-dialog> |
| | | </div> --> |
| | | </div> |
| | | </header> |
| | | <main> |
| | |
| | | <el-table-column prop="category" label="问题小类" min-width="10"> |
| | | </el-table-column> |
| | | <el-table-column prop="eventSource" label="问题描述" min-width="10"> |
| | | <template slot-scope="scope"> |
| | | <span>{{scope.row.eventSource===1 ? '违规': '违建'}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="createTime" label="创建时间" min-width="10"> |
| | | </el-table-column> |
| | |
| | | <span>{{getRestTime(scope.row.limitTime)}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="type" label="问题状态" min-width="10"> |
| | | <el-table-column prop="stepName" label="问题状态" min-width="10"> |
| | | </el-table-column> |
| | | <el-table-column min-width="10"> |
| | | </el-table-column> |
| | |
| | | </el-table-column> |
| | | <el-table-column prop="sort" label="角色类型" min-width="10"> |
| | | </el-table-column> |
| | | <el-table-column prop="adminCount" label="默认角色" min-width="10"> |
| | | </el-table-column> |
| | | <!-- <el-table-column prop="adminCount" label="默认角色" min-width="10"> |
| | | </el-table-column> --> |
| | | <el-table-column prop="description" label="备注" min-width="10"> |
| | | </el-table-column> |
| | | <el-table-column prop="status" label="启用" min-width="5"> |
| | |
| | | placeholder="请输入用户密码"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="item-right">重新输入密码即为修改,密码有效期默认为3个月</div> |
| | | <div class="item-right"></div> |
| | | <!-- 重新输入密码即为修改,密码有效期默认为3个月 --> |
| | | </div> |
| | | <!-- 所属用户姓名 --> |
| | | <div class="user-item"> |
| | |
| | | data() { |
| | | const validateNickname = (rule, value, callback) => { |
| | | if (!value) { |
| | | callback(new Error("用户名称不能为空")); |
| | | callback(new Error("所属姓名不能为空")); |
| | | } else { |
| | | callback(); |
| | | } |
| | |
| | | @selection-change="tableChange"> |
| | | <el-table-column type="selection" min-width="5"> |
| | | </el-table-column> |
| | | <el-table-column label="用户ID" min-width="4"> |
| | | <el-table-column label="用户ID" min-width="6"> |
| | | <template slot-scope="scope">{{ scope.row.id }}</template> |
| | | </el-table-column> |
| | | <el-table-column prop="nickName" label="用户名称" min-width="10"> |
| | |
| | | </el-switch> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="operation" label="操作" min-width="22"> |
| | | <el-table-column prop="operation" label="操作" min-width="20"> |
| | | <template slot-scope="scope"> |
| | | <div class="operation"> |
| | | <span @click="handleChangeRole(scope.row,'role')">修改角色</span> |
| | |
| | | font-size: 10px; |
| | | .operation { |
| | | display: flex; |
| | | |
| | | font-size: 10px; |
| | | .line { |
| | | padding: 0 5px; |
| | | padding: 0 1px; |
| | | } |
| | | |
| | | span:hover { |
| | |
| | | <template> |
| | | <div class="point"> |
| | | 111 |
| | | <MyUpload></MyUpload> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | // 引入上传组件 |
| | | import MyUpload from '@/components/myUpload' |
| | | export default { |
| | | components:{ |
| | | MyUpload |
| | | }, |
| | | data() { |
| | | return { |
| | | |
| | | } |
| | | } |
| | | } |
| | | </script> |