Commit e3e0febd by zhuzhequan

添加演示

parent 4afae976
...@@ -197,11 +197,26 @@ ...@@ -197,11 +197,26 @@
v-model="addcurrencyform.fontColor" v-model="addcurrencyform.fontColor"
size="small"></el-color-picker> size="small"></el-color-picker>
</el-form-item> </el-form-item>
<el-form-item label="背景色" prop="remark"> <el-form-item label="背景色" prop="bgColor">
<el-color-picker <div style="display: flex;align-items: center">
style="width: 164px" <el-color-picker
v-model="addcurrencyform.bgColor" v-model="addcurrencyform.bgColor"
size="small"></el-color-picker> size="small"></el-color-picker>
<span :style="{
width: '45px',
lineHeight:'20px',
marginLeft:'20px',
textAlign: 'center',
fontSize: '12px',
height: '20px',
display: 'inline-block' ,
backgroundColor:addcurrencyform.
bgColor,color:addcurrencyform.fontColor
}">
字色
</span>
</div>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
...@@ -225,6 +240,7 @@ ...@@ -225,6 +240,7 @@
<script> <script>
import axios from '../../common/api/axios' import axios from '../../common/api/axios'
import MyTable from '@/common/components/base/tableView.vue' import MyTable from '@/common/components/base/tableView.vue'
export default { export default {
name: 'system_sku-manage', name: 'system_sku-manage',
components: { components: {
...@@ -256,7 +272,10 @@ export default { ...@@ -256,7 +272,10 @@ export default {
bgColor: '' bgColor: ''
}, },
all_list: [], all_list: [],
addcurrencyform2: null, addcurrencyform2: {
fontColor: 'black',
bgColor: 'white'
},
formId: null, formId: null,
addrules: {}, addrules: {},
paginationOptions: { paginationOptions: {
...@@ -272,15 +291,28 @@ export default { ...@@ -272,15 +291,28 @@ export default {
computed: { computed: {
tableColumns() { tableColumns() {
return [ return [
{ label: '中文名', key: 'cnname' }, {
{ label: '英文名', key: 'enname' }, label: '中文名',
{ label: '编码', key: 'code' }, key: 'cnname'
},
{
label: '英文名',
key: 'enname'
},
{
label: '编码',
key: 'code'
},
{ {
label: '类别', label: '类别',
key: 'cateName' key: 'cateName'
}, },
{ label: '排列序号', key: 'sort', width: 80 }, {
label: '排列序号',
key: 'sort',
width: 80
},
{ {
label: '是否带电池', label: '是否带电池',
key: 'battery', key: 'battery',
...@@ -296,20 +328,20 @@ export default { ...@@ -296,20 +328,20 @@ export default {
key: 'knife', key: 'knife',
render: (item) => <span>{item.knife ? '是' : '否'}</span> render: (item) => <span>{item.knife ? '是' : '否'}</span>
}, },
{ // {
label: '文字色', // label: '文字色',
key: 'fontColor', // key: 'fontColor',
width: 80, // width: 80,
render: (item) => ( // render: (item) => (
<span // <span
style={{ // style={{
width: '20px', // width: '20px',
height: '20px', // height: '20px',
display: 'inline-block', // display: 'inline-block',
backgroundColor: item.fontColor // backgroundColor: item.fontColor
}}></span> // }}></span>
) // )
}, // },
{ {
label: '背景色', label: '背景色',
key: 'bgColor', key: 'bgColor',
...@@ -317,11 +349,15 @@ export default { ...@@ -317,11 +349,15 @@ export default {
render: (item) => ( render: (item) => (
<span <span
style={{ style={{
width: '20px', width: '45px',
color: item.fontColor,
fontSize: '12px',
height: '20px', height: '20px',
display: 'inline-block', display: 'inline-block',
backgroundColor: item.bgColor backgroundColor: item.bgColor
}}></span> }}>
字色
</span>
) )
}, },
{ {
...@@ -382,8 +418,11 @@ export default { ...@@ -382,8 +418,11 @@ export default {
this.getList() this.getList()
}, },
currentTabFn(val) { currentTabFn(val) {
if (val) this.formId = val.id if (val) {
else this.formId = null this.formId = val.id
} else {
this.formId = null
}
}, },
selectionChange(selection) { selectionChange(selection) {
this.selection = selection this.selection = selection
...@@ -401,18 +440,22 @@ export default { ...@@ -401,18 +440,22 @@ export default {
return this.$message('请勾选至少一条记录') return this.$message('请勾选至少一条记录')
} }
this.addcurrencyform = Object.assign({}, v) this.addcurrencyform = Object.assign({}, v)
if (this.$refs.addcurrencyform) {
this.$refs.addcurrencyform.resetFields()
}
} else { } else {
this.$nextTick(() => { this.$nextTick(() => {
this.addcurrencyform = JSON.parse( if (this.$refs.addcurrencyform) {
JSON.stringify(this.addcurrencyform2) this.$refs.addcurrencyform.resetFields()
) }
this.addcurrencyform = {
fontColor: '#000000',
bgColor: '#ffffff'
}
}) })
} }
this.is_title = i this.is_title = i
this.dialogVisible = true this.dialogVisible = true
if (this.$refs.addcurrencyform) {
this.$refs.addcurrencyform.resetFields()
}
}, },
addCurrency() { addCurrency() {
// eslint-disable-next-line eqeqeq // eslint-disable-next-line eqeqeq
...@@ -451,7 +494,10 @@ export default { ...@@ -451,7 +494,10 @@ export default {
}, },
// 查询 // 查询
getList() { getList() {
const { pageSize, currentPage } = this.paginationOptions const {
pageSize,
currentPage
} = this.paginationOptions
this.loading = true this.loading = true
axios axios
.get('base/propertyValue/list_page', { .get('base/propertyValue/list_page', {
...@@ -550,8 +596,11 @@ export default { ...@@ -550,8 +596,11 @@ export default {
// 删除 // 删除
deleteSection(v) { deleteSection(v) {
let arr = [] let arr = []
if (v) arr.push(v) if (v) {
else arr = this.selection arr.push(v)
} else {
arr = this.selection
}
const leng = arr.length const leng = arr.length
// eslint-disable-next-line eqeqeq // eslint-disable-next-line eqeqeq
if (leng == 0) { if (leng == 0) {
...@@ -629,12 +678,14 @@ export default { ...@@ -629,12 +678,14 @@ export default {
border-radius: 5px; border-radius: 5px;
overflow: hidden; overflow: hidden;
} }
.table-wrap { .table-wrap {
background: #fff; background: #fff;
flex: 1; flex: 1;
overflow: hidden; overflow: hidden;
width: 100%; width: 100%;
} }
.category-list-item-label { .category-list-item-label {
font-size: 14px; font-size: 14px;
font-weight: bold; font-weight: bold;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment