123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312 |
- <template>
- <div>
- <basicDetails
- ref="details"
- :titleText="mainData.itemname"
- :oldFormPath="{ edit: 'optionSystem/executeManage/modules' }"
- :editData="mainData"
- :mainAreaData="mainAreaData"
- turnPageId="2024060514063602"
- delApiId="2024060514040602"
- idname="itemid"
- ownertable="plm_item"
- tags=""
- :tabs="['基本信息']"
- :statusCheck="[{key:'status',value:'审核'}]"
- @pageChange="pageChange"
- @onEditSuccess="queryMainData($route.query.id)"
- >
- <div slot="customOperation">
- <customBtn
- class="inline-16"
- btnName="审核"
- message="确定审核当前执行器吗?"
- idName="2024060514051502"
- keyName="itemids"
- :id="[$route.query.id]"
- :paramData="[{key:'ischeck',value:1}]"
- @onSuccess="queryMainData()"
- v-if="mainData.status == '新建' && tool.checkAuth($route.name,'check')"
- />
- <customBtn
- class="inline-16"
- btnName="反审核"
- message="确定反审核当前执行器吗?"
- idName="2024060514051502"
- keyName="itemids"
- :id="[$route.query.id]"
- :paramData="[{key:'ischeck',value:0}]"
- @onSuccess="queryMainData()"
- v-if="mainData.status == '审核' && tool.checkAuth($route.name,'nocheck')"
- />
- </div>
- <div slot="slot0">
- <DetailInfo :more="true" :data="detailInfo"></DetailInfo>
- </div>
- </basicDetails>
- </div>
- </template>
- <script>
- import DetailInfo from "@/components/detailInfo/index";
- export default {
- name: "detail",
- components:{DetailInfo},
- data() {
- return {
- mainData: {},
- mainAreaData: {},
- detailInfo: [],
- bodystructure: [],
- actuatordrivetype:[],
- actuatortype:[],
- func: [],
- };
- },
- provide() {
- return {
- bodystructure: () => {
- return this.bodystructure;
- },
- actuatordrivetype: () => {
- return this.actuatordrivetype;
- },
- actuatortype: () => {
- return this.actuatortype;
- },
- func: () => {
- return this.func;
- },
- };
- },
- methods: {
- async queryMainData(id) {
- const res = await this.$api.requested({
- id:2024060513424502,
- content: {
- itemid: this.$route.query.id,
- },
- });
- this.mainData = res.data;
- console.log(this.mainData,'详情');
- this.changeDataStructure();
- },
- changeDataStructure() {
- let that = this
- this.mainAreaData = [
- {
- label: "执行器料号",
- value: this.mainData.itemno,
- },
- {
- label: "名称",
- value: this.mainData.itemname,
- },
- {
- label: "转速",
- value: this.mainData.speed,
- },
- {
- label: "法兰号",
- value: this.mainData.flh.join('-'),
- },
- {
- label: "品牌",
- value: this.mainData.actuatorbrand,
- },
- {
- label: "系列",
- value: this.mainData.actuatorseries,
- },
- {
- label: "牌价",
- value: this.tool.formatAmount(this.mainData.marketprice,2),
- },
- {
- label: "状态",
- value:this.mainData.status,
- style:function () {
- let style = {}
- switch (that.mainData.status) {
- case '新建':
- style = {color:"#000000"}
- break;
- case '审核':
- style = {color:"#52C41A"}
- break;
- default:
- break;
- }
- return style
- }
- },
- ];
- this.detailInfo = [
- {
- title: "基本信息",
- info: [
- {
- label: "执行器料号",
- value: this.mainData.itemno,
- },
- {
- label: "名称",
- value: this.mainData.itemname,
- },
- {
- label: "执行器类型",
- value: this.mainData.actuatortype,
- },
- {
- label: "执行器驱动类型",
- value: this.mainData.actuatordrivetype,
- },
- {
- label: "电源电压",
- value: this.mainData.supplyvoltage,
- },
- {
- label: "转速",
- value: this.mainData.speed,
- },
- {
- label: "法兰号",
- value: this.mainData.flh.join('-'),
- },
- {
- label: "重量",
- value: this.mainData.weight,
- },
- {
- label: "说明",
- value: this.mainData.remarks,
- },
- {
- label: "品牌",
- value: this.mainData.actuatorbrand,
- },
- {
- label: "型号",
- value: this.mainData.model,
- },
- {
- label: "手轮速比",
- value: this.mainData.handwheelratio,
- },
- {
- label: "扭矩",
- value: this.mainData.torque,
- },
- {
- label: "额定功率",
- value: this.mainData.ratedpower,
- },
- {
- label: "额定电流",
- value: this.mainData.ratedcurrent,
- },
- {
- label: "90°最大运行时间",
- value: this.mainData.maxruntime,
- },
- {
- label: "圆阀杆最大直径",
- value: this.mainData.maxrounddiameter,
- },
- {
- label: "方阀杆最大宽度",
- value: this.mainData.maxsquarewidth.join('-'),
- },
- {
- label: "结构",
- value: this.mainData.bodystructure,
- },
- {
- label: "功能",
- value: this.mainData.func,
- },
- {
- label: "备注",
- value: this.mainData.remarks,
- },
- {
- label: "牌价",
- value: this.tool.formatAmount(this.mainData.marketprice,2),
- },
- {
- label: "状态",
- value:this.mainData.status,
- style:function () {
- let style = {}
- switch (that.mainData.status) {
- case '新建':
- style = {color:"#000000"}
- break;
- case '审核':
- style = {color:"#52C41A"}
- break;
- default:
- break;
- }
- return style
- }
- },
- ],
- },
- {
- title: "系统信息",
- info: [
- { label: "创建人", value: this.mainData.createby },
- { label: "创建时间", value: this.mainData.createdate },
- { label: "最近编辑人", value: this.mainData.changeby },
- { label: "最近编辑时间", value: this.mainData.changedate },
- { label: "审核人", value: this.mainData.checkby },
- { label: "审核时间", value: this.mainData.checkdate },
- ],
- },
- ];
- console.log(this.mainAreaData);
- },
- optionList() {
- this.$store.dispatch("optiontypeselect", "bodystructure").then((res) => {
- this.bodystructure = res.data;
- console.log(this.bodystructure, "结构");
- });
- this.$store.dispatch("optiontypeselect", "func").then((res) => {
- this.func = res.data;
- console.log(this.func, "功能");
- });
- this.$store.dispatch("optiontypeselect", "actuatortype").then((res) => {
- this.actuatortype = res.data;
- console.log(this.actuatortype, "执行器类型");
- });
- this.$store.dispatch("optiontypeselect", "actuatordrivetype").then((res) => {
- this.actuatordrivetype = res.data;
- console.log(this.actuatordrivetype, "执行器驱动类型");
- });
- },
- // 监听切换数据,上一页,下一页
- pageChange(id, rowindex, tabIndex) {
- this.flag = false;
- tabIndex = this.$route.query.tabIndex;
- this.$router.replace({
- path: "/executeDetail",
- query: { id: id, rowindex: rowindex, tabIndex: tabIndex },
- });
- this.queryMainData(id);
- },
- onSuccess() {
- this.visible = false;
- this.queryMainData(this.$route.query.id);
- this.$emit("onSuccess");
- },
- },
- created() {
- this.optionList()
- this.queryMainData(this.$route.query.id)
- },
- };
- </script>
- <style scoped>
- </style>
|