diff --git a/src/api/modules/index.js b/src/api/modules/index.js
index c1fdb1a..79f5972 100644
--- a/src/api/modules/index.js
+++ b/src/api/modules/index.js
@@ -57,6 +57,9 @@ const getCount = (data) => {
const postQa = (data) => {
return http.post("/admin/qa", data,"application/json");
};
+const postQaList = (data) => {
+ return http.post("/admin/qa/list", data,"application/json");
+};
const putQa = (id,data) => {
return http.put("/admin/qa/"+id ,data,"application/json");
};
@@ -157,6 +160,7 @@ export default {
updatePassword,
getCount,
postQa,
+ postQaList,
putQa,
putRule,
postQaitem,
diff --git a/src/views/system/Department/bank.vue b/src/views/system/Department/bank.vue
index 6535547..b94006e 100644
--- a/src/views/system/Department/bank.vue
+++ b/src/views/system/Department/bank.vue
@@ -46,13 +46,15 @@
-
-
+
+
+
+
-
+
单选题
多选题
@@ -226,6 +228,8 @@ const rules = reactive({
}]
})
+const repeat_qa_id=ref([])
+const qaList=ref([])
const dialogImageUrl = ref("");
const dialogVisiblei = ref(false);
const feihua = ref(false);
@@ -288,13 +292,13 @@ console.log(question_times.value)
if(props.action_type=="1")
{
- emits("save-click",props.action_type,'',content.value,base_token_item.value,question_times.value);
+ emits("save-click",props.action_type,'',content.value,base_token_item.value,question_times.value,repeat_qa_id.value);
}
else if(props.action_type=='2')
{
// console.log(base_token_item.value)
- emits("save-click",props.action_type,action.value,content.value,base_token_item.value,question_times.value);
+ emits("save-click",props.action_type,action.value,content.value,base_token_item.value,question_times.value,repeat_qa_id.value);
}
}
@@ -302,8 +306,17 @@ const handleCloseDialog=() => {
base_token_item.value=[]
question_times.value=[]
isfirst.value=true
+ repeat_qa_id.value=[]
emits("closeDialog");
}
+const postQaList=()=>{
+request.postQaList().then((res) => {
+
+ qaList.value = res.data.data
+ })
+}
+
+
const open = (titles, spans) => {
@@ -446,6 +459,25 @@ watch(() => props.FormData.question_qa_timer, (newVal, oldVal) => {
}
})
+watch(() => props.FormData.repeat_qa_id, (newVal, oldVal) => {
+
+
+ initqa()
+
+})
+const initqa = () => {
+
+ repeat_qa_id.value=[]
+ if(props.FormData.repeat_qa_id!=null&&props.FormData.repeat_qa_id.length>0)
+{
+
+ props.FormData.repeat_qa_id.forEach((item,index)=>{
+ repeat_qa_id.value.push(item.qa_id)
+ })
+}
+}
+
+
watch(() => props.FormData.base_token_item, (newVal, oldVal) => {
@@ -466,7 +498,10 @@ const inittoken = () => {
const dialogVisibles=ref(false)
watch(() => props.dialogVisible, (newVal, oldVal) => {
dialogVisibles.value=props.dialogVisible
-
+ if(dialogVisibles.value)
+{
+ postQaList()
+}
})
watch(()=> props.fileList, (newVal, oldVal) => {
diff --git a/src/views/system/Department/banktwo.vue b/src/views/system/Department/banktwo.vue
index 2dda41d..ab5cb6d 100644
--- a/src/views/system/Department/banktwo.vue
+++ b/src/views/system/Department/banktwo.vue
@@ -25,11 +25,6 @@
-
@@ -55,8 +50,13 @@
-
+
+
+
+
+
@@ -301,6 +301,8 @@ const emits = defineEmits(["save-click","closeDialog"]);
const action=ref(1)
const isfirst=ref(true)
const base_token_item=ref([])
+const repeat_qa_id=ref([])
+const qaList=ref([])
function onSubmit() {
if(quantitynumber.value {
question_types.value=[]
base_token_item.value=[]
question_times.value=[]
+ repeat_qa_id.value=[]
emits("closeDialog");
}
@@ -503,6 +506,27 @@ watch(() => props.FormData.base_token_item, (newVal, oldVal) => {
inittoken()
})
+
+watch(() => props.FormData.repeat_qa_id, (newVal, oldVal) => {
+
+
+ initqa()
+
+})
+
+const initqa = () => {
+
+ repeat_qa_id.value=[]
+ if(props.FormData.repeat_qa_id!=null&&props.FormData.repeat_qa_id.length>0)
+{
+
+ props.FormData.repeat_qa_id.forEach((item,index)=>{
+ repeat_qa_id.value.push(item.qa_id)
+ })
+}
+}
+
+
const inittoken = () => {
base_token_item.value=[]
@@ -517,6 +541,11 @@ const inittoken = () => {
const dialogVisibles=ref(false)
watch(() => props.dialogVisible, (newVal, oldVal) => {
dialogVisibles.value=props.dialogVisible
+ if(dialogVisibles.value)
+{
+ postQaList()
+}
+
})
watch(()=> props.fileList, (newVal, oldVal) => {
@@ -554,7 +583,7 @@ const initLabel = () => {
tokenlist.value = res.data.data
})
-
+ // postQaList()
}
@@ -681,6 +710,13 @@ request.getOssSign({
})
}
+ const postQaList=()=>{
+request.postQaList().then((res) => {
+
+ qaList.value = res.data.data
+ })
+}
+