|
|
@ -9,10 +9,12 @@
|
|
|
|
:taskId
|
|
|
|
:taskId
|
|
|
|
:assetId
|
|
|
|
:assetId
|
|
|
|
:type
|
|
|
|
:type
|
|
|
|
|
|
|
|
ref="webZCinfoRef"
|
|
|
|
|
|
|
|
@submit-reject="submitReject"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<el-row
|
|
|
|
<el-row
|
|
|
|
style="display: flex; justify-content: center; padding-bottom: 50px"
|
|
|
|
style="display: flex; justify-content: center; padding-bottom: 50px"
|
|
|
|
v-if="name == 'WebZC'"
|
|
|
|
v-if="name === 'MyWebzc'"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<el-button
|
|
|
|
<el-button
|
|
|
|
type="danger"
|
|
|
|
type="danger"
|
|
|
@ -20,88 +22,506 @@
|
|
|
|
v-if="pageType === 'look' && audit != true"
|
|
|
|
v-if="pageType === 'look' && audit != true"
|
|
|
|
>返回</el-button
|
|
|
|
>返回</el-button
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<el-button type="danger" @click="sendBack" v-if="pageType === 'change'"
|
|
|
|
<el-button type="danger" @click="sendBack" v-if="pageType === 'change' || pageType === 'add'"
|
|
|
|
>取消</el-button
|
|
|
|
>取消</el-button
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<el-button
|
|
|
|
<el-button
|
|
|
|
type="primary"
|
|
|
|
type="primary"
|
|
|
|
@click="newAssets"
|
|
|
|
@click="newAssets()"
|
|
|
|
:loading="loading"
|
|
|
|
:loading="loading"
|
|
|
|
v-if="pageType === 'change'"
|
|
|
|
v-if="pageType === 'change' || pageType === 'add'"
|
|
|
|
>提交</el-button
|
|
|
|
>提交</el-button
|
|
|
|
>
|
|
|
|
>
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
|
<el-row
|
|
|
|
<el-row
|
|
|
|
|
|
|
|
v-if="name === 'TaskManagement-info'"
|
|
|
|
|
|
|
|
style="display: flex; justify-content: center; padding-bottom: 50px"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
|
|
type="danger"
|
|
|
|
|
|
|
|
@click="sendBack"
|
|
|
|
|
|
|
|
v-if="pageType === 'look' && audit != 'true'"
|
|
|
|
|
|
|
|
>返回</el-button
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
|
|
type="danger"
|
|
|
|
|
|
|
|
:disabled="false"
|
|
|
|
|
|
|
|
@click="newAssets1(0)"
|
|
|
|
|
|
|
|
v-if="pageType === 'change' || (audit == 'true' && pageType == 'look')"
|
|
|
|
|
|
|
|
>不通过</el-button
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
|
|
:disabled="false"
|
|
|
|
|
|
|
|
@click.prevent="newAssets1(1)"
|
|
|
|
|
|
|
|
:loading="loading"
|
|
|
|
|
|
|
|
v-if="pageType === 'change' || (audit == 'true' && pageType == 'look')"
|
|
|
|
|
|
|
|
>通过</el-button
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
<el-row
|
|
|
|
|
|
|
|
v-if="name === 'AssetRecord2'"
|
|
|
|
style="display: flex; justify-content: center; padding-bottom: 50px"
|
|
|
|
style="display: flex; justify-content: center; padding-bottom: 50px"
|
|
|
|
v-if="taskId && assetId && taskId != '' && assetId != ''"
|
|
|
|
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<el-button type="danger" @click="newAssets(0)">关停</el-button>
|
|
|
|
<el-button type="danger" @click="sendBack" v-if="pageType === 'look'"
|
|
|
|
<el-button @click="newAssets(1)">取消</el-button>
|
|
|
|
>返回</el-button
|
|
|
|
<el-button type="warning" @click="newAssets(2)">暂存</el-button>
|
|
|
|
>
|
|
|
|
<el-button type="success" @click="newAssets(3)" :loading="loading"
|
|
|
|
<el-button
|
|
|
|
|
|
|
|
type="danger"
|
|
|
|
|
|
|
|
:disabled="false"
|
|
|
|
|
|
|
|
@click="newAssets(1)"
|
|
|
|
|
|
|
|
v-if="pageType === 'change' "
|
|
|
|
|
|
|
|
>取消</el-button
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
|
|
:disabled="false"
|
|
|
|
|
|
|
|
@click.prevent="newAssets()"
|
|
|
|
|
|
|
|
:loading="loading"
|
|
|
|
|
|
|
|
v-if="pageType === 'change' "
|
|
|
|
>提交</el-button
|
|
|
|
>提交</el-button
|
|
|
|
>
|
|
|
|
>
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
|
<el-row
|
|
|
|
<el-row
|
|
|
|
style="display: flex; justify-content: center; padding-bottom: 50px"
|
|
|
|
style="display: flex; justify-content: center; padding-bottom: 50px"
|
|
|
|
v-if="pageType === 'look' && audit == true"
|
|
|
|
v-if="name === 'WebZC'"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<el-button type="danger" @click="sendBack">取消</el-button>
|
|
|
|
<el-button
|
|
|
|
<el-button type="primary" @click="newAssets" :loading="loading"
|
|
|
|
type="danger"
|
|
|
|
|
|
|
|
@click="sendBack"
|
|
|
|
|
|
|
|
v-if="pageType === 'look' && audit != true"
|
|
|
|
|
|
|
|
>返回</el-button
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-button type="danger" @click="sendBack" v-if="pageType === 'change'"
|
|
|
|
|
|
|
|
>取消</el-button
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
|
|
@click="newAssets()"
|
|
|
|
|
|
|
|
:loading="loading"
|
|
|
|
|
|
|
|
v-if="pageType === 'change'"
|
|
|
|
>提交</el-button
|
|
|
|
>提交</el-button
|
|
|
|
>
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-button type="danger" @click="newAssets(1)" v-if="pageType === 'add'"
|
|
|
|
|
|
|
|
>取消</el-button
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
|
|
@click="newAssets(null)"
|
|
|
|
|
|
|
|
v-if="pageType === 'add'"
|
|
|
|
|
|
|
|
>保存</el-button
|
|
|
|
|
|
|
|
>
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
|
</webZCinfo>
|
|
|
|
<el-row
|
|
|
|
<!-- <el-row
|
|
|
|
style="display: flex; justify-content: center; padding-bottom: 50px"
|
|
|
|
style="margin: 10px 0; padding-bottom: 50px; text-align: center"
|
|
|
|
v-if="name === 'Mytask-info'"
|
|
|
|
v-if="(pageType === 'change' || pageType === 'add') && !audit"
|
|
|
|
>
|
|
|
|
> -->
|
|
|
|
<el-button type="danger" @click="newAssets(0)" v-if="pageType !== 'look'"
|
|
|
|
<!-- <el-button type="danger" @click="sendBack">取消</el-button>
|
|
|
|
>关停</el-button
|
|
|
|
<el-button type="primary" @click="newAssets" :loading="loading"
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-button @click="newAssets(1)" v-if="pageType !== 'look'"
|
|
|
|
|
|
|
|
>取消</el-button
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-button type="warning" @click="newAssets(2)" v-if="pageType !== 'look'"
|
|
|
|
|
|
|
|
>暂存</el-button
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
|
|
type="success"
|
|
|
|
|
|
|
|
@click="newAssets(3)"
|
|
|
|
|
|
|
|
:loading="loading"
|
|
|
|
|
|
|
|
v-if="pageType !== 'look'"
|
|
|
|
>提交</el-button
|
|
|
|
>提交</el-button
|
|
|
|
> -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- </el-row> -->
|
|
|
|
|
|
|
|
<!-- <el-row
|
|
|
|
|
|
|
|
style="margin: 10px 0; padding-bottom: 50px; text-align: center"
|
|
|
|
|
|
|
|
v-if="audit"
|
|
|
|
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<el-button type="danger" :disabled="false" @click="btnReject"
|
|
|
|
<el-button type="danger" @click="sendBack" v-if="pageType == 'look'"
|
|
|
|
|
|
|
|
>返回</el-button
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
<el-row
|
|
|
|
|
|
|
|
style="display: flex; justify-content: center; padding-bottom: 50px"
|
|
|
|
|
|
|
|
v-if="name === 'UnitFillsec'"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
|
|
type="danger"
|
|
|
|
|
|
|
|
:disabled="false"
|
|
|
|
|
|
|
|
@click="btnReject"
|
|
|
|
|
|
|
|
v-if="pageType === 'change'"
|
|
|
|
>不通过</el-button
|
|
|
|
>不通过</el-button
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<el-button
|
|
|
|
<el-button
|
|
|
|
type="primary"
|
|
|
|
type="primary"
|
|
|
|
:disabled="false"
|
|
|
|
:disabled="false"
|
|
|
|
@click="btnPass"
|
|
|
|
@click.prevent="btnPass"
|
|
|
|
:loading="loading"
|
|
|
|
:loading="loading"
|
|
|
|
|
|
|
|
v-if="pageType === 'change'"
|
|
|
|
>通过</el-button
|
|
|
|
>通过</el-button
|
|
|
|
>
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
|
|
type="danger"
|
|
|
|
|
|
|
|
@click="sendBack"
|
|
|
|
|
|
|
|
v-if="pageType === 'look' && audit != true"
|
|
|
|
|
|
|
|
>返回</el-button
|
|
|
|
|
|
|
|
>
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
|
<el-row
|
|
|
|
</webZCinfo>
|
|
|
|
|
|
|
|
<!-- <el-row
|
|
|
|
style="margin: 10px 0; padding-bottom: 50px; text-align: center"
|
|
|
|
style="margin: 10px 0; padding-bottom: 50px; text-align: center"
|
|
|
|
v-if="pageType === 'look'"
|
|
|
|
v-if="(pageType === 'change' || pageType === 'add') && !audit"
|
|
|
|
>
|
|
|
|
> -->
|
|
|
|
<el-button type="primary" @click="sendBack">返回</el-button>
|
|
|
|
<!-- <el-button type="danger" @click="sendBack">取消</el-button>
|
|
|
|
</el-row> -->
|
|
|
|
<el-button type="primary" @click="newAssets" :loading="loading"
|
|
|
|
|
|
|
|
>提交</el-button
|
|
|
|
|
|
|
|
> -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- </el-row> -->
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<script setup>
|
|
|
|
<script setup>
|
|
|
|
import webZCinfo from "./webZCinfo.vue";
|
|
|
|
import webZCinfo from "./webZCinfo.vue";
|
|
|
|
import { useRoute, useRouter } from "vue-router";
|
|
|
|
import { useRoute, useRouter } from "vue-router";
|
|
|
|
|
|
|
|
import { ElMessage } from "element-plus";
|
|
|
|
|
|
|
|
import {
|
|
|
|
|
|
|
|
assetTaskzc,
|
|
|
|
|
|
|
|
assetTaskjyTj,
|
|
|
|
|
|
|
|
assetTasktaskSh,
|
|
|
|
|
|
|
|
geassetTaskcHc,
|
|
|
|
|
|
|
|
assetTasksh,
|
|
|
|
|
|
|
|
assetTaskhistory,
|
|
|
|
|
|
|
|
} from "@/api/renwuApi/index.js";
|
|
|
|
|
|
|
|
import {
|
|
|
|
|
|
|
|
assetUnitData,
|
|
|
|
|
|
|
|
assetInfo,
|
|
|
|
|
|
|
|
unitAllList,
|
|
|
|
|
|
|
|
unitEdit,
|
|
|
|
|
|
|
|
assetAudit,
|
|
|
|
|
|
|
|
lookInfo,
|
|
|
|
|
|
|
|
} from "@/api/auditPagesApi/index";
|
|
|
|
|
|
|
|
import { ref } from "vue";
|
|
|
|
const route = useRoute();
|
|
|
|
const route = useRoute();
|
|
|
|
const router = useRouter();
|
|
|
|
const router = useRouter();
|
|
|
|
|
|
|
|
|
|
|
|
const pageType = ref(route.query.pageType);
|
|
|
|
let pageType = ref(route.query.pageType);
|
|
|
|
|
|
|
|
console.log(pageType.value, "pageType");
|
|
|
|
const id = ref(route.query.id);
|
|
|
|
const id = ref(route.query.id);
|
|
|
|
const audit = ref(route.query.audit);
|
|
|
|
const audit = ref(route.query.audit);
|
|
|
|
|
|
|
|
console.log(audit.value, "audit");
|
|
|
|
const isModdle = ref(route.query.isModdle);
|
|
|
|
const isModdle = ref(route.query.isModdle);
|
|
|
|
const name = ref(route.query.name);
|
|
|
|
let name = ref(route.query.name);
|
|
|
|
|
|
|
|
console.log(name.value, "name");
|
|
|
|
const queryData = ref(route.query.queryData);
|
|
|
|
const queryData = ref(route.query.queryData);
|
|
|
|
const taskId = ref(route.query.taskId || "");
|
|
|
|
let taskId = ref(route.query.taskId || "");
|
|
|
|
const assetId = ref(route.query.assetId);
|
|
|
|
let assetId = ref(route.query.assetId);
|
|
|
|
const type = ref(route.query.type);
|
|
|
|
const type = ref(route.query.type);
|
|
|
|
|
|
|
|
let loading = ref(false);
|
|
|
|
|
|
|
|
const select = ref("http");
|
|
|
|
|
|
|
|
const xttz = ref([]);
|
|
|
|
|
|
|
|
const xtfhqkFcg = ref([]);
|
|
|
|
|
|
|
|
const xtfhqkFxl = ref([]);
|
|
|
|
|
|
|
|
const xtfhqkFzd = ref([]);
|
|
|
|
|
|
|
|
const xtfhqkFls = ref([]);
|
|
|
|
|
|
|
|
const dlwz = ref([]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const webZCinfoRef = ref();
|
|
|
|
|
|
|
|
const liebiaoDialogRef = ref();
|
|
|
|
|
|
|
|
const ruleFormRef = ref();
|
|
|
|
|
|
|
|
|
|
|
|
const sendBack = () => {
|
|
|
|
const sendBack = () => {
|
|
|
|
|
|
|
|
router.push({ name: route.query.name, params: queryData.value });
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const newAssets = async (typeButtom1) => {
|
|
|
|
|
|
|
|
const typeButtom = typeButtom1 !== undefined ? typeButtom1 : "";
|
|
|
|
|
|
|
|
let ruleForm = webZCinfoRef.value?.ruleForm;
|
|
|
|
|
|
|
|
console.log(ruleForm.chepingUnit, "ruleForm");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!ruleForm) {
|
|
|
|
|
|
|
|
ElMessage.error("获取表单数据失败");
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
console.log(typeButtom, "typeButtom");
|
|
|
|
|
|
|
|
if (!Object.is(typeButtom, undefined)) {
|
|
|
|
|
|
|
|
console.log(typeButtom, "typeButtom");
|
|
|
|
|
|
|
|
if (typeButtom === 1) {
|
|
|
|
|
|
|
|
loading.value = true;
|
|
|
|
|
|
|
|
router.go(-1);
|
|
|
|
|
|
|
|
loading.value = false;
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 直接使用ruleForm而不是ruleForm.value
|
|
|
|
|
|
|
|
ruleForm.taskId = taskId.value;
|
|
|
|
|
|
|
|
ruleForm.assetId = assetId.value;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ruleForm.xttz = xttz.value.join(",");
|
|
|
|
|
|
|
|
ruleForm.xtfhqkFcg = xtfhqkFcg.value.join(",");
|
|
|
|
|
|
|
|
ruleForm.xtfhqkFxl = xtfhqkFxl.value.join(",");
|
|
|
|
|
|
|
|
ruleForm.xtfhqkFzd = xtfhqkFzd.value.join(",");
|
|
|
|
|
|
|
|
ruleForm.xtfhqkFls = xtfhqkFls.value.join(",");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log(ruleForm, "ruleForm.chepingUnit");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 合并供应链信息列表
|
|
|
|
|
|
|
|
ruleForm.gylxxList = [
|
|
|
|
|
|
|
|
...ruleForm.chepingUnit,
|
|
|
|
|
|
|
|
...ruleForm.yjgysUnit,
|
|
|
|
|
|
|
|
...ruleForm.jfywUnit,
|
|
|
|
|
|
|
|
...ruleForm.xtsjUnit,
|
|
|
|
|
|
|
|
...ruleForm.xtjsUnit,
|
|
|
|
|
|
|
|
...ruleForm.xtyyUnit,
|
|
|
|
|
|
|
|
...ruleForm.aqfwUnit,
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 合并基础网络列表
|
|
|
|
|
|
|
|
ruleForm.jcwlList = [...ruleForm.fwqxx, ...ruleForm.wlsb, ...ruleForm.aqsb];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 处理地理位置
|
|
|
|
|
|
|
|
if (dlwz.value.length > 0) {
|
|
|
|
|
|
|
|
ruleForm.sheng = dlwz.value[0];
|
|
|
|
|
|
|
|
ruleForm.shi = dlwz.value[1];
|
|
|
|
|
|
|
|
ruleForm.qu = dlwz.value[2];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 处理服务位置
|
|
|
|
|
|
|
|
if (ruleForm.fwwz) {
|
|
|
|
|
|
|
|
ruleForm.fwwz = `${select.value}-${ruleForm.fwwz}`;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 打开列表对话框
|
|
|
|
|
|
|
|
if (typeButtom === 0) {
|
|
|
|
|
|
|
|
console.log(typeButtom, "typeButtom");
|
|
|
|
|
|
|
|
webZCinfoRef.value?.liebiaoDialog.open();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 暂存
|
|
|
|
|
|
|
|
if (typeButtom === 2) {
|
|
|
|
|
|
|
|
loading.value = true;
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
const res = await assetTaskzc(ruleForm);
|
|
|
|
|
|
|
|
console.log(res, "res");
|
|
|
|
|
|
|
|
ElMessage.success("修改成功");
|
|
|
|
router.go(-1);
|
|
|
|
router.go(-1);
|
|
|
|
|
|
|
|
} catch (error) {
|
|
|
|
|
|
|
|
console.error(error);
|
|
|
|
|
|
|
|
ElMessage.error("修改失败");
|
|
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
|
|
loading.value = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 提交
|
|
|
|
|
|
|
|
if (typeButtom === 3) {
|
|
|
|
|
|
|
|
loading.value = true;
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
// 表单验证
|
|
|
|
|
|
|
|
const valid = await webZCinfoRef.value.ruleFormRef.validate();
|
|
|
|
|
|
|
|
if (!valid) return;
|
|
|
|
|
|
|
|
const res = await assetTaskjyTj(ruleForm);
|
|
|
|
|
|
|
|
console.log(res, "res");
|
|
|
|
|
|
|
|
ElMessage.success("提交成功");
|
|
|
|
|
|
|
|
router.go(-1);
|
|
|
|
|
|
|
|
} catch (error) {
|
|
|
|
|
|
|
|
console.error(error);
|
|
|
|
|
|
|
|
ElMessage.info("请填写完整");
|
|
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
|
|
loading.value = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
const valid = await webZCinfoRef.value.ruleFormRef.validate();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!valid) return;
|
|
|
|
|
|
|
|
// 数据处理
|
|
|
|
|
|
|
|
ruleForm.xttz = xttz.value.join(",");
|
|
|
|
|
|
|
|
ruleForm.xtfhqkFcg = xtfhqkFcg.value.join(",");
|
|
|
|
|
|
|
|
ruleForm.xtfhqkFxl = xtfhqkFxl.value.join(",");
|
|
|
|
|
|
|
|
ruleForm.xtfhqkFzd = xtfhqkFzd.value.join(",");
|
|
|
|
|
|
|
|
ruleForm.xtfhqkFls = xtfhqkFls.value.join(",");
|
|
|
|
|
|
|
|
ruleForm.gylxxList = [
|
|
|
|
|
|
|
|
...ruleForm.chepingUnit,
|
|
|
|
|
|
|
|
...ruleForm.yjgysUnit,
|
|
|
|
|
|
|
|
...ruleForm.jfywUnit,
|
|
|
|
|
|
|
|
...ruleForm.xtsjUnit,
|
|
|
|
|
|
|
|
...ruleForm.xtjsUnit,
|
|
|
|
|
|
|
|
...ruleForm.xtyyUnit,
|
|
|
|
|
|
|
|
...ruleForm.aqfwUnit,
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ruleForm.jcwlList = [
|
|
|
|
|
|
|
|
...ruleForm.fwqxx,
|
|
|
|
|
|
|
|
...ruleForm.wlsb,
|
|
|
|
|
|
|
|
...ruleForm.aqsb,
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (dlwz.value.length > 0) {
|
|
|
|
|
|
|
|
ruleForm.sheng = dlwz.value[0];
|
|
|
|
|
|
|
|
ruleForm.shi = dlwz.value[1];
|
|
|
|
|
|
|
|
ruleForm.qu = dlwz.value[2];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (ruleForm.fwwz) {
|
|
|
|
|
|
|
|
ruleForm.fwwz = select.value + "-" + ruleForm.fwwz;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
loading.value = true;
|
|
|
|
|
|
|
|
if (pageType.value === "change") {
|
|
|
|
|
|
|
|
await unitEdit(ruleForm);
|
|
|
|
|
|
|
|
ElMessage.success("提交成功,待管理员审核通过后完成修改");
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
ruleForm.xzType = 1;
|
|
|
|
|
|
|
|
await assetUnitData("post", ruleForm);
|
|
|
|
|
|
|
|
if (pageType.value === "add" && name.value == "WebZC") {
|
|
|
|
|
|
|
|
ElMessage.success("新增成功");
|
|
|
|
|
|
|
|
} else if (pageType.value === "add") {
|
|
|
|
|
|
|
|
ElMessage.success("提交成功,待管理员审核通过后完成新增");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
router.push({ name: name.value, params: queryData.value });
|
|
|
|
|
|
|
|
} catch (err) {
|
|
|
|
|
|
|
|
console.error(err);
|
|
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
|
|
loading.value = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
const newAssets1 = async (type) => {
|
|
|
|
|
|
|
|
//不通过
|
|
|
|
|
|
|
|
if (type == 0) {
|
|
|
|
|
|
|
|
// 打开子组件的弹框让用户填写不通过意见
|
|
|
|
|
|
|
|
liebiaoDialogRef.value?.open();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (type == 1) {
|
|
|
|
|
|
|
|
webZCinfoRef.value.ruleFormRef.validate((valid) => {
|
|
|
|
|
|
|
|
if (valid) {
|
|
|
|
|
|
|
|
let tijioaobj = {
|
|
|
|
|
|
|
|
taskId: route.query.taskId,
|
|
|
|
|
|
|
|
assetId: route.query.assetId,
|
|
|
|
|
|
|
|
xtmc: webZCinfoRef.value.ruleForm.xtmc,
|
|
|
|
|
|
|
|
dwmc: route.query.zcdwmc,
|
|
|
|
|
|
|
|
status: 2,
|
|
|
|
|
|
|
|
type: route.query.type,
|
|
|
|
|
|
|
|
assetCurrentCpPo: webZCinfoRef.value.ruleForm,
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
console.log(webZCinfoRef.value.ruleForm, "tijioaobj");
|
|
|
|
|
|
|
|
loading.value = true;
|
|
|
|
|
|
|
|
assetTasksh(tijioaobj)
|
|
|
|
|
|
|
|
.then((res) => {
|
|
|
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
|
|
|
ElMessage.success("审核成功");
|
|
|
|
|
|
|
|
loading.value = false;
|
|
|
|
|
|
|
|
router.go(-1);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.catch(() => {
|
|
|
|
|
|
|
|
loading.value = false;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
loading.value = false;
|
|
|
|
|
|
|
|
ElMessage({
|
|
|
|
|
|
|
|
type: "info",
|
|
|
|
|
|
|
|
message: "请填写完整",
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
const btnReject = () => {
|
|
|
|
|
|
|
|
// 打开子组件的弹框
|
|
|
|
|
|
|
|
webZCinfoRef.value.liebiaoDialog.open();
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const submitReject = () => {
|
|
|
|
|
|
|
|
// 校验弹框表单
|
|
|
|
|
|
|
|
webZCinfoRef.value.dialogruleFormRef.validate(async (valid) => {
|
|
|
|
|
|
|
|
if (valid) {
|
|
|
|
|
|
|
|
// 根据不同的name使用不同的接口
|
|
|
|
|
|
|
|
if (name.value === "TaskManagement-info") {
|
|
|
|
|
|
|
|
// 使用assetTasksh接口
|
|
|
|
|
|
|
|
let tijioaobj = {
|
|
|
|
|
|
|
|
taskId: route.query.taskId,
|
|
|
|
|
|
|
|
assetId: route.query.assetId,
|
|
|
|
|
|
|
|
xtmc: webZCinfoRef.value.ruleForm.xtmc,
|
|
|
|
|
|
|
|
btgyy: webZCinfoRef.value.dialogruleForm.auditYy,
|
|
|
|
|
|
|
|
status: 4,
|
|
|
|
|
|
|
|
type: route.query.type,
|
|
|
|
|
|
|
|
assetCurrentCpPo: webZCinfoRef.value.ruleForm,
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
loading.value = true;
|
|
|
|
|
|
|
|
const res = await assetTasksh(tijioaobj);
|
|
|
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
|
|
|
ElMessage.success("审核成功");
|
|
|
|
|
|
|
|
webZCinfoRef.value.liebiaoDialog.close();
|
|
|
|
|
|
|
|
router.go(-1);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
|
|
ElMessage.error("操作失败");
|
|
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
|
|
loading.value = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else if (name.value === "Mytask-info") {
|
|
|
|
|
|
|
|
webZCinfoRef.value.ruleForm.isbf = 2;
|
|
|
|
|
|
|
|
webZCinfoRef.value.ruleForm.bfyy = webZCinfoRef.value.dialogruleForm.auditYy;
|
|
|
|
|
|
|
|
loading.value = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
const res = await assetTaskzc(webZCinfoRef.value.ruleForm);
|
|
|
|
|
|
|
|
console.log(res, "res");
|
|
|
|
|
|
|
|
ElMessage({
|
|
|
|
|
|
|
|
type: "info",
|
|
|
|
|
|
|
|
message: "已关停",
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
loading.value = false;
|
|
|
|
|
|
|
|
router.go(-1);
|
|
|
|
|
|
|
|
webZCinfoRef.value.ruleForm.bfyy = "";
|
|
|
|
|
|
|
|
} catch (error) {
|
|
|
|
|
|
|
|
console.error(error);
|
|
|
|
|
|
|
|
ElMessage.error("操作失败");
|
|
|
|
|
|
|
|
loading.value = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
// 其他页面使用原来的assetAudit接口
|
|
|
|
|
|
|
|
let tijioaobj = {
|
|
|
|
|
|
|
|
auditState: "3",
|
|
|
|
|
|
|
|
auditYy: webZCinfoRef.value.dialogruleForm.auditYy,
|
|
|
|
|
|
|
|
currentId: Number(id.value),
|
|
|
|
|
|
|
|
xzType: 1,
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
const res = await assetAudit(tijioaobj);
|
|
|
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
|
|
|
ElMessage.success("审核驳回");
|
|
|
|
|
|
|
|
webZCinfoRef.value.liebiaoDialog.close();
|
|
|
|
|
|
|
|
router.push({ name: name.value, params: queryData.value });
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
|
|
ElMessage.error("操作失败");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const btnPass = async () => {
|
|
|
|
|
|
|
|
loading.value = true;
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
// 获取 ruleForm 数据
|
|
|
|
|
|
|
|
const ruleForm = webZCinfoRef.value?.ruleForm;
|
|
|
|
|
|
|
|
const res = await assetAudit({
|
|
|
|
|
|
|
|
currentId: Number(id.value),
|
|
|
|
|
|
|
|
auditState: "2",
|
|
|
|
|
|
|
|
xzType: 1,
|
|
|
|
|
|
|
|
dwmc: ruleForm?.dwmc,
|
|
|
|
|
|
|
|
xtmc: ruleForm?.xtmc,
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
ElMessage.success("审核通过");
|
|
|
|
|
|
|
|
router.push({ name: name.value, params: queryData.value });
|
|
|
|
|
|
|
|
} catch (err) {
|
|
|
|
|
|
|
|
// 可选:ElMessage.error("操作失败");
|
|
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
|
|
loading.value = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
<style scoped></style>
|
|
|
|
<style scoped></style>
|
|
|
|