移动应用系统复制功能

lijinlongNew
严飞永 1 month ago
parent 4e8b13c62a
commit ebb3219687

@ -552,40 +552,40 @@ export default {
cb(results);
},
//
newAssets() {
this.$refs["ruleForm"].validate((valid) => {
if (valid) {
this.loading = true;
newAssets() {
this.$refs["ruleForm"].validate((valid) => {
if (valid) {
this.loading = true;
// 1add
if (this.pageType === "add") {
this.ruleForm.xzType = 1;
assetEmail("post", this.ruleForm).then((res) => {
this.loading = false;
this.$modal.msgSuccess("提交成功,待管理员审核通过后完成新增");
this.$router.push({ name: this.name, params: this.queryData });
});
// 1add
if (this.pageType === "add") {
this.ruleForm.xzType = 1;
assetEmail("post", this.ruleForm).then((res) => {
this.loading = false;
this.$modal.msgSuccess("提交成功,待管理员审核通过后完成新增");
this.$router.push({ name: this.name, params: this.queryData });
});
// 2change copy=0
} else if (this.pageType === "change" && this.copy === 0) {
EmailUnitEdit(this.ruleForm).then((res) => {
this.loading = false;
this.$modal.msgSuccess("提交成功,待管理员审核通过后完成修改");
this.$router.push({ name: this.name, params: this.queryData });
});
// 2change copy=0
} else if (this.pageType === "change" && this.copy === 0) {
EmailUnitEdit(this.ruleForm).then((res) => {
this.loading = false;
this.$modal.msgSuccess("提交成功,待管理员审核通过后完成修改");
this.$router.push({ name: this.name, params: this.queryData });
});
// 3change copy=1
} else if (this.pageType === "change" && this.copy === 1) {
this.ruleForm.xzType = 1;
assetEmail("post", this.ruleForm).then((res) => {
this.loading = false;
this.$modal.msgSuccess("提交成功,待管理员审核通过后完成新增");
this.$router.push({ name: this.name, params: this.queryData });
});
}
}
});
},
// 3change copy=1
} else if (this.pageType === "change" && this.copy === 1) {
this.ruleForm.xzType = 1;
assetEmail("post", this.ruleForm).then((res) => {
this.loading = false;
this.$modal.msgSuccess("提交成功,待管理员审核通过后完成新增");
this.$router.push({ name: this.name, params: this.queryData });
});
}
}
});
},
sendBack() {
// this.$router.go(-1);
this.$router.push({ name: this.name, params: this.queryData });

@ -1,4 +1,4 @@
<!-- 移动应用程序表单 -->
<!-- 单位端--我的资产--移动应用程序表单 -->
<template>
<div class="L-assets-info">
<div class="assets-info-top">
@ -32,7 +32,7 @@
<el-input
v-model="ruleForm.appName"
placeholder="请输入移动应用名称"
:disabled="pageType == 'change'"
:disabled="pageType == 'change' && this.copy === 0"
></el-input>
</el-form-item>
</el-col>
@ -357,6 +357,7 @@ export default {
}
};
return {
copy: 0,
ruleForm: {},
rules: {
bfyy: [{ validator: changeSateTetx, trigger: "blur" }],
@ -439,6 +440,7 @@ export default {
},
props: ["pageType", "id", "audit", "isModdle", "name", "queryData"],
mounted() {
this.copy = Number(this.$route.query.copy) || 0;
if (this.isModdle) {
if (this.pageType == "look") {
this.getInfoTwo(this.id);
@ -501,6 +503,10 @@ export default {
getInfo(id) {
assetAppInfo(id).then((res) => {
this.ruleForm = res.data;
if (this.pageType === "change" && this.copy === 1) {
this.ruleForm.appName = "";
this.ruleForm.id = "";
}
setTimeout(() => {
this.$refs.ruleForm.clearValidate();
}, 100);
@ -509,6 +515,10 @@ export default {
getInfoTwo(id) {
AppLookInfo(id).then((res) => {
this.ruleForm = res.data;
if (this.pageType === "change" && this.copy === 1) {
this.ruleForm.appName = "";
this.ruleForm.id = "";
}
setTimeout(() => {
this.$refs.ruleForm.clearValidate();
}, 100);
@ -528,32 +538,40 @@ export default {
cb(results);
},
//
newAssets() {
this.$refs["ruleForm"].validate((valid) => {
if (valid) {
this.loading = true;
if (this.pageType == "change") {
assetAppUnitEdit(this.ruleForm).then((res) => {
// console.log(res,"res");
this.loading = false;
this.$modal.msgSuccess("提交成功,待管理员审核通过后完成修改");
// this.$router.go(-1);
this.$router.push({ name: this.name, params: this.queryData });
});
} else {
this.ruleForm.xzType = 1;
assetApp("post", this.ruleForm).then((res) => {
// console.log(res,"res");
this.loading = false;
// this.$modal.msgSuccess("");
this.$modal.msgSuccess("提交成功,待管理员审核通过后完成新增");
newAssets() {
this.$refs["ruleForm"].validate((valid) => {
if (valid) {
this.loading = true;
this.$router.push({ name: this.name, params: this.queryData });
});
}
}
});
},
// 1add
if (this.pageType === "add") {
this.ruleForm.xzType = 1;
assetApp("post", this.ruleForm).then((res) => {
this.loading = false;
this.$modal.msgSuccess("提交成功,待管理员审核通过后完成新增");
this.$router.push({ name: this.name, params: this.queryData });
});
// 2change copy=0
} else if (this.pageType === "change" && this.copy === 0) {
assetAppUnitEdit(this.ruleForm).then((res) => {
this.loading = false;
this.$modal.msgSuccess("提交成功,待管理员审核通过后完成修改");
this.$router.push({ name: this.name, params: this.queryData });
});
// 3change copy=1
} else if (this.pageType === "change" && this.copy === 1) {
this.ruleForm.xzType = 1;
assetApp("post", this.ruleForm).then((res) => {
this.loading = false;
this.$modal.msgSuccess("提交成功,待管理员审核通过后完成新增");
this.$router.push({ name: this.name, params: this.queryData });
});
}
}
});
},
sendBack() {
// this.$router.go(-1);
this.$router.push({ name: this.name, params: this.queryData });

@ -208,6 +208,31 @@
>编辑</span
>
</div>
<div
v-if="
!scope.row.auditState ||
scope.row.auditState == 2 ||
scope.row.xtzt == '5'
"
style="
display: flex;
align-items: center;
cursor: pointer;
margin-left: 10px;
"
@click="goInfo(scope.row, 3)"
>
<img
src="@/assets/images/icon-fz.png"
alt=""
style="width: 15px; margin-right: 5px"
/>
<span
class="look-info"
style="color: #1485ef; margin-right: 15px"
>复制</span
>
</div>
</div>
</template>
</el-table-column>
@ -317,14 +342,25 @@ export default {
},
//
goInfo(row, id) {
let pageMode;
let copyParam = 0;
if (id === 1) {
pageMode = "look"; //
} else if (id === 2) {
pageMode = "change"; //
} else if (id === 3) {
pageMode = "change"; //
copyParam = 1;
}
this.$router.push({
name: "myAssetsAuth",
query: {
pageType: id == 1 ? "look" : "change",
pageType: pageMode,
type: 4,
id: row.id,
queryData: this.formInline,
name: "MyMobileApplication",
copy: copyParam,
},
});
},

Loading…
Cancel
Save