系统管理

This commit is contained in:
ym1026
2025-09-05 16:40:35 +08:00
parent c778e4a300
commit c1cce63c85
24 changed files with 2220 additions and 411 deletions

View File

@@ -360,8 +360,6 @@ defineExpose({ ...toRefs(data), loading, mountedScroll, scroll: data.scroll })
}
//表格样式
:deep(.ant-table-tbody) {
color: var(--theme-text-default) !important;
> tr {
&:hover {
> .ant-table-cell {

View File

@@ -0,0 +1,720 @@
<!-- item.type:xxxx-unshow:表示不显示 items.displayFlag为false表示不展示卡片 -->
<template>
<div class="card-content">
<a-card
style="margin: 0 0 15px 0; text-align: left"
>
<div :class="['info-title', items.title ? '' : 'title-none']">
<div class="box">
<div >
{{ items.title ? items.title : '基础信息' }}
</div>
<a-tooltip
placement="bottomLeft"
trigger="['hover','click']"
:overlay-style="{ color: '#ccc' }"
v-if="items.tooltip && items.tooltip !== ''"
>
<template #title>
<!-- -->
<span v-html="items.tooltip"></span>
</template>
<ExclamationCircleOutlined
:style="{
fontSize: '18px',
color: 'var(--theme-text3)',
cursor: 'pointer',
position: 'relative',
top: '0',
left: '15px'
}"
/>
</a-tooltip>
</div>
</div>
<div class="info-content">
<a-form
layout="horizontal"
:wrap="true"
ref="formRef"
:rules="props.formRules"
name="info-form"
class="info-form"
label-align="left"
:model="propsInfo.ruleForm.value"
@submit="handleSubmit"
@onFieldsChange="onFieldsChange"
>
<template v-for="item in items.list">
<div
v-if="item.type !== 'unshow'"
:key="item.key"
:class="item.className ? [item.className, 'item-div'] : 'item-div'"
>
<a-form-item
:label="item.label"
:name="item.key"
:class="[item.colStatus || item.type === 'table' ? 'item-width' : 'form-item']"
:tooltip="item.tooltip ? item.tooltip : ''"
>
<a-input-password
v-if="item.type === 'input-password'"
v-model:value="propsInfo.ruleForm.value[item.key]"
:placeholder="'请输入' + item.label"
:disabled="!props.disabled && type ? !!item.disabled : props.disabled"
/>
<a-input
v-if="item.type === 'input'"
v-model:value="propsInfo.ruleForm.value[item.key]"
:type="item.inputType"
:placeholder="'请输入' + item.label"
:disabled="!props.disabled && type ? !!item.disabled : props.disabled"
/>
<a-input-number
v-if="item.type == 'input-number'"
id="inputNumber"
v-model:value="propsInfo.ruleForm.value[item.key]"
:min="item.min || 0"
:max="item.max || 10000000"
:formatter="item.formatter || null"
:addon-before="item.addonBefore"
:disabled="props.disabled"
/>
<a-date-picker
v-if="item.type === 'date-picker'"
v-model:value="propsInfo.ruleForm.value[item.key]"
:placeholder="'请输入' + item.label"
:disabled="props.disabled"
value-format="YYYY-MM-DD HH:mm:ss"
/>
<a-date-picker
show-time
v-if="item.type === 'time'"
value-format="YYYY-MM-DD HH:mm:ss"
:disabled="props.disabled"
v-model:value="propsInfo.ruleForm.value[item.key]"
:placeholder="'请输入' + item.label"
/>
<a-range-picker
v-if="item.type === 'date-time'"
v-model:value="propsInfo.ruleForm.value[item.key]"
value-format="YYYY-MM-DD HH:mm:ss"
:disabled="props.disabled"
show-time
/>
<a-time-range-picker
v-if="item.type === 'timeRangePicker'"
v-model:value="propsInfo.ruleForm.value[item.key]"
value-format="HH:mm"
format="HH:mm"
:disabled="props.disabled"
/>
<a-time-picker
v-if="item.type === 'timePicker'"
v-model:value="propsInfo.ruleForm.value[item.key]"
value-format="HH:mm"
format="HH:mm"
:disabled="props.disabled"
/>
<a-textarea
v-if="item.type === 'textarea'"
v-model:value="propsInfo.ruleForm.value[item.key]"
:placeholder="'请输入' + item.label"
allow-clear
:disabled="!props.disabled && type ? !!item.disabled : props.disabled"
:auto-size="item.autoSize ? item.autoSize : { minRows: 3, maxRows: 10 }"
/>
<a-select
:dropdown-match-select-width="false"
v-if="item.type === 'select'"
v-model:value="propsInfo.ruleForm.value[item.key]"
:placeholder="'请选择' + item.label"
:disabled="!props.disabled && type ? !!item.disabled : props.disabled"
allow-clear
>
<a-select-option
:value="selectItem.value"
v-for="selectItem in item.list"
:key="selectItem.value"
>
{{ selectItem.label }}
</a-select-option>
</a-select>
<!-- 下拉多选 -->
<a-select
:dropdown-match-select-width="false"
v-if="item.type === 'selectMultiple'"
mode="multiple"
v-model:value="propsInfo.ruleForm.value[item.key]"
:placeholder="'请选择' + item.label"
:disabled="!props.disabled && type ? !!item.disabled : props.disabled"
allow-clear
>
<a-select-option
:value="selectItem.value"
v-for="selectItem in item.list"
:key="selectItem.value"
>
{{ selectItem.label }}
</a-select-option>
</a-select>
<!-- 新增时disabled -->
<a-select
:dropdown-match-select-width="false"
v-if="item.type === 'select-disabled'"
v-model:value="propsInfo.ruleForm.value[item.key]"
:placeholder="'请选择' + item.label"
:disabled="!props.disabled ? item.disabled : props.disabled"
allow-clear
>
<a-select-option
:value="selectItem.value"
v-for="selectItem in item.list"
:key="selectItem.value"
>
{{ selectItem.label }}
</a-select-option>
</a-select>
<!-- 下拉展示icon -->
<a-select
v-if="item.type === 'icon-select'"
:get-popup-container="(triggerNode) => triggerNode.parentNode"
v-model:value="propsInfo.ruleForm.value[item.key]"
allow-clear
option-label-prop="children"
>
<a-select-option
v-for="icon in iconList"
:key="icon.icon_id"
:value="`icon-${icon.font_class}`"
>
<i
class="iconfont"
:class="`icon-${icon.font_class}`"
style="margin-right: 8px"
></i>
<span> {{ icon.name }} </span>
</a-select-option>
</a-select>
<a-switch
v-if="item.type === 'switch'"
v-model:checked="propsInfo.ruleForm.value[item.key]"
style="margin-bottom: 5px"
:disabled="!props.disabled && type ? !!item.disabled : props.disabled"
/>
<a-radio-group
name="radioGroup"
v-model:value="propsInfo.ruleForm.value[item.key]"
v-if="item.type === 'radio'"
:disabled="props.disabled"
>
<a-radio
:value="radioItem.value"
v-for="radioItem in item.list"
:key="radioItem.value"
>
{{ radioItem.label }}
</a-radio>
</a-radio-group>
<a-tree-select
:disabled="props.disabled"
v-model:value="propsInfo.ruleForm.value[item.key]"
v-if="item.type === 'tree-radio'"
style="width: 100%"
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
:tree-data="item.list"
:placeholder="'请选择' + item.label"
:field-names="
item.replaceFields
? item.replaceFields
: {
children: 'children',
title: 'title',
key: 'key',
value: 'value'
}
"
/>
<a-tree-select
:allow-clear="true"
:disabled="props.disabled"
v-if="item.type === 'tree-check'"
v-model:value="propsInfo.ruleForm.value[item.key]"
style="width: 100%"
:tree-data="item.list"
:tree-checkable="true"
:show-checked-strategy="SHOW_PARENT"
:placeholder="'请选择' + item.label"
:field-names="
item.replaceFields
? item.replaceFields
: {
children: 'children',
title: 'title',
key: 'key',
value: 'value'
}
"
:check="checkTree"
/>
<a-tree-select
:allow-clear="true"
:disabled="props.disabled"
v-if="item.type === 'tree-check-org'"
v-model:value="propsInfo.ruleForm.value[item.key]"
style="width: 100%"
:tree-data="item.list"
allow-clear
multiple
tree-default-expand-all
:placeholder="'请选择' + item.label"
:field-names="
item.replaceFields
? item.replaceFields
: {
children: 'children',
title: 'title',
key: 'key',
value: 'value'
}
"
:check="checkTree"
/>
<a-cascader
:disabled="props.disabled"
v-if="item.type === 'cascader'"
:options="item.list"
:field-names="
item.fieldNames
? item.fieldNames
: { label: 'label', value: 'value', children: 'children' }
"
:show-search="{ filter }"
:placeholder="'请选择' + item.label"
v-model:value="propsInfo.ruleForm.value[item.key]"
change-on-select
>
</a-cascader>
<a-checkbox
v-if="item.type === 'checkbox'"
v-model:checked="propsInfo.ruleForm.value[item.key]"
>
</a-checkbox>
<div v-if="item.type === 'tag'" class="table-css">
<a-tag :color="propsInfo.ruleForm.value[item.key] ? 'green' : 'red'">
{{ item.list[propsInfo.ruleForm.value[item.key]] }}
</a-tag>
</div>
<!-- </a-col>-->
<!-- <a-button v-if="item.type === 'btn'" @click="btnClick(item)">{{ item.title }}</a-button> -->
<div v-if="item.type === 'table'" class="table-css">
<slot :name="item.type" v-bind="item"></slot>
</div>
<div v-if="item.type === 'treetable'" class="table-css">
<slot :name="item.type" v-bind="item"></slot>
</div>
<div v-if="item.type === 'slot'">
<slot
:name="item.slotName"
v-bind="{ ...item, ...propsInfo.ruleForm.value }"
></slot>
</div>
</a-form-item>
</div>
</template>
<!-- <a-form-item
v-for="item in items.list"
:key="item.key"
:label="item.label"
:name="item.key"
:class="[item.colStatus ? 'item-width' : 'form-item']"
> -->
</a-form>
</div>
</a-card>
</div>
</template>
<script setup>
import { UserOutlined, InfoCircleOutlined, ExclamationCircleOutlined } from '@ant-design/icons-vue'
import {
ref,
reactive,
defineProps,
defineEmits,
watch,
toRefs,
onMounted,
defineExpose
} from 'vue'
import { TreeSelect } from 'ant-design-vue'
import iconfonts from '../assets/iconfont/iconfont.json'
import validateRulesObj from '../utils/decorator'
const iconList = iconfonts.glyphs
const formRef = ref()
const props = defineProps({
items: {
type: Object,
required: () => []
},
formRules: {
type: Object
},
ruleForm: {
type: Object
},
disabled: {
type: Boolean
},
type: {
type: Boolean,
default: false
}
})
const propsInfo = toRefs(props)
const exposeRuleForm = propsInfo.ruleForm.value
onMounted(() => {})
const emit = defineEmits(['handlerClick'])
const data = reactive({
validateRulesObj,
newRuleForm: {},
// : {},
key: 0,
tableIndex: null,
tableInfo: [],
// tableIndex: 0,
mockData: [{}],
targetKeys: [],
// 单选-树节点
treeRadioValue: null,
treeData: [
{ id: 1, pId: 0, value: '1', title: 'Expand to load' },
{ id: 2, pId: 0, value: '2', title: 'Expand to load' },
{ id: 3, pId: 0, value: '3', title: 'Tree Node', isLeaf: true }
],
treeCheckValue: null,
SHOW_PARENT: TreeSelect.SHOW_PARENT,
loading: false,
imageUrl: ''
})
const extraInformation = ref(
'Cron表达式由6个(或7个)字段组成,分别表示秒、分、小时、月中的日期、月份、星期中的日期(以及可选的年份)。每个字段可以包含以下字符:·星号(*):表示该字段可以接受任何值、·问号(?):通常用于""星期”字段,表示不指定值,即表示“无特定值”。·连字符(-):用于指定范围,如"10-12表示101112·逗号():用于指定多个值MON,WED,FRI表示星期一星期三和星期五·斜杠(/):0/15015·L:""()W:()15W15#:6#3Cron:"0012**?12'
)
watch(
() => props.formRules,
(nVal, o) => {
for (const key in nVal) {
nVal[key].forEach((item) => {
if (item.validatorType) {
item.validator = data.validateRulesObj[item.validatorType]?.rules[0].validator
}
})
}
},
{ deep: true, immediate: true }
)
function checkTree(checkedKeys, e) {}
// 按钮的点击事件
function btnClick(item) {
emit('handlerClick', item)
}
function confirm() {
return new Promise((resolve, reject) => {
if (formRef.value) {
formRef.value
.validate()
.then(() => {
resolve(true)
})
.catch((error) => {
console.log('error', error)
resolve(false)
})
}
})
}
function handleReset() {
if (formRef.value) {
formRef.value.resetFields()
}
}
function switchChange(checked, switchItem) {
propsInfo.ruleForm.value[switchItem.key] = checked
}
function RadioChange(e, radioItem) {
const { value } = e.target
propsInfo.ruleForm.value[radioItem.key] = value
}
function transferChange(targetKeys, transferItem) {
data.targetKeys = targetKeys
propsInfo.ruleForm.value[transferItem.key] = data.targetKeys
}
function transferSearch(dir, value) {}
// 单选-树节点
function genTreeNode(parentId, isLeaf = false) {
const random = Math.random().toString(36).substring(2, 6)
return {
id: random,
pId: parentId,
value: random,
title: isLeaf ? 'Tree Node' : 'Expand to load',
isLeaf
}
}
function onLoadTree(treeNode) {
return new Promise((resolve) => {
const { id } = treeNode.dataRef
setTimeout(() => {
data.treeData = data.treeData.concat([
data.genTreeNode(id, false),
data.genTreeNode(id, true)
])
resolve()
}, 300)
})
}
function treeChange(key, value, node, extra) {
propsInfo.ruleForm.value[key] = value
}
// 级联选择器
function cascaderChange(value, cascaderItem) {
propsInfo.ruleForm.value[cascaderItem.key] = value
}
function filter(inputValue, path) {
return path.some((option) => option.label.toLowerCase().indexOf(inputValue.toLowerCase()) > -1)
}
function avatarUploadChange(info) {
if (info.file.status === 'uploading') {
data.loading = true
return
}
if (info.file.status === 'done') {
getBase64(info.file.originFileObj, (imageUrl) => {
data.imageUrl = imageUrl
data.loading = false
})
}
}
function onFieldsChange() {}
function handleSubmit() {}
function getBase64(img, callback) {
const reader = new FileReader()
reader.addEventListener('load', () => callback(reader.result))
reader.readAsDataURL(img)
}
// 主动暴露方法
defineExpose({
confirm,
handleReset,
ruleForm: exposeRuleForm
})
</script>
<style lang="scss" scoped>
.allHeight {
height: 100%;
}
.card-content:first-child {
margin-top: 0px;
}
.card-content {
margin-top: 15px;
}
:deep(.ant-timeline) {
color: var(--theme-text-default) !important;
.ant-timeline-item-tail {
border-inline-start: 2px solid var(--theme-text-default) !important;
}
}
:deep(.ant-form-item .ant-form-item-label > label) {
color: var(--theme-text-default) !important;
}
.info-title {
font-size: 18px;
font-weight: 530;
color: var(--theme-text-default);
text-align: left;
border-bottom: 1.5px solid var(--theme-bg);
margin-bottom: 20px;
.box {
color:#fff;
width:230px;
display: flex;
align-items: center;
margin-bottom: 10px;
border-bottom: 5px solid transparent;
border-image: url('../assets/boxBottom.png') 0 0 100% 0 stretch;
div:last-child {
height: 25px;
line-height: 25px;
}
}
:deep(.a-tooltip) {
color: var(--theme-text3);
}
:deep(.ant-divider) {
color: var(--theme-bg);
}
}
// :deep(.ant-table-wrapper) {
// :deep(.ant-input) {
// background: red !important;
// }
// }
.title-none {
display: none;
}
:deep(.ant-card){
background-color: transparent;
}
:deep(.ant-card-body) {
padding: 15px;
height: 100%;
border-radius: 8px;
.ant-form {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
height: 100%;
.item-l,
.item-div {
height: 100%;
}
}
}
.ant-card-bordered {
border: none;
}
.info-content {
height: calc(100% - 30px);
.info-form {
.item-div {
width:45%;
display: inline-block;
}
.item-l{
width:100%;
}
.form-item {
width:320px!important;
}
}
}
:deep(.ant-form-item-label) {
color:#fff;
font-size: 16px !important;
width:100px;
}
:deep(.ant-form-item-control-wrapper) {
flex: 1;
}
.editable-row-operations a {
margin-right: 8px;
}
// 表格中的按钮
:deep(.ant-table-cell) {
.ant-btn {
height: 24px !important;
color: #fff;
}
.ant-btn-dangerous {
background: var(--theme-btn2) !important;
}
.btn-del {
background: var(--theme-btn2);
}
.btn-add {
background: var(--theme-btn3);
}
.btn-upload,
.btn-downTemplate {
background: var(--theme-btn1);
}
}
:deep(.ant-calendar-picker) {
width: 100% !important;
}
:deep(.ant-picker) {
width: 100% !important;
}
:deep(.ant-form-item.form-item) {
padding: 0px !important;
padding-right: 20px !important;
}
:deep(.ant-checkbox-disabled + span) {
color: var(--theme-text-default) !important;
}
:deep(textarea.ant-input) {
background-color: var(--theme-bg) !important;
border: none !important;
color: var(--theme-text-default) !important;
}
:deep(.ant-checkbox-wrapper) {
color: var(--theme-text-default);
}
</style>

View File

@@ -0,0 +1,373 @@
<template>
<div class="editCom">
<template v-for="(detailInfo, index) in detailInfos" :key="index">
<DetailInfo
:items="detailInfo"
:rule-form="detailInfo.ruleForm"
:form-rules="formRules"
:ref="'detailInfo' + index"
:disabled="disabled"
>
<template #role_id="item">
<a-select
:dropdown-match-select-width="false"
v-model:value="detailInfo.ruleForm[item.key]"
:placeholder="'请选择' + item.label"
:disabled="disabled"
allow-clear
>
<a-select-option
:value="selectItem.role_id"
v-for="selectItem in roleIdList"
:key="selectItem.role_id"
>
{{ selectItem.name }}
</a-select-option>
</a-select>
</template>
<template #treetable="item">
<TreeTable
:columns="item.columns"
:table-data="item.tableData"
ref="treeTable"
:transfer-dialog="transferDialog"
@handleDetailPagesizeChange="handleDetailPagesizeChange"
:table-option="{
checkStrictly: false,
selectTableData: item.selectTableData,
scroll: { y: 500 }
}"
>
<template #isQuery="record">
<a-tag :color="record.isQuery ? 'green' : 'red'">{{
record.isQuery ? '启用' : '禁用'
}}</a-tag>
</template>
<template #isEdit="record">
<a-tag :color="record.isEdit ? 'green' : 'red'">{{
record.isEdit ? '启用' : '禁用'
}}</a-tag>
</template>
<template #isControl="record">
<a-tag :color="record.isControl ? 'green' : 'red'">{{
record.isControl ? '启用' : '禁用'
}}</a-tag>
</template>
</TreeTable>
</template>
</DetailInfo>
</template>
<div style="display: flex; justify-content: center; gap: 20px">
<a-button @click="handleback">取消</a-button>
<a-button @click="handleConfirm" type="primary" :disabled="disabled">确认</a-button>
</div>
</div>
</template>
<script>
import { userOptions, userFormRules,
roleOptions,roleFormRules,
stationOptions,stationFormRules
} from '../../public/config/columnList'
import DetailInfo from './DetailInfo.vue'
import { postReq, getReq } from '@/request/api'
const dictionary = {
menu: '菜单',
file: '文件',
role: '角色',
permission: '权限',
account: '账户',
log: '日志',
server: '服务',
computer: '主机'
}
export default {
name: '',
components: { DetailInfo },
props: {
action: {
type: String,
default: ''
},
type: {
type: String,
default: ''
},
record: {
type: Object,
default: () => {}
}
},
data() {
return {
tip: '正在加载...',
roleIdList: [],
transferDialog: false,
detailInfos: [],
disabled: true,
formRules: {},
apiMethods: {
// menu: 'menuConfirm',
// permission: 'permissionConfirm',
user: 'userConfirm',
role: 'roleConfirm',
},
form: {},
ObjInfo: {},
loading: false
}
},
computed: {},
watch: {
action: {
handler(n) {
if (n === 'read') {
this.disabled = true
} else {
this.disabled = false
}
},
immediate: true
},
type: {
async handler(n) {
switch (n) {
case 'user':
this.detailInfos = userOptions
this.formRules = userFormRules
break
case 'menu':
// this.detailInfos = menuOptions
// this.formRules = menuFormRules
break
case 'permission':
// this.detailInfos = permissionOptions
// this.formRules = permissionFormRules
break
case 'role':
this.detailInfos = roleOptions
this.formRules = roleFormRules
break
case 'station':
this.detailInfos = stationOptions
this.formRules = stationFormRules
break
default:
break
}
},
immediate: true
}
},
mounted() {
this.getRoleIdList()
},
methods: {
async getRoleIdList() {
const params = {
page_size: 1000,
page: 1
}
try {
const res = await getReq('/queryRoleList', params)
if (res.errcode === 0) {
this.roleIdList = res.data
} else {
const err = { tip: res.errmsg }
throw err
}
} catch (error) {
this.roleIdList = []
//统一处理报错提示
}
},
handleChange(value) {
this.ip = ''
this.selectComputer = value.option
this.selectComputer.id = value.option.value
this.ipList = this.getIpOptions(this.selectComputer.id)
},
handleDetailPagesizeChange(val) {
this.detailInfos[val[1]].list[0].detailPaginationOption = {
...this.detailInfos[val[1]].list[0].detailPaginationOption,
...val[0]
}
if (this.detailInfos[val[1]].list[0].key === 'servebiaoge') {
// 应用信息中消息模板需要通过接口调用数据
let arr = {
ids: this.clickId,
pageIndex: val[0].current,
pageSize: val[0].pageSize
}
}
},
handleRemove(file) {
const index = this.fileList.indexOf(file)
this.fileList.splice(index, 1)
},
beforeUpload(file, fileList) {
this.fileList = [...this.fileList, file]
return false
},
// 调用子组件的表单的方法
async handleConfirm() {
const result = []
const { length } = this.detailInfos
for (let index = 0; index < length; index++) {
// 校验规则
const res = await this.$refs[`detailInfo${index}`][0].confirm()
result.push(res)
if (!res) {
break
}
}
if (result.every((item) => item == true)) {
this.handleSubmit()
}
},
handleSubmit() {
const { length } = this.detailInfos
let form = {}
for (let index = 0; index < length; index++) {
if (this.$refs[`detailInfo${index}`][0].ruleForm) {
form = Object.assign(this.$refs[`detailInfo${index}`][0].ruleForm, form)
} else {
console.log('对象为空')
}
}
this.form = form
eval('this.' + this.apiMethods[this.type] + '()')
},
async userConfirm() {
try {
const menuApi = {
add: '/insertUser',
edit: '/updateUser'
}
const paramsDate = {
...this.form
}
if (this.action == 'edit') {
paramsDate.user_id = this.record.user_id
}
const res = await postReq(menuApi[this.action], paramsDate)
if (res.errcode === 0) {
setTimeout(() => {
this.handleback()
}, 1000)
} else {
throw res
}
} catch (error) {
console.log(error, 'userConfirm')
}
},
async roleConfirm() {
try {
const menuApi = {
add: '/insertRole',
edit: '/deleteRole'
}
const paramsDate = {
...this.form
}
if (this.action == 'edit') {
paramsDate.role_id = this.record.role_id
}
const res = await postReq(menuApi[this.action], paramsDate)
if (res.errcode === 0) {
setTimeout(() => {
this.handleback()
}, 1000)
} else {
throw res
}
} catch (error) {
console.log(error, 'roleConfirm')
}
},
async stationConfirm() {
try {
const menuApi = {
add: '/insertStation',
edit: '/updateStation'
}
const paramsDate = {
...this.form
}
if (this.action == 'edit') {
paramsDate.station_id = this.record.station_id
}
const res = await postReq(menuApi[this.action], paramsDate)
if (res.errcode === 0) {
setTimeout(() => {
this.handleback()
}, 1000)
} else {
throw res
}
} catch (error) {
console.log(error, 'stationConfirm')
}
},
handleback() {
this.$emit('operateForm', 'back')
},
getObjIds(selectKeys) {
const ids = []
for (let i = 0; i < selectKeys.length; i++) {
ids.push({ id: selectKeys[i] })
}
return ids
}
}
}
</script>
<style lang="scss" scoped>
.editCom {
// height:400px;
}
.ant-upload-select-picture-card i {
font-size: 32px;
color: #999;
}
.ant-upload-select-picture-card .ant-upload-text {
margin-top: 8px;
color: #666;
}
.detail-header {
display: flex;
span,
div {
margin: 10px;
}
}
:deep(.ant-picker) {
color: var(--theme-text-default) !important;
}
</style>

View File

@@ -132,7 +132,7 @@ export default {
station_id: this.stationId,
category: 0
}
const res = await getReq('/api/queryStatTotal', query)
const res = await getReq('/queryStatTotal', query)
if (res.errcode === 0) {
this.modalInfo.allTotal = res.data
this.modalInfo.allTotal.runDays = getRunDays(res.data.launch_date)
@@ -153,7 +153,7 @@ export default {
const query = {
station_id: this.stationId,
}
const res = await getReq('/api//queryStationInfo', query)
const res = await getReq('//queryStationInfo', query)
if (res.errcode === 0) {
this.modalInfo.prefabTotal = res.data
} else {
@@ -177,7 +177,7 @@ export default {
end_date: getDateDaysAgo(0)
}
const categoryObj = { 1: 'energy' }
const res = await getReq('/api/queryStatDayList', query)
const res = await getReq('/queryStatDayList', query)
if (res.errcode === 0) {
this.modalInfo[categoryObj[category]] = res.data.map((item) => {
const { income_charge: incomeCharge, income_elect: incomeElect } = item

View File

@@ -6,8 +6,9 @@
v-for="item in operateList"
:key="item.type"
type="primary"
style="margin-right: 5px"
:class="['operateCol', item.type]"
size="small"
style="margin-right: 10px"
:class="`btn-${item.type}`"
:disabled="item.disabled"
@click="munuClick(item.type)"
>{{ item.label }}
@@ -59,49 +60,7 @@ export default {
</script>
<style lang="scss" scoped>
.moreIcon{
color:#fff !important
}
:deep(.ant-btn) {
padding: 0px 7px !important;
height: 24px !important;
font-size: 13px !important;
letter-spacing: -1px;
border-radius: 4px;
& > span + .anticon {
margin-inline-start: 4px;
}
}
:deep(.ant-btn-primary) {
box-shadow: none !important;
background: var(--theme-btn3);
}
:deep(.ant-btn,.ant-btn-primary){
&:hover{
opacity: 0.9;
}
&:disabled{
color: rgba(255,255,255,0.5);
}
}
.operate{
display: flex;
justify-content: center;
}
.operateCol {
background: var(--theme-btn3);
&.more {
background: var(--theme-btn1);
}
&.del {
background: var(--theme-btn2);
}
}
.ant-dropdown .ant-dropdown-menu{
background-color:var(--theme-opert-bg)!important;
}
</style>

View File

@@ -192,6 +192,7 @@ input:-internal-autofill-selected {
color: var(--theme-text-default) !important;
}
.search {
height:70px;
color: #fff;
display: flex;
flex-direction: column;