Commit 4ddc94eb by 胡悦

first v0.0.1

1 parent 32f94c6f
...@@ -8,6 +8,9 @@ ...@@ -8,6 +8,9 @@
// 动画 // 动画
@import '~@/assets/style/animate/vue-transition.scss'; @import '~@/assets/style/animate/vue-transition.scss';
// 重置样式
// @import '~@/assets/style/reset.scss';
// 在这里写公用的class // 在这里写公用的class
// 注意 这个文件里只写class // 注意 这个文件里只写class
// mixin等内容请在 public.scss 里书写 // mixin等内容请在 public.scss 里书写
...@@ -21,6 +24,7 @@ ...@@ -21,6 +24,7 @@
.#{$prefix}-fl { .#{$prefix}-fl {
float: left; float: left;
} }
.#{$prefix}-fr { .#{$prefix}-fr {
float: right; float: right;
} }
...@@ -29,29 +33,85 @@ ...@@ -29,29 +33,85 @@
$sizes: (0, 5, 10, 15, 20); $sizes: (0, 5, 10, 15, 20);
@for $index from 1 to 6 { @for $index from 1 to 6 {
.#{$prefix}-m-#{nth($sizes, $index)} { margin: #{nth($sizes, $index)}px !important; } .#{$prefix}-m-#{nth($sizes, $index)} {
.#{$prefix}-mt-#{nth($sizes, $index)} { margin-top: #{nth($sizes, $index)}px !important; } margin: #{nth($sizes, $index)}px !important;
.#{$prefix}-mr-#{nth($sizes, $index)} { margin-right: #{nth($sizes, $index)}px !important; } }
.#{$prefix}-mb-#{nth($sizes, $index)} { margin-bottom: #{nth($sizes, $index)}px !important; }
.#{$prefix}-ml-#{nth($sizes, $index)} { margin-left: #{nth($sizes, $index)}px !important; } .#{$prefix}-mt-#{nth($sizes, $index)} {
margin-top: #{nth($sizes, $index)}px !important;
}
.#{$prefix}-mr-#{nth($sizes, $index)} {
margin-right: #{nth($sizes, $index)}px !important;
}
.#{$prefix}-mb-#{nth($sizes, $index)} {
margin-bottom: #{nth($sizes, $index)}px !important;
}
.#{$prefix}-ml-#{nth($sizes, $index)} {
margin-left: #{nth($sizes, $index)}px !important;
}
.#{$prefix}-p-#{nth($sizes, $index)} {
padding: #{nth($sizes, $index)}px !important;
}
.#{$prefix}-pt-#{nth($sizes, $index)} {
padding-top: #{nth($sizes, $index)}px !important;
}
.#{$prefix}-p-#{nth($sizes, $index)} { padding: #{nth($sizes, $index)}px !important; } .#{$prefix}-pr-#{nth($sizes, $index)} {
.#{$prefix}-pt-#{nth($sizes, $index)} { padding-top: #{nth($sizes, $index)}px !important; } padding-right: #{nth($sizes, $index)}px !important;
.#{$prefix}-pr-#{nth($sizes, $index)} { padding-right: #{nth($sizes, $index)}px !important; } }
.#{$prefix}-pb-#{nth($sizes, $index)} { padding-bottom: #{nth($sizes, $index)}px !important; }
.#{$prefix}-pl-#{nth($sizes, $index)} { padding-left: #{nth($sizes, $index)}px !important; } .#{$prefix}-pb-#{nth($sizes, $index)} {
padding-bottom: #{nth($sizes, $index)}px !important;
}
.#{$prefix}-pl-#{nth($sizes, $index)} {
padding-left: #{nth($sizes, $index)}px !important;
}
} }
// 快速使用 // 快速使用
.#{$prefix}-m { margin: 20px !important; } .#{$prefix}-m {
.#{$prefix}-mt { margin-top: 20px !important; } margin: 20px !important;
.#{$prefix}-mr { margin-right: 20px !important; } }
.#{$prefix}-mb { margin-bottom: 20px !important; }
.#{$prefix}-ml { margin-left: 20px !important; } .#{$prefix}-mt {
margin-top: 20px !important;
.#{$prefix}-p { padding: 20px !important; } }
.#{$prefix}-pt { padding-top: 20px !important; }
.#{$prefix}-pr { padding-right: 20px !important; } .#{$prefix}-mr {
.#{$prefix}-pb { padding-bottom: 20px !important; } margin-right: 20px !important;
.#{$prefix}-pl { padding-left: 20px !important; } }
.#{$prefix}-mb {
margin-bottom: 20px !important;
}
.#{$prefix}-ml {
margin-left: 20px !important;
}
.#{$prefix}-p {
padding: 20px !important;
}
.#{$prefix}-pt {
padding-top: 20px !important;
}
.#{$prefix}-pr {
padding-right: 20px !important;
}
.#{$prefix}-pb {
padding-bottom: 20px !important;
}
.#{$prefix}-pl {
padding-left: 20px !important;
}
td,
th {
padding: 0 !important;
}
.el-card__body {
padding: 5px;
}
.el-table .cell {
white-space: nowrap;
}
.el-input--small .el-input__inner {
height: 28px;
line-height: 28px;
}
.el-button--mini,
.el-button--mini.is-round {
padding: 6px 10px;
}
.el-pagination.is-background .btn-next,
.el-pagination.is-background .btn-prev,
.el-pagination.is-background .el-pager li {
min-width: 28px;
}
.el-pagination .el-select .el-input .el-input__inner {
height: 22px;
}
/* 框架的 样式 */
.d2-layout-header-aside-group .d2-layout-header-aside-content .d2-theme-header {
height: 36px !important;
}
.d2-layout-header-aside-group .d2-layout-header-aside-content .d2-theme-header .d2-header-right {
height: 36px !important;
}
.d2-layout-header-aside-group .d2-layout-header-aside-content .d2-theme-container .d2-theme-container-main .d2-theme-container-main-header .d2-multiple-page-control-group .d2-multiple-page-control-content .d2-multiple-page-control-content-inner .d2-multiple-page-control .el-tabs__nav .el-tabs__item {
height: 24px !important;
line-height: 24px !important;
}
.d2-layout-header-aside-group .d2-layout-header-aside-content .d2-theme-container .d2-theme-container-main .d2-theme-container-main-header .d2-multiple-page-control-group .d2-multiple-page-control-btn .el-button-group .el-button {
padding: 5px 15px !important;
}
.d2-layout-header-aside-group .d2-layout-header-aside-content .d2-theme-container .d2-theme-container-main .d2-theme-container-main-header {
height: 26px !important;
}
.el-tabs__item {
padding: 0 8px;
}
...@@ -8,7 +8,11 @@ ...@@ -8,7 +8,11 @@
<path d="M966.8023 256.17345 57.196677 256.17345c-31.397081 0-56.850799-25.452695-56.850799-56.849776l0 0c0-31.397081 25.452695-56.850799 56.850799-56.850799l909.605623 0c31.397081 0 56.849776 25.452695 56.849776 56.850799l0 0C1023.653099 230.720755 998.200404 256.17345 966.8023 256.17345z" <path d="M966.8023 256.17345 57.196677 256.17345c-31.397081 0-56.850799-25.452695-56.850799-56.849776l0 0c0-31.397081 25.452695-56.850799 56.850799-56.850799l909.605623 0c31.397081 0 56.849776 25.452695 56.849776 56.850799l0 0C1023.653099 230.720755 998.200404 256.17345 966.8023 256.17345z"
p-id="1694"></path> p-id="1694"></path>
</svg> --> </svg> -->
<div @click="click" class="hamburger" :class="{'is-active':isActive}"> <div
@click="click"
class="hamburger"
:class="{'is-active':isActive}"
>
<d2-el-icon name="s-fold" /> <d2-el-icon name="s-fold" />
</div> </div>
</template> </template>
...@@ -37,11 +41,13 @@ export default { ...@@ -37,11 +41,13 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
.hamburger { .hamburger {
height: 58px; height: 58px;
// height: 36px;
cursor: pointer; cursor: pointer;
transition: .38s; transition: 0.38s;
transform-origin: 50% 50%; transform-origin: 50% 50%;
i{ i {
line-height: 58px; line-height: 58px;
// line-height: 36px;
font-size: 28px; font-size: 28px;
} }
} }
......
<template> <template>
<d2-container> <d2-container>
<el-card shadow="never" slot="header"> <el-card
<el-form :inline="true" :model="formInline" class="demo-form-inline" size="small"> shadow="never"
slot="header"
>
<el-form
:inline="true"
:model="formInline"
class="demo-form-inline"
size="small"
>
<el-form-item label="属性"> <el-form-item label="属性">
<el-select v-model="formInline.belong" placeholder="请选择"> <el-select
<el-option value="" label="全部">全部</el-option> v-model="formInline.belong"
<el-option value="FA" label="工厂">工厂</el-option> placeholder="请选择"
<el-option value="WA" label="仓库">仓库</el-option> >
<el-option
value=""
label="全部"
>全部</el-option>
<el-option
value="FA"
label="工厂"
>工厂</el-option>
<el-option
value="WA"
label="仓库"
>仓库</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="工厂/仓库名"> <el-form-item label="工厂/仓库名">
<el-input v-model="formInline.name" placeholder="请输入工厂/仓库名" clearable/> <el-input
v-model="formInline.name"
placeholder="请输入工厂/仓库名"
clearable
/>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" :loading="tableLoading" @click="getList()">搜索</el-button> <el-button
type="primary"
size="mini"
icon="el-icon-search"
:loading="tableLoading"
@click="getList()"
>搜索</el-button>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-plus" :loading="tableLoading" @click="editInfo()">新建</el-button> <el-button
type="primary"
size="mini"
icon="el-icon-plus"
:loading="tableLoading"
@click="editInfo()"
>新建</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-card> </el-card>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<div class="table_box"> <div class="table_box">
<el-table v-loading="tableLoading" :data="tableData" stripe style="width: 100%" size="small" border> <el-table
<el-table-column type="index" :index="index => {return index+1}" label="序号" width="80" /> v-loading="tableLoading"
<el-table-column prop="name" label="工厂/仓库名称" :width="tdWidth" /> :data="tableData"
<el-table-column prop="belong" label="属性" :width="tdWidth"> stripe
style="width: 100%"
size="small"
border
>
<el-table-column
type="index"
:index="index => {return index+1}"
label="序号"
width="80"
/>
<el-table-column
prop="name"
label="工厂/仓库名称"
:width="tdWidth"
/>
<el-table-column
prop="belong"
label="属性"
:width="tdWidth"
>
<template slot-scope="scope">{{ BELONGTYPE[scope.row.belong] }}</template> <template slot-scope="scope">{{ BELONGTYPE[scope.row.belong] }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="address" label="地址" :width="tdWidth" /> <el-table-column
<el-table-column prop="mobile" label="电话" :width="tdWidth" /> prop="address"
<el-table-column prop="contacts" label="联系人" :width="tdWidth" /> label="地址"
<el-table-column prop="createdBy" label="创建人" :width="tdWidth" /> :width="tdWidth"
<el-table-column prop="createdDate" label="创建时间" :width="tdWidth"> />
<el-table-column
prop="mobile"
label="电话"
:width="tdWidth"
/>
<el-table-column
prop="contacts"
label="联系人"
:width="tdWidth"
/>
<el-table-column
prop="createdBy"
label="创建人"
:width="tdWidth"
/>
<el-table-column
prop="createdDate"
label="创建时间"
:width="tdWidth"
>
<template slot-scope="scope">{{ DATEFORMATE(scope.row.createdDate, 'YYYY-MM-DD HH:mm:ss') }}</template> <template slot-scope="scope">{{ DATEFORMATE(scope.row.createdDate, 'YYYY-MM-DD HH:mm:ss') }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="updatedDate" label="更新时间" :width="tdWidth"> <el-table-column
prop="updatedDate"
label="更新时间"
:width="tdWidth"
>
<template slot-scope="scope">{{ DATEFORMATE(scope.row.updatedDate, 'YYYY-MM-DD HH:mm:ss') }}</template> <template slot-scope="scope">{{ DATEFORMATE(scope.row.updatedDate, 'YYYY-MM-DD HH:mm:ss') }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="操作" label="操作" :width="tdWidth" fixed="right"> <el-table-column
prop="操作"
label="操作"
:width="tdWidth"
fixed="right"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" size="mini" @click="editInfo(scope.row)">修改</el-button> <el-button
type="primary"
size="mini"
plain
@click="editInfo(scope.row)"
>修改</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination_list"> <div class="pagination_list">
<el-pagination <el-pagination
small
background background
layout="sizes, total,prev, pager, next, jumper" layout="sizes, total,prev, pager, next, jumper"
:total="pageTotal" :total="pageTotal"
...@@ -60,7 +151,12 @@ ...@@ -60,7 +151,12 @@
<!-- 表格区域 end --> <!-- 表格区域 end -->
<!-- 新增工厂/仓库弹框 开始 --> <!-- 新增工厂/仓库弹框 开始 -->
<edit-fac :show="showAddDialog" v-if="showAddDialog" :info="info" @closed="closeAddDialog"/> <edit-fac
:show="showAddDialog"
v-if="showAddDialog"
:info="info"
@closed="closeAddDialog"
/>
<!-- 新增工厂/仓库弹框 结束 --> <!-- 新增工厂/仓库弹框 结束 -->
</d2-container> </d2-container>
...@@ -100,7 +196,7 @@ export default { ...@@ -100,7 +196,7 @@ export default {
}, },
mounted: function() { mounted: function () {
this.getList() this.getList()
}, },
methods: { methods: {
...@@ -108,7 +204,7 @@ export default { ...@@ -108,7 +204,7 @@ export default {
/** /**
* 查询列表 * 查询列表
*/ */
getList: function(current) { getList: function (current) {
const _this = this const _this = this
const oParams = _this.getParams() const oParams = _this.getParams()
console.log(current) console.log(current)
...@@ -134,7 +230,7 @@ export default { ...@@ -134,7 +230,7 @@ export default {
/** /**
* 获取查询参数 * 获取查询参数
*/ */
getParams: function() { getParams: function () {
const oParams = this.formInline const oParams = this.formInline
oParams.pageSize = this.pageSize oParams.pageSize = this.pageSize
return oParams return oParams
...@@ -143,7 +239,7 @@ export default { ...@@ -143,7 +239,7 @@ export default {
/** /**
* 每页展示 * 每页展示
*/ */
changePageSize: function(e) { changePageSize: function (e) {
this.pageSize = e this.pageSize = e
this.getList() this.getList()
}, },
...@@ -152,10 +248,10 @@ export default { ...@@ -152,10 +248,10 @@ export default {
/** /**
* 新增或修改工厂/仓库 * 新增或修改工厂/仓库
*/ */
editInfo: function(row){ editInfo: function (row) {
if(row){ if (row) {
this.info = row this.info = row
}else{ } else {
this.info = {} this.info = {}
} }
this.showAddDialog = true this.showAddDialog = true
...@@ -164,9 +260,9 @@ export default { ...@@ -164,9 +260,9 @@ export default {
/** /**
* 关闭新增弹出框 * 关闭新增弹出框
*/ */
closeAddDialog: function(isCancel){ closeAddDialog: function (isCancel) {
this.showAddDialog = false this.showAddDialog = false
if(isCancel){ if (isCancel) {
return return
} }
this.getList() this.getList()
...@@ -177,7 +273,7 @@ export default { ...@@ -177,7 +273,7 @@ export default {
</script> </script>
<style lang="scss"> <style lang="scss">
.table_box { .table_box {
margin: 20px 0; margin: 20px 0;
} }
</style> </style>
<template> <template>
<d2-container> <d2-container>
<el-card shadow="never" slot="header"> <el-card
<el-form :inline="true" :model="formInline" class="demo-form-inline" size="small"> shadow="never"
slot="header"
>
<el-form
:inline="true"
:model="formInline"
class="demo-form-inline"
size="small"
>
<el-form-item label="用户名称"> <el-form-item label="用户名称">
<el-input v-model="formInline.userName" placeholder="请输入用户名称" clearable/> <el-input
v-model="formInline.userName"
placeholder="请输入用户名称"
clearable
/>
</el-form-item> </el-form-item>
<el-form-item label="角色"> <el-form-item label="角色">
<el-select v-model="formInline.role" placeholder="请选择"> <el-select
<el-option value="" label="全部">全部</el-option> v-model="formInline.role"
<el-option value="1" label="入库">入库</el-option> placeholder="请选择"
<el-option value="2" label="出库">出库</el-option> >
<el-option
value=""
label="全部"
>全部</el-option>
<el-option
value="1"
label="入库"
>入库</el-option>
<el-option
value="2"
label="出库"
>出库</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" :loading="tableLoading" @click="getList()">搜索</el-button> <el-button
type="primary"
size="mini"
icon="el-icon-search"
:loading="tableLoading"
@click="getList()"
>搜索</el-button>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-plus" :loading="tableLoading" @click="showAddDialog = true">新建用户</el-button> <el-button
type="primary"
size="mini"
icon="el-icon-plus"
:loading="tableLoading"
@click="showAddDialog = true"
>新建用户</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-card> </el-card>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<div class="table_box"> <div class="table_box">
<el-table v-loading="tableLoading" :data="tableData" stripe style="width: 100%" size="small" border> <el-table
<el-table-column type="index" :index="index => {return index+1}" label="序号" width="80" /> v-loading="tableLoading"
<el-table-column prop="userName" label="用户名" /> :data="tableData"
<el-table-column prop="role" label="角色"> stripe
style="width: 100%"
size="small"
border
>
<el-table-column
type="index"
:index="index => {return index+1}"
label="序号"
width="80"
/>
<el-table-column
prop="userName"
label="用户名"
/>
<el-table-column
prop="role"
label="角色"
>
<template slot-scope="scope">{{ roleShow[scope.row.role] }}</template> <template slot-scope="scope">{{ roleShow[scope.row.role] }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="imsi" label="工厂/仓库名"> <el-table-column
prop="imsi"
label="工厂/仓库名"
>
<template slot-scope="scope">{{ scope.row.wareHouseInfo?scope.row.wareHouseInfo.name:'' }}</template> <template slot-scope="scope">{{ scope.row.wareHouseInfo?scope.row.wareHouseInfo.name:'' }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="createdBy" label="创建人" /> <el-table-column
<el-table-column prop="createdDate" label="创建时间"> prop="createdBy"
label="创建人"
/>
<el-table-column
prop="createdDate"
label="创建时间"
>
<template slot-scope="scope">{{ DATEFORMATE(scope.row.createdDate, 'YYYY-MM-DD HH:mm:ss') }}</template> <template slot-scope="scope">{{ DATEFORMATE(scope.row.createdDate, 'YYYY-MM-DD HH:mm:ss') }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="updatedDate" label="更新时间"> <el-table-column
prop="updatedDate"
label="更新时间"
>
<template slot-scope="scope">{{ DATEFORMATE(scope.row.updatedDate, 'YYYY-MM-DD HH:mm:ss') }}</template> <template slot-scope="scope">{{ DATEFORMATE(scope.row.updatedDate, 'YYYY-MM-DD HH:mm:ss') }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="sendMerchantNo" label="操作" width="120"> <el-table-column
prop="sendMerchantNo"
label="操作"
width="120"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" size="mini" @click="openResetPassword(scope.row)">重置密码</el-button> <el-button
type="primary"
size="mini"
plain
@click="openResetPassword(scope.row)"
>重置密码</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination_list"> <div class="pagination_list">
<el-pagination <el-pagination
background background
small
layout="sizes, total,prev, pager, next, jumper" layout="sizes, total,prev, pager, next, jumper"
:total="pageTotal" :total="pageTotal"
:page-size="pageSize" :page-size="pageSize"
...@@ -60,21 +136,50 @@ ...@@ -60,21 +136,50 @@
<!-- 表格区域 end --> <!-- 表格区域 end -->
<!-- 新增用户弹框 开始 --> <!-- 新增用户弹框 开始 -->
<add-cus :show="showAddDialog" v-if="showAddDialog" @closed="closeAddDialog"/> <add-cus
:show="showAddDialog"
v-if="showAddDialog"
@closed="closeAddDialog"
/>
<!-- 新增用户弹框 结束 --> <!-- 新增用户弹框 结束 -->
<!-- 重置密码弹框 开始 --> <!-- 重置密码弹框 开始 -->
<glsx-dialog title="重置密码" width="30%" :show="showPassDialog" usefooter v-on:closed="closePasslDialog"> <glsx-dialog
<el-form ref="passForm" :rules="formRules_pass" :model="form_pass" label-width="120px"> title="重置密码"
width="30%"
:show="showPassDialog"
usefooter
v-on:closed="closePasslDialog"
>
<el-form
ref="passForm"
:rules="formRules_pass"
:model="form_pass"
label-width="120px"
>
<el-form-item label="用户名:"> <el-form-item label="用户名:">
<el-input v-model="form_pass.userName" style="width:400px" disabled/> <el-input
v-model="form_pass.userName"
style="width:400px"
disabled
/>
</el-form-item> </el-form-item>
<el-form-item label="密码:" prop="password"> <el-form-item
<el-input v-model="form_pass.password" maxlength="50" style="width:400px" /> label="密码:"
prop="password"
>
<el-input
v-model="form_pass.password"
maxlength="50"
style="width:400px"
/>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer"> <div slot="footer">
<el-button type="primary" @click="resetPassword()">提交</el-button> <el-button
type="primary"
@click="resetPassword()"
>提交</el-button>
<el-button @click="showPassDialog = false">取消</el-button> <el-button @click="showPassDialog = false">取消</el-button>
</div> </div>
</glsx-dialog> </glsx-dialog>
...@@ -112,7 +217,7 @@ export default { ...@@ -112,7 +217,7 @@ export default {
}, },
showAddDialog: false, showAddDialog: false,
showPassDialog: false, showPassDialog: false,
form_pass : {}, form_pass: {},
formRules_pass: { formRules_pass: {
password: [ password: [
{ required: true, message: "请输入密码", trigger: "blur" } { required: true, message: "请输入密码", trigger: "blur" }
...@@ -124,7 +229,7 @@ export default { ...@@ -124,7 +229,7 @@ export default {
}, },
mounted: function() { mounted: function () {
this.getList() this.getList()
}, },
methods: { methods: {
...@@ -132,7 +237,7 @@ export default { ...@@ -132,7 +237,7 @@ export default {
/** /**
* 查询列表 * 查询列表
*/ */
getList: function(current) { getList: function (current) {
const _this = this const _this = this
const oParams = _this.getParams() const oParams = _this.getParams()
console.log(current) console.log(current)
...@@ -153,7 +258,7 @@ export default { ...@@ -153,7 +258,7 @@ export default {
/** /**
* 获取查询参数 * 获取查询参数
*/ */
getParams: function() { getParams: function () {
const oParams = this.formInline const oParams = this.formInline
oParams.pageSize = this.pageSize oParams.pageSize = this.pageSize
return oParams return oParams
...@@ -163,7 +268,7 @@ export default { ...@@ -163,7 +268,7 @@ export default {
/** /**
* 每页展示 * 每页展示
*/ */
changePageSize: function(e) { changePageSize: function (e) {
this.pageSize = e this.pageSize = e
this.getList() this.getList()
}, },
...@@ -171,7 +276,7 @@ export default { ...@@ -171,7 +276,7 @@ export default {
/** /**
* 重置密码操作 * 重置密码操作
*/ */
openResetPassword: function(row){ openResetPassword: function (row) {
this.userInfo = row this.userInfo = row
this.form_pass.userName = this.userInfo.userName this.form_pass.userName = this.userInfo.userName
this.showPassDialog = true this.showPassDialog = true
...@@ -180,7 +285,7 @@ export default { ...@@ -180,7 +285,7 @@ export default {
/** /**
* 关闭密码重置弹窗 * 关闭密码重置弹窗
*/ */
closePasslDialog: function(){ closePasslDialog: function () {
this.showPassDialog = false this.showPassDialog = false
this.getList() this.getList()
}, },
...@@ -188,7 +293,7 @@ export default { ...@@ -188,7 +293,7 @@ export default {
/** /**
* 重置密码 * 重置密码
*/ */
resetPassword: function() { resetPassword: function () {
let _this = this; let _this = this;
let _obj = _this.$refs.passForm; let _obj = _this.$refs.passForm;
_obj.validate(valid => { _obj.validate(valid => {
...@@ -198,7 +303,7 @@ export default { ...@@ -198,7 +303,7 @@ export default {
return false; return false;
} }
UPDATEPASSWORD(oParams).then(res => { UPDATEPASSWORD(oParams).then(res => {
if(res.returnCode == 0){ if (res.returnCode == 0) {
_this.$Util.Info({ _this.$Util.Info({
message: res.message, message: res.message,
type: "success" type: "success"
...@@ -212,9 +317,9 @@ export default { ...@@ -212,9 +317,9 @@ export default {
/** /**
* 关闭新增弹出框 * 关闭新增弹出框
*/ */
closeAddDialog: function(isCancel){ closeAddDialog: function (isCancel) {
this.showAddDialog = false this.showAddDialog = false
if(isCancel){ if (isCancel) {
return return
} }
this.getList() this.getList()
...@@ -226,7 +331,7 @@ export default { ...@@ -226,7 +331,7 @@ export default {
</script> </script>
<style lang="scss"> <style lang="scss">
.table_box { .table_box {
margin: 20px 0; margin: 20px 0;
} }
</style> </style>
<template> <template>
<d2-container> <d2-container>
<el-card shadow="never" slot="header"> <el-card
<el-form :inline="true" :model="formInline" class="demo-form-inline" size="small"> shadow="never"
slot="header"
>
<el-form
:inline="true"
:model="formInline"
class="demo-form-inline"
size="small"
>
<el-form-item label="设备类型"> <el-form-item label="设备类型">
<el-select v-model="formInline.deviceTypeId" placeholder="请选择"> <el-select
<el-option value label="全部">全部</el-option> v-model="formInline.deviceTypeId"
placeholder="请选择"
>
<el-option
value
label="全部"
>全部</el-option>
<el-option <el-option
v-for="item in deviceTypeList" v-for="item in deviceTypeList"
:key="item.id" :key="item.id"
...@@ -14,11 +28,16 @@ ...@@ -14,11 +28,16 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="物料编码"> <el-form-item label="物料编码">
<el-input v-model="formInline.attribName" placeholder="请输入物料编码" clearable/> <el-input
v-model="formInline.attribName"
placeholder="请输入物料编码"
clearable
/>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button
type="primary" type="primary"
size="mini"
icon="el-icon-search" icon="el-icon-search"
:loading="tableLoading" :loading="tableLoading"
@click="getList()" @click="getList()"
...@@ -27,6 +46,7 @@ ...@@ -27,6 +46,7 @@
<el-form-item> <el-form-item>
<el-button <el-button
type="primary" type="primary"
size="mini"
icon="el-icon-plus" icon="el-icon-plus"
:loading="tableLoading" :loading="tableLoading"
@click="showModal = true" @click="showModal = true"
...@@ -45,26 +65,104 @@ ...@@ -45,26 +65,104 @@
size="small" size="small"
border border
> >
<el-table-column type="index" :index="index => {return index+1}" label="序号" width="80" /> <el-table-column
<el-table-column prop="attribCode" label="物料编码" width="150" /> type="index"
<el-table-column prop="attribName" label="物料名称" width="250" /> :index="index => {return index+1}"
<el-table-column prop="devTypeName" label="设备类型" :width="tdWidth" /> label="序号"
<el-table-column prop="devMnumName" label="设备型号" :width="tdWidth" :formatter="formatter" /> width="80"
<el-table-column prop="orNetName" label="是否联网" :width="tdWidth" :formatter="formatter" /> />
<el-table-column prop="cardSelfName" label="卡类型" :width="tdWidth" :formatter="formatter" /> <el-table-column
<el-table-column prop="orOpenName" label="专用/通用" :width="tdWidth" :formatter="formatter" /> prop="attribCode"
<el-table-column prop="screenName" label="是否带屏" :width="tdWidth" :formatter="formatter" /> label="物料编码"
<el-table-column prop="sourceName" label="有源/无源" :width="tdWidth" :formatter="formatter" /> width="150"
<el-table-column prop="msizeName" label="尺寸" :width="tdWidth" :formatter="formatter" /> />
<el-table-column prop="modelName" label="机型" :width="tdWidth" :formatter="formatter" /> <el-table-column
<el-table-column prop="typeName" label="裸机/整机" :width="tdWidth" :formatter="formatter" /> prop="attribName"
<el-table-column prop="configureName" label="配置" :width="tdWidth" :formatter="formatter" /> label="物料名称"
<el-table-column prop="boardVersion" label="主板版本号" :width="tdWidth" :formatter="formatter"/> width="250"
<el-table-column prop="softVersion" label="软件版本号" :width="tdWidth" :formatter="formatter" /> />
<el-table-column
prop="devTypeName"
label="设备类型"
:width="tdWidth"
/>
<el-table-column
prop="devMnumName"
label="设备型号"
:width="tdWidth"
:formatter="formatter"
/>
<el-table-column
prop="orNetName"
label="是否联网"
:width="tdWidth"
:formatter="formatter"
/>
<el-table-column
prop="cardSelfName"
label="卡类型"
:width="tdWidth"
:formatter="formatter"
/>
<el-table-column
prop="orOpenName"
label="专用/通用"
:width="tdWidth"
:formatter="formatter"
/>
<el-table-column
prop="screenName"
label="是否带屏"
:width="tdWidth"
:formatter="formatter"
/>
<el-table-column
prop="sourceName"
label="有源/无源"
:width="tdWidth"
:formatter="formatter"
/>
<el-table-column
prop="msizeName"
label="尺寸"
:width="tdWidth"
:formatter="formatter"
/>
<el-table-column
prop="modelName"
label="机型"
:width="tdWidth"
:formatter="formatter"
/>
<el-table-column
prop="typeName"
label="裸机/整机"
:width="tdWidth"
:formatter="formatter"
/>
<el-table-column
prop="configureName"
label="配置"
:width="tdWidth"
:formatter="formatter"
/>
<el-table-column
prop="boardVersion"
label="主板版本号"
:width="tdWidth"
:formatter="formatter"
/>
<el-table-column
prop="softVersion"
label="软件版本号"
:width="tdWidth"
:formatter="formatter"
/>
</el-table> </el-table>
<div class="pagination_list"> <div class="pagination_list">
<el-pagination <el-pagination
background background
small
layout="sizes, total,prev, pager, next, jumper" layout="sizes, total,prev, pager, next, jumper"
:total="pageTotal" :total="pageTotal"
:page-size="pageSize" :page-size="pageSize"
...@@ -84,7 +182,11 @@ ...@@ -84,7 +182,11 @@
<el-button @click="showModal = false">取消</el-button> <el-button @click="showModal = false">取消</el-button>
</div> </div>
</el-dialog> --> </el-dialog> -->
<add-setting :show="showModal" v-if="showModal" @closed="closeAddSettingDialog"/> <add-setting
:show="showModal"
v-if="showModal"
@closed="closeAddSettingDialog"
/>
<!-- 弹框 end --> <!-- 弹框 end -->
</d2-container> </d2-container>
...@@ -92,9 +194,9 @@ ...@@ -92,9 +194,9 @@
<script> <script>
import { import {
PAGEATTRIBMANA, PAGEATTRIBMANA,
GETDEVICETYPE, GETDEVICETYPE,
// SAVEATTRIBMANA // SAVEATTRIBMANA
} from "@/http/interface"; } from "@/http/interface";
import GlsxDialog from "@/components/dialog/index"; import GlsxDialog from "@/components/dialog/index";
import AddSetting from "./addSetting"; import AddSetting from "./addSetting";
...@@ -123,24 +225,24 @@ export default { ...@@ -123,24 +225,24 @@ export default {
}, },
deviceTypeList: [], deviceTypeList: [],
showModal: false, showModal: false,
showChildModal:false showChildModal: false
}; };
}, },
created() {}, created() { },
mounted: function() { mounted: function () {
this.getList(); this.getList();
this.getDeviceList(); this.getDeviceList();
}, },
methods: { methods: {
formatter: function(row, column, cellValue) { formatter: function (row, column, cellValue) {
if(cellValue){ if (cellValue) {
if(cellValue == '未知' || cellValue == "'未知'"){ if (cellValue == '未知' || cellValue == "'未知'") {
return '//' return '//'
}else{ } else {
return cellValue return cellValue
} }
}else{ } else {
return '' return ''
} }
}, },
...@@ -148,7 +250,7 @@ export default { ...@@ -148,7 +250,7 @@ export default {
/** /**
* 查询列表 * 查询列表
*/ */
getList: function(current) { getList: function (current) {
const _this = this; const _this = this;
const oParams = _this.getParams(); const oParams = _this.getParams();
oParams.pageNum = current || _this.currentPage; oParams.pageNum = current || _this.currentPage;
...@@ -167,7 +269,7 @@ export default { ...@@ -167,7 +269,7 @@ export default {
/** /**
* 获取查询参数 * 获取查询参数
*/ */
getParams: function() { getParams: function () {
const oParams = this.formInline; const oParams = this.formInline;
oParams.pageSize = this.pageSize; oParams.pageSize = this.pageSize;
return oParams; return oParams;
...@@ -176,7 +278,7 @@ export default { ...@@ -176,7 +278,7 @@ export default {
/** /**
* 每页展示 * 每页展示
*/ */
changePageSize: function(e) { changePageSize: function (e) {
this.pageSize = e; this.pageSize = e;
this.getList(); this.getList();
}, },
...@@ -184,7 +286,7 @@ export default { ...@@ -184,7 +286,7 @@ export default {
/** /**
* 获取设备类型列表 * 获取设备类型列表
*/ */
getDeviceList: function() { getDeviceList: function () {
const _this = this; const _this = this;
GETDEVICETYPE().then(res => { GETDEVICETYPE().then(res => {
const { data } = res; const { data } = res;
...@@ -192,9 +294,9 @@ export default { ...@@ -192,9 +294,9 @@ export default {
}); });
}, },
closeAddSettingDialog: function(sub){ closeAddSettingDialog: function (sub) {
this.showModal = false this.showModal = false
if(sub){ if (sub) {
this.getList() this.getList()
} }
} }
......
<template> <template>
<d2-container> <d2-container>
<el-card shadow="never" slot="header"> <el-card
<el-form :inline="true" :model="formInline" class="demo-form-inline" size="small"> shadow="never"
slot="header"
>
<el-form
:inline="true"
:model="formInline"
class="demo-form-inline"
size="small"
>
<el-form-item label="固件版本号"> <el-form-item label="固件版本号">
<el-input v-model="formInline.fastenerVersion" placeholder="请输入固件版本号" clearable/> <el-input
v-model="formInline.fastenerVersion"
placeholder="请输入固件版本号"
clearable
/>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button
type="primary" type="primary"
size="mini"
icon="el-icon-search" icon="el-icon-search"
:loading="tableLoading" :loading="tableLoading"
@click="getList()" @click="getList()"
...@@ -16,6 +29,7 @@ ...@@ -16,6 +29,7 @@
<el-form-item> <el-form-item>
<el-button <el-button
type="primary" type="primary"
size="mini"
icon="el-icon-plus" icon="el-icon-plus"
:loading="tableLoading" :loading="tableLoading"
@click="showModal = true" @click="showModal = true"
...@@ -34,60 +48,119 @@ ...@@ -34,60 +48,119 @@
size="small" size="small"
border border
> >
<el-table-column type="index" :index="index => {return index+1}" label="序号" width="80" /> <el-table-column
<el-table-column prop="deviceCode" label="机型"> type="index"
:index="index => {return index+1}"
label="序号"
width="80"
/>
<el-table-column
prop="deviceCode"
label="机型"
>
<template slot-scope="scoped">{{ scoped.row.attribMana.typeName }}</template> <template slot-scope="scoped">{{ scoped.row.attribMana.typeName }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="deviceName" label="裸机/整机"> <el-table-column
prop="deviceName"
label="裸机/整机"
>
<template slot-scope="scoped">{{ scoped.row.attribMana.modelName }}</template> <template slot-scope="scoped">{{ scoped.row.attribMana.modelName }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="iccid" label="配置"> <el-table-column
prop="iccid"
label="配置"
>
<template slot-scope="scoped">{{ scoped.row.attribMana.configureName }}</template> <template slot-scope="scoped">{{ scoped.row.attribMana.configureName }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="boardVersion" label="主板版本号" /> <el-table-column
<el-table-column prop="mcuVersion" label="芯片版本号" /> prop="boardVersion"
<el-table-column prop="fastenerVersion" label="固件版本号"> label="主板版本号"
/>
<el-table-column
prop="mcuVersion"
label="芯片版本号"
/>
<el-table-column
prop="fastenerVersion"
label="固件版本号"
>
<template slot-scope="scoped"> <template slot-scope="scoped">
<el-tooltip class="item" :content="scoped.row.fastenerVersion" placement="top-start"> <el-tooltip
class="item"
:content="scoped.row.fastenerVersion"
placement="top-start"
>
<span>{{ CUTSTR(scoped.row.fastenerVersion) }}</span> <span>{{ CUTSTR(scoped.row.fastenerVersion) }}</span>
</el-tooltip> </el-tooltip>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="softVersion" label="软件版本号"> <el-table-column
prop="softVersion"
label="软件版本号"
>
<template slot-scope="scoped"> <template slot-scope="scoped">
<el-tooltip class="item" :content="scoped.row.softVersion" placement="top-start"> <el-tooltip
class="item"
:content="scoped.row.softVersion"
placement="top-start"
>
<span>{{ CUTSTR(scoped.row.softVersion) }}</span> <span>{{ CUTSTR(scoped.row.softVersion) }}</span>
</el-tooltip> </el-tooltip>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="vendorCode" label="厂商码"> <el-table-column
prop="vendorCode"
label="厂商码"
>
<template slot-scope="scoped"> <template slot-scope="scoped">
<el-tooltip class="item" :content="scoped.row.vendorCode" placement="top-start"> <el-tooltip
class="item"
:content="scoped.row.vendorCode"
placement="top-start"
>
<span>{{ CUTSTR(scoped.row.vendorCode, 14) }}</span> <span>{{ CUTSTR(scoped.row.vendorCode, 14) }}</span>
</el-tooltip> </el-tooltip>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="svnAddress" label="SVN地址"> <el-table-column
prop="svnAddress"
label="SVN地址"
>
<template slot-scope="scoped"> <template slot-scope="scoped">
<el-tooltip class="item" :content="scoped.row.svnAddress" placement="top-start"> <el-tooltip
class="item"
:content="scoped.row.svnAddress"
placement="top-start"
>
<span>{{ CUTSTR(scoped.row.svnAddress, 16) }}</span> <span>{{ CUTSTR(scoped.row.svnAddress, 16) }}</span>
</el-tooltip> </el-tooltip>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="updateContent" label="更新内容"> <el-table-column
prop="updateContent"
label="更新内容"
>
<template slot-scope="scoped"> <template slot-scope="scoped">
<el-tooltip class="item" :content="scoped.row.updateContent" placement="top-start"> <el-tooltip
class="item"
:content="scoped.row.updateContent"
placement="top-start"
>
<span>{{ CUTSTR(scoped.row.updateContent) }}</span> <span>{{ CUTSTR(scoped.row.updateContent) }}</span>
</el-tooltip> </el-tooltip>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="createdDate" label="创建时间"> <el-table-column
prop="createdDate"
label="创建时间"
>
<template slot-scope="scoped">{{ DATEFORMATE(scoped.row.createdDate) }}</template> <template slot-scope="scoped">{{ DATEFORMATE(scoped.row.createdDate) }}</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination_list"> <div class="pagination_list">
<el-pagination <el-pagination
background background
small
layout="sizes, total,prev, pager, next, jumper" layout="sizes, total,prev, pager, next, jumper"
:total="pageTotal" :total="pageTotal"
:page-size="pageSize" :page-size="pageSize"
...@@ -100,12 +173,23 @@ ...@@ -100,12 +173,23 @@
<!-- 表格区域 end --> <!-- 表格区域 end -->
<!-- 弹框 开始 --> <!-- 弹框 开始 -->
<glsx-dialog title="创建固件版本" :show="showModal" :usefooter="true" @closed="closeDialog"> <glsx-dialog
title="创建固件版本"
:show="showModal"
:usefooter="true"
@closed="closeDialog"
>
<div> <div>
<edit-frimware ref="editFirmware" v-if="showModal" /> <edit-frimware
ref="editFirmware"
v-if="showModal"
/>
</div> </div>
<div slot="footer"> <div slot="footer">
<el-button type="primary" @click="saveInfo()">提交</el-button> <el-button
type="primary"
@click="saveInfo()"
>提交</el-button>
<el-button @click="closeDialog">取消</el-button> <el-button @click="closeDialog">取消</el-button>
</div> </div>
</glsx-dialog> </glsx-dialog>
...@@ -150,16 +234,16 @@ export default { ...@@ -150,16 +234,16 @@ export default {
showModal: false showModal: false
}; };
}, },
created() {}, created() { },
mounted: function() { mounted: function () {
this.getList(); this.getList();
}, },
methods: { methods: {
/** /**
* 查询列表 * 查询列表
*/ */
getList: function(current) { getList: function (current) {
const _this = this; const _this = this;
const oParams = _this.getParams(); const oParams = _this.getParams();
console.log(current); console.log(current);
...@@ -180,7 +264,7 @@ export default { ...@@ -180,7 +264,7 @@ export default {
/** /**
* 获取查询参数 * 获取查询参数
*/ */
getParams: function() { getParams: function () {
const oParams = this.formInline; const oParams = this.formInline;
const m = this.registerDate; const m = this.registerDate;
if (m && m.length > 0) { if (m && m.length > 0) {
...@@ -197,7 +281,7 @@ export default { ...@@ -197,7 +281,7 @@ export default {
/** /**
* 每页展示 * 每页展示
*/ */
changePageSize: function(e) { changePageSize: function (e) {
this.pageSize = e; this.pageSize = e;
this.getList(); this.getList();
}, },
...@@ -205,7 +289,7 @@ export default { ...@@ -205,7 +289,7 @@ export default {
/** /**
* 保存数据 * 保存数据
*/ */
saveInfo: function() { saveInfo: function () {
let _this = this; let _this = this;
let _obj = _this.$refs.editFirmware; let _obj = _this.$refs.editFirmware;
console.log(_obj); console.log(_obj);
...@@ -230,7 +314,7 @@ export default { ...@@ -230,7 +314,7 @@ export default {
}, },
/**关闭弹框 */ /**关闭弹框 */
closeDialog:function(){ closeDialog: function () {
this.showModal = false; this.showModal = false;
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!