Commit a645de15 authored by nature's avatar nature

placeholder 处理

parent eb2927a1
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
.field-title { .field-title {
line-height: 25px; line-height: 25px;
font-size: 14px; font-size: 12px;
color: #333; color: #333;
letter-spacing: 0; letter-spacing: 0;
margin-right: 12px; margin-right: 12px;
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
position: absolute; position: absolute;
left: 8px; left: 8px;
color: #D24E4E; color: #D24E4E;
font-size: 14px; font-size: 12px;
content: '*'; content: '*';
} }
} }
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
.field-control { .field-control {
display: block; display: block;
box-sizing: border-box; box-sizing: border-box;
font-size: 14px; font-size: 12px;
width: 100%; width: 100%;
min-width: 0; min-width: 0;
margin: 0; margin: 0;
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
<div :style="{'flex':proportion[1] }" class="field-value"> <div :style="{'flex':proportion[1] }" class="field-value">
<div :class="{'field-control-error':hasError}" class="field-body"> <div :class="{'field-control-error':hasError}" class="field-body">
<input <input
ref="fieldInput"
v-bind="$attrs" v-bind="$attrs"
v-model="value" v-model="value"
:disabled="disabled" :placeholder="dataPlaceholder" :class="('field-control-'+inputAlign)" class="field-control" :disabled="disabled" :placeholder="dataPlaceholder" :class="('field-control-'+inputAlign)" class="field-control"
......
...@@ -15,9 +15,10 @@ ...@@ -15,9 +15,10 @@
<div :style="{'flex':proportion[1] }" class="field-value"> <div :style="{'flex':proportion[1] }" class="field-value">
<div :class="{'field-control-error':hasError}" class="field-body"> <div :class="{'field-control-error':hasError}" class="field-body">
<input <input
v-bind="$attrs" ref="fieldInput"
v-model="codeName" :disabled="disabled" :placeholder="selectPlaceholder" :class="('field-control-'+inputAlign)" v-bind="$attrs" v-model="codeName" :disabled="disabled" :placeholder="selectPlaceholder"
type="text" class="field-control" :class="('field-control-'+inputAlign)" type="text"
class="field-control"
readonly readonly
@click="showSelect" @click="showSelect"
@blur="onBlur"> @blur="onBlur">
......
...@@ -15,9 +15,10 @@ ...@@ -15,9 +15,10 @@
<div :style="{'flex':proportion[1] }" class="field-value"> <div :style="{'flex':proportion[1] }" class="field-value">
<div :class="{'field-control-error':hasError}" class="field-body"> <div :class="{'field-control-error':hasError}" class="field-body">
<input <input
v-bind="$attrs" ref="fieldInput"
v-model="codeName" :disabled="disabled" :placeholder="selectPlaceholder" :class="('field-control-'+inputAlign)" v-bind="$attrs" v-model="codeName" :disabled="disabled" :placeholder="selectPlaceholder"
type="text" class="field-control" :class="('field-control-'+inputAlign)" type="text"
class="field-control"
readonly readonly
@click="showSelect" @click="showSelect"
@blur="onBlur"> @blur="onBlur">
...@@ -215,7 +216,7 @@ export default { ...@@ -215,7 +216,7 @@ export default {
getLovCode () { getLovCode () {
let vm = this let vm = this
const tenantId = localStorage.getItem('tenantId') const tenantId = localStorage.getItem('tenantId')
let url = `${process.env.VUE_APP_API_HOST}/hpfm/v1/${tenantId}/lov-view/info?viewCode=${vm.lovCode}&t=${new Date().getTime()}` let url = `${process.env.VUE_APP_API_HOST}/hpfm/v1/${tenantId}/lov-view/info?viewCode=${vm.lovCode}&t=${Math.random()}`
let headers = { let headers = {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
'Authorization': 'Bearer ' + window.localStorage.access_token, 'Authorization': 'Bearer ' + window.localStorage.access_token,
...@@ -225,7 +226,7 @@ export default { ...@@ -225,7 +226,7 @@ export default {
}).then((res) => { }).then((res) => {
if (res.queryUrl) { if (res.queryUrl) {
const queryUrl = res.queryUrl const queryUrl = res.queryUrl
let lovUrl = `${process.env.VUE_APP_API_HOST}${queryUrl}?lovCode=${this.lovCode}&page=0&size=99&t=${new Date().getTime()}` let lovUrl = `${process.env.VUE_APP_API_HOST}${queryUrl}?lovCode=${this.lovCode}&page=0&size=99&t=${Math.random()}`
axios.get(lovUrl, { axios.get(lovUrl, {
headers: headers, headers: headers,
}).then((res) => { }).then((res) => {
...@@ -241,7 +242,7 @@ export default { ...@@ -241,7 +242,7 @@ export default {
getLookUpCode () { getLookUpCode () {
let vm = this let vm = this
const tenantId = localStorage.getItem('tenantId') const tenantId = localStorage.getItem('tenantId')
let url = `${process.env.VUE_APP_API_HOST}/hpfm/v1/${tenantId}/lovs/data?lovCode=${vm.lookUpCode}&t=${new Date().getTime()}` let url = `${process.env.VUE_APP_API_HOST}/hpfm/v1/${tenantId}/lovs/data?lovCode=${vm.lookUpCode}&t=${Math.random()}`
axios.get(url, { axios.get(url, {
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
...@@ -281,12 +282,12 @@ export default { ...@@ -281,12 +282,12 @@ export default {
if (!vm.disabled) { if (!vm.disabled) {
let array = (vm.lookUpCode || vm.lovCode) ? vm.arrayList : vm.dataArray let array = (vm.lookUpCode || vm.lovCode) ? vm.arrayList : vm.dataArray
let list = [] let list = []
array.forEach((date, index, array) => { array.forEach((data, index, array) => {
list.push({ list.push(Object.assign({
value: date[vm.valueKey], value: data[vm.valueKey],
name: date[vm.valueName], name: data[vm.valueName],
parent: date.parent, parent: data.parent,
}) }, data))
}) })
VueSelect.show({ VueSelect.show({
list: list, list: list,
......
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