|
@@ -16,7 +16,7 @@
|
|
|
end-placeholder="结束时间"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="任务状态">
|
|
|
+ <el-form-item label="任务状态" v-if="currentstatus==1">
|
|
|
<el-select
|
|
|
v-model="queryparameters.status"
|
|
|
class="m-1"
|
|
@@ -134,7 +134,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { defineComponent, ref, reactive, onMounted } from "vue";
|
|
|
+import { defineComponent, ref, reactive, onMounted, computed } from "vue";
|
|
|
import { useDict } from "@/utils/dict";
|
|
|
import TaskAdd from "@/components/Task/Add";
|
|
|
import router from "../../../router";
|
|
@@ -149,6 +149,7 @@ import {
|
|
|
} from "@/api/system/task";
|
|
|
import { cloneDeep } from 'lodash';
|
|
|
import { isArray } from "@vue/shared";
|
|
|
+import { useRoute } from "vue-router";
|
|
|
|
|
|
const {
|
|
|
task_status,
|
|
@@ -177,6 +178,11 @@ const tableData = ref([]);
|
|
|
const pagedata = ref({});
|
|
|
const taskinfo = ref();
|
|
|
const taskaddref = ref();
|
|
|
+const route = useRoute()
|
|
|
+ const currentstatus = computed(() => route.params.status);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
const addtask = () => {
|
|
|
showadd.value = true;
|
|
@@ -226,7 +232,17 @@ const ontaskadd = async ()=>{
|
|
|
loading.value = false;
|
|
|
getList();
|
|
|
}
|
|
|
+
|
|
|
const getList = () => {
|
|
|
+ if (currentstatus.value != 1) {
|
|
|
+ if (currentstatus.value == 2){
|
|
|
+ queryparameters.value.status = 1;
|
|
|
+ } else {
|
|
|
+ queryparameters.value.status = currentstatus.value;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ queryparameters.value.status = "";
|
|
|
+ }
|
|
|
listTask(proxy.addDateRange(queryparameters.value, qdate.value)).then(
|
|
|
(response) => {
|
|
|
tableData.value = response.rows;
|
|
@@ -236,8 +252,11 @@ const getList = () => {
|
|
|
};
|
|
|
getList();
|
|
|
|
|
|
+
|
|
|
+
|
|
|
onMounted(() => {
|
|
|
- // console.log(taskaddref.value)
|
|
|
+
|
|
|
+
|
|
|
});
|
|
|
</script>
|
|
|
|