Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
horse
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
向伟
horse
Commits
e04c08f1
Commit
e04c08f1
authored
Nov 17, 2021
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
4a0b85cd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
7 deletions
+12
-7
customerField.vue
src/pages/customer/components/customerField.vue
+12
-7
No files found.
src/pages/customer/components/customerField.vue
View file @
e04c08f1
...
...
@@ -30,7 +30,7 @@
<q-toggle
v-if=
"element.IsLock==1"
v-model=
"element.Enable"
:true-value=
"1"
:false-value=
"2"
icon=
"lock"
disable
/>
<q-toggle
v-else
v-model=
"element.Enable"
:true-value=
"1"
:false-value=
"2"
@
update:model-value=
"godelete(element,1,index)"
/>
@
update:model-value=
"godelete(element
.Enable
,1,index)"
/>
</td>
<td>
<q-toggle
v-model=
"element.Required"
:true-value=
"1"
:false-value=
"2"
...
...
@@ -58,19 +58,20 @@
</div>
</template>
<
script
lang=
"ts"
>
import
{
defineComponent
,
ref
,
onMounted
,
reactive
}
from
'vue'
import
requestgroup
from
'../../../components/customer/request-group.vue'
import
{
defineComponent
,
ref
,
onMounted
,
}
from
'vue'
//
import requestgroup from '../../../components/customer/request-group.vue'
import
customerService
from
'@/api/customer'
import
draggable
from
"vuedraggable"
;
import
{
useQuasar
}
from
'quasar'
interface
listType
{
Id
:
number
Enable
:
number
Required
:
number
Required
?
:
number
[
propName
:
string
]:
any
}
export
default
defineComponent
({
components
:
{
draggable
,
requestgroup
},
components
:
{
draggable
},
setup
()
{
const
$q
=
useQuasar
()
let
data
=
ref
<
Array
<
listType
>>
([])
...
...
@@ -95,7 +96,7 @@
}
customerService
.
setCustomerFiledState
(
msg
).
then
((
res
)
=>
{
if
(
res
.
data
.
Code
==
1
)
{
console
.
log
(
res
)
}
else
{
//如果移动失败 重新获取列表
changePage
()
}
...
...
@@ -125,11 +126,13 @@
}
})
}
const
godelete
=
(
item
:
any
,
type
:
number
,
index
:
number
)
=>
{
const
godelete
=
(
item
:
listType
,
type
:
number
,
index
:
number
)
=>
{
let
text
=
''
console
.
log
(
item
)
if
(
type
==
1
){
//tyep等于1和2的时候 先让弹出提示 然后再给予掉接口 所以把原本的值暂时先赋值给本身
text
=
'确定修改启用状态'
if
(
item
.
Enable
==
2
){
data
.
value
[
index
].
Enable
=
1
}
else
{
data
.
value
[
index
].
Enable
=
2
...
...
@@ -138,6 +141,8 @@
text
=
'确定修改必填状态'
if
(
item
.
Required
==
2
){
data
.
value
[
index
].
Required
=
1
console
.
log
(
data
.
value
[
index
].
Required
,
' data.value[index].Required'
)
}
else
{
data
.
value
[
index
].
Required
=
2
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment