<template>
|
<div class="Basicinformation">
|
<div class="content">
|
<div class="checkbox">
|
<div
|
:class="['item', isactive == 1 ? 'isactive' : '']"
|
@click="changeactive(1)"
|
>
|
信息列表
|
</div>
|
<div
|
:class="['item', isactive == 2 ? 'isactive' : '']"
|
@click="changeactive(2)"
|
>
|
信息分类
|
</div>
|
</div>
|
<div class="serch">
|
<div class="time_box">
|
<div class="time">派工日期</div>
|
<el-date-picker
|
v-model="queryForm.selectTime"
|
prefix-icon="none"
|
clear-icon="none"
|
style="
|
font-size: 0.75rem !important;
|
border: 0.06rem solid rgba(222, 222, 222, 1);
|
border-radius: 0 0.25rem 0.25rem 0;
|
box-shadow: none;
|
width: 19rem;
|
height: 2rem;
|
border-left: 0;
|
"
|
format="YYYY-MM-DD HH:mm:ss"
|
type="datetimerange"
|
range-separator="~"
|
start-placeholder="起始日期"
|
end-placeholder="截止日期"
|
size="small"
|
/>
|
</div>
|
<div class="serch_box">
|
<div class="serchb">全局搜索</div>
|
<input
|
v-model="queryForm.selectName"
|
placeholder="请输入关键词搜索"
|
style="border-left: 0.06rem solid #e2e2e2"
|
/>
|
</div>
|
<el-button
|
type="primary"
|
size="small"
|
style="margin-left: 0.98rem; height: 2rem"
|
>查询</el-button
|
>
|
<el-button size="small" style="height: 2rem">重置</el-button>
|
</div>
|
<div class="btns">
|
<div style="display: flex; align-items: center">
|
<!-- 用户列表新建 -->
|
<el-button
|
v-if="isactive == 1"
|
type="primary"
|
size="small"
|
@click="dialogVisible = true"
|
style="
|
width: 5.5rem;
|
height: 2rem;
|
font-size: 0.88rem;
|
display: flex;
|
align-items: center;
|
"
|
><el-icon style="margin-right: 0.2rem"><Plus /></el-icon
|
>新建</el-button
|
>
|
<!-- 用户角色新建 -->
|
<el-button
|
v-if="isactive == 2"
|
type="primary"
|
size="small"
|
@click="dialogVisible1 = true"
|
style="
|
width: 5.5rem;
|
height: 2rem;
|
font-size: 0.88rem;
|
display: flex;
|
align-items: center;
|
"
|
><el-icon style="margin-right: 0.2rem"><Plus /></el-icon
|
>新建</el-button
|
>
|
<el-button
|
size="small"
|
style="width: 5.5rem; height: 2rem; font-size: 0.88rem"
|
>批量导入</el-button
|
>
|
<el-button
|
size="small"
|
style="width: 5.5rem; height: 2rem; font-size: 0.88rem"
|
>批量导出</el-button
|
>
|
<el-button
|
size="small"
|
style="width: 5.5rem; height: 2rem; font-size: 0.88rem"
|
>批量删除</el-button
|
>
|
</div>
|
</div>
|
<div style="margin-top: 1rem; height: 100%">
|
<!-- 信息列表 -->
|
<el-table
|
v-if="isactive == 1"
|
:data="tableData"
|
style="width: 100%"
|
:header-cell-style="{
|
background: 'rgba(250,250,250,1)',
|
color: '#101010',
|
fontSize: '0.88rem',
|
height: '3rem',
|
border: 'none',
|
}"
|
:row-style="{
|
color: '#101010',
|
fontSize: '0.88rem',
|
height: '3rem',
|
}"
|
>
|
<el-table-column type="selection" align="center" />
|
<el-table-column prop="address" label="信息名称" align="center" />
|
<el-table-column prop="name" label="规格型号" align="center" />
|
<el-table-column prop="address" label="单位" align="center" />
|
<el-table-column prop="address" label="所属分类" align="center" />
|
<el-table-column prop="address" label="创建日期" align="center" />
|
<el-table-column prop="address" label="操作" align="center">
|
<template #default="">
|
<el-button size="small" type="text" @click="Edit">编辑</el-button>
|
</template>
|
</el-table-column>
|
</el-table>
|
|
<!-- 信息分类 -->
|
<el-table
|
v-if="isactive == 2"
|
:data="tableData"
|
style="width: 100%"
|
:header-cell-style="{
|
background: 'rgba(250,250,250,1)',
|
color: '#101010',
|
fontSize: '0.88rem',
|
height: '3rem',
|
border: 'none',
|
}"
|
:row-style="{
|
color: '#101010',
|
fontSize: '0.88rem',
|
height: '3rem',
|
}"
|
>
|
<el-table-column type="selection" align="center" />
|
<el-table-column prop="address" label="分类名称" align="center" />
|
<el-table-column prop="address" label="备注" align="center" />
|
<el-table-column prop="address" label="创建日期" align="center" />
|
<el-table-column prop="address" label="操作" align="center">
|
<template #default="">
|
<span
|
style="color: blue; font-size: 0.88rem; cursor: pointer"
|
@click="Findtorque"
|
>编辑</span
|
>
|
</template></el-table-column
|
>
|
</el-table>
|
</div>
|
<div
|
style="
|
display: flex;
|
justify-content: right;
|
align-self: flex-end;
|
margin-bottom: 1.19rem;
|
margin-right: 1.25rem;
|
"
|
>
|
<el-pagination
|
size="small"
|
background
|
layout="prev, pager, next"
|
:total="1"
|
/>
|
</div>
|
</div>
|
|
<!-- 基础信息新建编辑弹出框 -->
|
<el-dialog
|
v-model="dialogVisible"
|
title=""
|
width="60%"
|
:before-close="handleClose"
|
:show-close="false"
|
:align-center="true"
|
>
|
<template #title>
|
<div
|
style="
|
height: 3.63rem;
|
display: flex;
|
border-bottom: 1px solid #e6e6e6;
|
"
|
>
|
<span
|
style="color: rgb(16, 16, 16); font-size: 1rem; font-weight: bold"
|
>基础信息</span
|
>
|
</div>
|
</template>
|
<el-form :model="form" label-width="auto" label-position="top">
|
<el-row :gutter="20">
|
<el-col :span="8">
|
<el-form-item>
|
<template #label>
|
<div style="display: flex; align-items: flex-end">
|
<span style="color: red; margin-right: 0.2rem">*</span>
|
<span
|
style="font-size: 0.88rem; color: black; font-weight: bold"
|
>信息名称</span
|
>
|
</div>
|
</template>
|
<el-input size="small" v-model="form.name" placeholder="请输入" />
|
</el-form-item>
|
</el-col>
|
<el-col :span="8">
|
<el-form-item>
|
<template #label>
|
<div style="display: flex; align-items: flex-end">
|
<span style="color: red; margin-right: 0.2rem">*</span>
|
<span
|
style="font-size: 0.88rem; color: black; font-weight: bold"
|
>规格型号</span
|
>
|
</div>
|
</template>
|
<el-input size="small" v-model="form.name" placeholder="请输入" />
|
</el-form-item>
|
</el-col>
|
<el-col :span="8">
|
<el-form-item>
|
<template #label>
|
<div style="display: flex; align-items: flex-end">
|
<span style="color: red; margin-right: 0.2rem">*</span>
|
<span
|
style="font-size: 0.88rem; color: black; font-weight: bold"
|
>信息单位</span
|
>
|
</div>
|
</template>
|
<el-input size="small" v-model="form.name" placeholder="请输入" />
|
</el-form-item>
|
</el-col>
|
</el-row>
|
<el-row :gutter="20">
|
<el-col :span="8">
|
<el-form-item>
|
<template #label>
|
<div style="display: flex; align-items: flex-end">
|
<span style="color: red; margin-right: 0.2rem">*</span>
|
<span
|
style="font-size: 0.88rem; color: black; font-weight: bold"
|
>所属分类</span
|
>
|
</div>
|
</template>
|
<el-select v-model="value" placeholder="请选择" size="small">
|
<el-option
|
v-for="item in options"
|
:key="item.value"
|
:label="item.label"
|
:value="item.value"
|
/>
|
</el-select>
|
</el-form-item>
|
</el-col>
|
<el-col :span="16">
|
<el-form-item>
|
<template #label>
|
<div style="display: flex; align-items: flex-end">
|
<span style="color: red; margin-right: 0.2rem">*</span>
|
<span
|
style="font-size: 0.88rem; color: black; font-weight: bold"
|
>备注</span
|
>
|
</div>
|
</template>
|
<el-input size="small" v-model="form.name" placeholder="请输入" />
|
</el-form-item>
|
</el-col>
|
</el-row>
|
</el-form>
|
<template #footer>
|
<div class="dialog-footer" style="text-align: center">
|
<el-button
|
size="small"
|
@click="dialogVisible = false"
|
style="height: 2rem; font-size: 0.88rem"
|
>取消</el-button
|
>
|
|
<el-button
|
size="small"
|
type="primary"
|
@click="dialogVisible = false"
|
style="height: 2rem; font-size: 0.88rem"
|
>
|
保存
|
</el-button>
|
</div>
|
</template>
|
</el-dialog>
|
|
<!-- 信息分类新建/编辑 -->
|
<el-dialog
|
v-model="dialogVisible1"
|
title=""
|
width="20%"
|
:before-close="handleClose"
|
:show-close="false"
|
:align-center="true"
|
>
|
<template #title>
|
<div
|
style="
|
height: 3.63rem;
|
display: flex;
|
border-bottom: 1px solid #e6e6e6;
|
"
|
>
|
<span
|
style="color: rgb(16, 16, 16); font-size: 1rem; font-weight: bold"
|
>信息分类</span
|
>
|
</div>
|
</template>
|
<el-form :model="form" label-width="auto" label-position="top">
|
<el-form-item>
|
<template #label>
|
<div style="display: flex; align-items: flex-end">
|
<span style="color: red; margin-right: 0.2rem">*</span>
|
<span style="font-size: 0.88rem; color: black; font-weight: bold"
|
>分类名称</span
|
>
|
</div>
|
</template>
|
<el-input
|
style="height: 2rem"
|
size="small"
|
v-model="form.name"
|
placeholder="请输入"
|
/>
|
</el-form-item>
|
<el-form-item>
|
<template #label>
|
<div style="display: flex; align-items: flex-end">
|
<span style="font-size: 0.88rem; color: black; font-weight: bold"
|
>备注</span
|
>
|
</div>
|
</template>
|
<el-input
|
type="textarea"
|
:rows="5"
|
size="small"
|
v-model="form.name"
|
placeholder="请输入"
|
/>
|
</el-form-item>
|
</el-form>
|
<template #footer>
|
<div class="dialog-footer" style="text-align: center">
|
<el-button
|
size="small"
|
@click="dialogVisible1 = false"
|
style="height: 2rem; font-size: 0.88rem"
|
>取消</el-button
|
>
|
|
<el-button
|
size="small"
|
type="primary"
|
@click="dialogVisible1 = false"
|
style="height: 2rem; font-size: 0.88rem"
|
>
|
保存
|
</el-button>
|
</div>
|
</template>
|
</el-dialog>
|
</div>
|
</template>
|
<script setup>
|
import { ref, reactive } from "vue";
|
import { ElMessage, ElMessageBox } from "element-plus";
|
const queryForm = reactive({
|
selectName: "",
|
selectTime: [], // 时间范围
|
});
|
|
const tableData = ref([]);
|
|
const options = ref([]);
|
const props = { multiple: true };
|
|
const table = ref(false);
|
const form = reactive({});
|
const isactive = ref(1);
|
const claimdialogVisible = ref(false);
|
const dialogVisible = ref(false);
|
const dialogVisible1 = ref(false);
|
const TorquedialogVisible = ref(false);
|
const activities = [
|
{
|
content: "1.1工前准备",
|
timestamp: "2018-04-15",
|
},
|
{
|
content: "2.1牵引电机电缆安装(仅动车转向架)",
|
timestamp: "2018-04-13",
|
},
|
{
|
content: "2.2牵引电机电缆安装(仅动车转向架)",
|
timestamp: "2018-04-11",
|
},
|
{
|
content: "2.3牵引电机电缆安装(仅动车转向架)",
|
timestamp: "2018-04-11",
|
},
|
{
|
content: "2.4牵引电机电缆安装(仅动车转向架)",
|
timestamp: "2018-04-11",
|
},
|
{
|
content: "2.4牵引电机电缆安装(仅动车转向架)",
|
timestamp: "2018-04-11",
|
},
|
{
|
content: "2.4牵引电机电缆安装(仅动车转向架)",
|
timestamp: "2018-04-11",
|
},
|
{
|
content: "2.4牵引电机电缆安装(仅动车转向架)",
|
timestamp: "2018-04-11",
|
},
|
{
|
content: "2.4牵引电机电缆安装(仅动车转向架)",
|
timestamp: "2018-04-11",
|
},
|
{
|
content: "2.4牵引电机电缆安装(仅动车转向架)",
|
timestamp: "2018-04-11",
|
},
|
{
|
content: "2.4牵引电机电缆安装(仅动车转向架)",
|
timestamp: "2018-04-11",
|
},
|
];
|
|
const changeactive = (index) => {
|
isactive.value = index;
|
};
|
function cancelClick() {
|
table.value = false;
|
}
|
function confirmClick() {
|
table.value = false;
|
}
|
// 查看详情
|
const Findmore = () => {
|
dialogVisible.value = true;
|
};
|
// 查看力矩
|
const Findtorque = () => {
|
TorquedialogVisible.value = true;
|
};
|
</script>
|
<style lang="scss" scoped>
|
.Basicinformation {
|
display: flex;
|
background-color: #fff;
|
.content {
|
width: 100%;
|
display: flex;
|
flex-direction: column;
|
.checkbox {
|
width: 11rem;
|
display: flex;
|
justify-content: space-between;
|
margin-top: 1rem;
|
margin-left: 1.31rem;
|
.item {
|
width: 5rem;
|
height: 1.88rem;
|
border-radius: 0.25rem;
|
background-color: rgba(190, 199, 209, 1);
|
color: rgba(255, 255, 255, 1);
|
font-size: 0.88rem;
|
text-align: center;
|
line-height: 1.88rem;
|
cursor: pointer;
|
}
|
.isactive {
|
background-color: rgba(16, 16, 16, 1);
|
color: rgba(255, 255, 255, 1);
|
}
|
}
|
.serch {
|
display: flex;
|
margin-top: 1.31rem;
|
align-items: center;
|
.time_box {
|
display: flex;
|
align-items: center;
|
text-align: center;
|
margin-left: 0.98rem;
|
.time {
|
box-sizing: border-box;
|
width: 6.88rem;
|
height: 2rem;
|
text-align: center;
|
border: 0.06rem solid rgba(222, 222, 222, 1);
|
border-radius: 0.25rem 0 0 0.25rem;
|
font-size: 0.75rem;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
}
|
}
|
.serch_box {
|
display: flex;
|
align-items: center;
|
text-align: center;
|
margin-left: 0.98rem;
|
border-radius: 0.38rem;
|
.serchb {
|
box-sizing: border-box;
|
width: 6.88rem;
|
height: 2rem;
|
text-align: center;
|
border: 0.06rem solid rgba(222, 222, 222, 1);
|
border-radius: 0.25rem 0 0 0.25rem;
|
font-size: 0.75rem;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
}
|
input {
|
box-sizing: border-box;
|
outline: none;
|
width: 19rem;
|
height: 2rem;
|
border: 0.06rem solid rgba(222, 222, 222, 1);
|
border-radius: 0 0.25rem 0.25rem 0;
|
padding-left: 0.3125rem;
|
font-size: 1rem;
|
}
|
}
|
}
|
.btns {
|
display: flex;
|
justify-content: space-between;
|
align-items: center;
|
margin-top: 1.31rem;
|
margin-left: 1.13rem;
|
padding-right: 2rem;
|
box-sizing: border-box;
|
}
|
}
|
.my-header {
|
height: 3.84rem;
|
display: flex;
|
justify-content: space-between;
|
border-bottom: 0.06rem solid rgba(233, 233, 233, 1);
|
}
|
.avatar-uploader .avatar {
|
width: 7rem;
|
height: 7rem;
|
display: block;
|
}
|
:deep(.avatar-uploader .el-upload) {
|
width: 7rem;
|
height: 7rem;
|
border: 0.0625rem dashed var(--el-border-color);
|
border-radius: 0.0375rem;
|
cursor: pointer;
|
position: relative;
|
overflow: hidden;
|
transition: var(--el-transition-duration-fast);
|
}
|
:deep(.el-upload-list__item) {
|
width: 7rem;
|
height: 7rem;
|
}
|
.avatar-uploader .el-upload:hover {
|
border-color: var(--el-color-primary);
|
}
|
|
.el-icon .avatar-uploader-icon {
|
font-size: 0.5rem;
|
color: #8c939d;
|
width: 0.81rem;
|
height: 0.81rem;
|
text-align: center;
|
}
|
}
|
</style>
|
<style>
|
.confirmButtonClass {
|
margin-right: 10px;
|
}
|
.el-message-box .el-message-box__btns {
|
flex-direction: row-reverse !important;
|
justify-content: normal !important;
|
}
|
</style>
|