bug--需求提交/搜索校验/样式

This commit is contained in:
gaoyuanwei 2022-07-22 15:39:31 +08:00
parent f0505d2d87
commit 78a9f22ffb
4 changed files with 24 additions and 6 deletions

View File

@ -199,7 +199,7 @@ export default {
<style lang='scss' scoped> <style lang='scss' scoped>
#inputSelectCheckbox { #inputSelectCheckbox {
// margin-top: 20px; // margin-top: 20px;
width: 100%; width: calc(100% - 105px);
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;

View File

@ -42,6 +42,7 @@
<a-input <a-input
v-model:value="val.note1" v-model:value="val.note1"
:placeholder="'请填写' + val.name" :placeholder="'请填写' + val.name"
style="width: calc(100% - 150px);"
/> />
<span style="width: 2.5rem; padding-left: 0.1rem"> <span style="width: 2.5rem; padding-left: 0.1rem">
{{ {{
@ -253,7 +254,7 @@ export default {
align-items: center; align-items: center;
span:first-child { span:first-child {
width: 120px; width: 105px;
} }
:deep(.ant-input-textarea) { :deep(.ant-input-textarea) {
@ -268,7 +269,7 @@ export default {
width: 200px; width: 200px;
} }
:deep(.ant-input) { ::v-deep .ant-input {
resize: none; resize: none;
width: 570px; width: 570px;
} }

View File

@ -944,9 +944,23 @@
const resourceList = reactive({ data: [] }) const resourceList = reactive({ data: [] })
const videoList = reactive({ data: [] }) const videoList = reactive({ data: [] })
const resourceTotal = ref('') const resourceTotal = ref('')
//
const re = /^[0-9\u4E00-\u9FA5]*$/
const getAppResources = (switchIndex) => { const getAppResources = (switchIndex) => {
if (switchIndex) { if (searchValue.value) {
if (switchIndex.length > 1) { let str = ''
let r = null
console.log(
'2222222222222222222222222222',
searchValue.value,
searchValue.value.length
)
if (searchValue.value.length >= 2) {
str = searchValue.value.substring(0, 2)
console.log('str================>', str)
r = re.test(str)
}
if (searchValue.value.length > 1 && r) {
//switchIndex //switchIndex
paramsGetResources.name = searchValue.value paramsGetResources.name = searchValue.value
paramsGetResources.type = Cardsname.value paramsGetResources.type = Cardsname.value
@ -1025,7 +1039,7 @@
}) })
} }
} else { } else {
message.error('请输入一个字以上!') message.error('请以两位以上汉字或数字开头')
} }
} else { } else {
//switchIndex //switchIndex

View File

@ -353,6 +353,9 @@
if (subimtFlag.value) { if (subimtFlag.value) {
subimtFlag.value = false subimtFlag.value = false
formRef.value.validate().then(() => { formRef.value.validate().then(() => {
const detString = String(formName.detailsField)
formName.detailsField = detString
console.log(detString, formName.detailsField, 'detString')
demandApply(formName).then((res) => { demandApply(formName).then((res) => {
applySuccess.value = false applySuccess.value = false
message.success('操作成功!') message.success('操作成功!')