|
|
<template> <div class="formula_container"> <div v-if="isAddPreSettingVisible"> <AddPreSetting :hideSettingModal="hideAddSettingModal" /> </div> <div v-else-if="isUpdatePreSettingVisible"> <UpdatePreSetting :formulaInfo="formulaInfo" :hideSettingModal="hideUpdateSettingModal" /> </div> <div v-else> <div class="header_wrap"> <p>配方名称</p> <p>操作</p> </div> <div id="set_device_container" :class=" formulaStore?.formulaList?.length == 0 ? 'content_wrap layout' : 'content_wrap' " > <img :src="Top" v-if="formulaStore?.formulaList?.length > 6" @click.prevent="topContainer" class="top_arrow" alt="" /> <img :src="Down" v-if="formulaStore?.formulaList?.length > 6" @click.prevent="bottomContainer" class="bottom_arrow" alt="" /> <div class="line" v-for="item in formulaStore?.formulaList" :key="item.id" > <div class="username">{{ item?.formula_id }}</div> <div class="btns"> <div class="btn" @click="delModalShow(item)">删除</div> <div class="btn mg" @click="showUpdateSetting(item)">配置</div> <div class="btn" @click="runConfig(item)">执行</div> </div> </div> <svg v-if="formulaStore?.formulaList?.length == 0" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="129" height="148.6171875" viewBox="0 0 129 148.6171875" > <g> <g> <path d="M77.56318437499999,42.283203125L77.56318437499999,47.883203125C77.56318437499999,49.516503125,78.93818437499999,50.683203125,80.771484375,50.683203125L87.41728437500001,50.683203125L87.41728437500001,64.91650312499999C87.41728437500001,66.549903125,86.04228437500001,67.716503125,84.208984375,67.716503125L67.708984375,67.716503125C65.87568437499999,67.716503125,64.50068437499999,66.316503125,64.50068437499999,64.91650312499999L64.50068437499999,44.849903125C64.50068437499999,43.216503125,65.87568437499999,42.049903125,67.708984375,42.049903125L77.56318437499999,42.049903125L77.56318437499999,42.283203125ZM42.500651375,52.083203125C45.021484375,54.883203125,50.063154374999996,56.983203125,59.000684375,56.983203125L60.604784375,56.983203125L60.604784375,66.783203125L59.000684375,66.783203125C48.000654374999996,66.783203125,41.583984784782,63.516503125,41.583984784782,59.783203125L41.583984784782,54.183203125C41.583984784782,53.483203125,41.813151375,52.783203125,42.500651375,52.083203125ZM78.25068437499999,63.283203125L69.083984375,63.283203125L69.083984375,65.61650312500001L78.25068437499999,65.61650312500001L78.25068437499999,63.283203125ZM82.833984375,58.616503125L69.083984375,58.616503125L69.083984375,60.949903125L82.833984375,60.949903125L82.833984375,58.616503125ZM82.833984375,53.949903125L69.083984375,53.949903125L69.083984375,56.283203125L82.833984375,56.283203125L82.833984375,53.949903125ZM42.500651375,38.316503125C45.021484375,41.116503125,50.063154374999996,43.216503125,59.000684375,43.216503125L60.604784375,43.216503125L60.604784375,53.016503125L59.000684375,53.016503125C48.000654374999996,53.016503125,41.583984784782,49.749903125,41.583984784782,46.016503125L41.583984784782,40.416503125C41.583984784782,39.716503125,41.813151375,39.016503125,42.500651375,38.316503125ZM80.54228437500001,42.283203125L87.41728437500001,49.283203125L81.91728437500001,49.283203125C81.22978437500001,49.283203125,80.54228437500001,48.583203125,80.54228437500001,47.883203125L80.54228437500001,42.283203125ZM59.000684375,21.283203125C70.00068437499999,21.283203125,77.56318437499999,24.316533125,77.56318437499999,28.283203125L77.56318437499999,32.483203125C77.56318437499999,36.449903125,70.00068437499999,39.483203125,59.000684375,39.483203125C48.000654374999996,39.483203125,41.583984375,36.449903125,41.583984375,32.483203125L41.583984375,28.283203125C41.583984375,24.316533125,48.000654374999996,21.283202707767,59.000684375,21.283203125Z" fill="#999999" fill-opacity="1" /> </g> <g> <path d="M63.989446875,0C39.391046875,0,19.373046875,20.2104,19.373046875,45.0454C19.373046875,69.8804,39.391046875,90.0908,63.989446875,90.0908C88.587846875,90.0908,108.605846875,69.8804,108.605846875,45.0454C108.605846875,20.2104,88.598046875,0,63.989446875,0ZM63.989446875,83.7231C42.864446875,83.7231,25.680076875,66.3735,25.680076875,45.0454C25.680076875,36.145,28.686326875,27.9419,33.703546875,21.3999L89.999646875,73.3975C83.17464687500001,79.7959,74.033946875,83.7231,63.989446875,83.7231ZM94.275346875,68.6909L37.969146875,16.6934C44.804246875000004,10.2949,53.955046875,6.36768,63.989446875,6.36768C85.114446875,6.36768,102.298846875,23.7173,102.298846875,45.0454C102.298846875,53.9458,99.302746875,62.1489,94.275346875,68.6909Z" fill="#999999" fill-opacity="1" /> </g> <g> <path d="M16.89,116.8571875L16.89,121.2971875C16.89,123.7571875,16.68,126.9971875,14.73,129.3971875C15.33,129.6671875,16.44,130.4171875,16.89,130.8371875C18.45,128.9171875,19.08,126.2471875,19.32,123.8171875L22.71,123.8171875L22.71,130.6871875L25.32,130.6871875L25.32,123.8171875L28.62,123.8171875L28.62,121.5371875L19.41,121.5371875L19.41,121.3571875L19.41,118.7771875C22.41,118.5371875,25.62,118.0571875,27.96,117.3671875L26.58,115.2296875C24.21,116.0134875,20.25,116.5866875,16.89,116.8571875ZM7.77,137.4671875L22.23,137.4671875L22.23,139.53718750000002L7.77,139.53718750000002L7.77,137.4671875ZM7.77,135.5171875L7.77,133.4771875L22.23,133.4771875L22.23,135.5171875L7.77,135.5171875ZM5.07,131.3171875L5.07,142.72468750000002L7.77,142.72468750000002L7.77,141.7271875L22.23,141.7271875L22.23,142.6941875L25.05,142.6941875L25.05,131.3171875L5.07,131.3171875ZM1.56,126.6971875L1.77,129.03718750000002L8.55,128.3171875L8.55,130.6871875L11.16,130.6871875L11.16,128.0471875L15.39,127.5671875L15.36,125.5271875L11.16,125.8871875L11.16,124.0271875L15.66,124.0271875L15.66,121.8071875L11.16,121.8071875L11.16,119.9471875L8.55,119.9471875L8.55,121.8071875L5.16,121.8071875C5.91,120.9371875,6.69,119.9771875,7.44,118.9271875L15.57,118.9271875L15.57,116.7671875L8.88,116.7671875L9.6,115.5615675L6.75,114.8378175C6.48,115.4710975,6.15,116.1343875,5.82,116.7671875L1.53,116.7671875L1.53,118.9271875L4.53,118.9271875C3.99,119.7371875,3.54,120.3671875,3.3,120.6671875C2.7,121.3571875,2.22,121.8371875,1.71,121.9571875C2.01,122.6471875,2.43,123.9371875,2.58,124.4771875C2.85,124.2071875,3.87,124.0271875,5.1,124.0271875L8.55,124.0271875L8.55,126.1271875L1.56,126.6971875ZM36.33,116.82718750000001L36.33,119.6171875L46.02,119.6171875C45.96,121.5671875,45.87,123.57718750000001,45.6,125.5571875L34.47,125.5571875L34.47,128.3471875L45.06,128.3471875C43.83,133.2671875,40.95,137.7671875,34.05,140.3471875C34.77,140.94718749999998,35.58,141.9671875,35.97,142.7232875C43.68,139.5971875,46.71,134.1671875,48,128.3471875L48.24,128.3471875L48.24,137.94718749999998C48.24,141.0671875,49.14,141.9971875,52.56,141.9971875C53.25,141.9971875,56.94,141.9971875,57.66,141.9971875C60.72,141.9971875,61.59,140.7071875,61.92,135.7571875C61.11,135.5471875,59.82,135.0671875,59.19,134.5571875C59.04,138.5471875,58.83,139.2071875,57.45,139.2071875C56.61,139.2071875,53.55,139.2071875,52.89,139.2071875C51.45,139.2071875,51.21,139.0271875,51.21,137.9171875L51.21,128.3471875L61.65,128.3471875L61.65,125.5571875L48.48,125.5571875C48.75,123.57718750000001,48.84,121.5671875,48.93,119.6171875L59.97,119.6171875L59.97,116.82718750000001L36.33,116.82718750000001ZM79.05,115.3459375C78.54,116.4887875,77.61,118.2024875,76.89,119.2848875L78.72,120.1266875C79.53,119.1648875,80.49,117.6915875,81.42,116.3382875L79.05,115.3459375ZM68.37,116.3382875C69.15,117.5710875,69.9,119.2248875,70.14,120.2771875L72.3,119.3152875C72.03,118.2624875,71.22,116.66918749999999,70.41,115.4964075L68.37,116.3382875ZM77.82,132.69718749999998C77.19,134.0190875,76.35,135.1909875,75.36,136.1818875C74.37,135.6713875,73.35,135.1909875,72.36,134.7399875L73.5,132.69718749999998L77.82,132.69718749999998ZM68.91,135.6713875C70.32,136.2423875,71.91,136.9932875,73.38,137.77418749999998C71.55,139.0060875,69.39,139.87698749999998,67.05,140.3879875C67.53,140.92848750000002,68.07,141.91988750000002,68.34,142.5507875C71.07,141.7998875,73.59,140.6879875,75.69,139.0360875C76.65,139.6065875,77.49,140.1474875,78.15,140.6579875L79.86,138.7955875C79.2,138.3451875,78.39,137.8641875,77.52,137.3537875C79.08,135.6113875,80.28,133.4785875,81.03,130.8371875L79.5,130.2671875L79.05,130.3571875L74.64,130.3571875L75.21,128.9771875L72.72,128.4971875C72.48,129.0971875,72.24,129.7271875,71.94,130.3571875L67.98,130.3571875L67.98,132.69718749999998L70.74,132.69718749999998C70.14,133.8090875,69.48,134.8304875,68.91,135.6713875ZM73.38,114.8349975L73.38,120.3371875L67.41,120.3371875L67.41,122.6171875L72.51,122.6171875C71.04,124.3571875,68.91,125.9771875,66.96,126.7871875C67.5,127.32718750000001,68.13,128.28718750000002,68.46,128.9171875C70.14,127.9871875,71.94,126.5471 fill="#9E9E9E" fill-opacity="1" /> </g> </g> </svg> </div> <div class="bottom_btn"> <svg v-if="formulaStore?.formulaList?.length < 8" @click="addNewPre" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="158" height="40" viewBox="0 0 158 40" > <g> <g> <g> <rect x="0" y="0" width="158" height="40" rx="20" fill="#06518B" fill-opacity="1" /> </g> <g> <path d="M21.014699999999998,7Q23.694200000000002,7,26.0646,8.017009999999999Q28.4349,9.03401,30.2016,10.80272Q31.9683,12.57143,32.9841,14.94445Q34,17.317500000000003,34,20Q34,22.712,32.9841,25.0703Q31.9683,27.4286,30.2016,29.1973Q28.4349,30.966,26.0646,31.983Q23.694200000000002,33,21.014699999999998,33Q18.305799999999998,33,15.93545,31.983Q13.56512,30.966,11.79841,29.1973Q10.03171,27.4286,9.01585,25.0703Q7.999999670926,22.712,8,20Q8,17.317500000000003,9.01585,14.94445Q10.03171,12.57143,11.79841,10.80272Q13.56512,9.03401,15.93545,8.017009999999999Q18.305799999999998,6.999999231289,21.014699999999998,7ZM28.4349,21.7982Q29.2005,21.7982,29.7305,21.2528Q30.2605,20.7075,30.2605,19.941000000000003Q30.2605,19.174599999999998,29.7305,18.644Q29.2005,18.1134,28.4349,18.1134L22.8992,18.1134L22.8992,12.57143Q22.8992,11.80499,22.3545,11.259640000000001Q21.8097,10.71429,21.0442,10.71429Q20.2786,10.71429,19.7486,11.259640000000001Q19.218600000000002,11.80499,19.218600000000002,12.57143L19.218600000000002,18.1134L13.6829,18.1134Q12.91733,18.1134,12.387319999999999,18.644Q11.85731,19.174599999999998,11.85731,19.941000000000003Q11.85731,20.7075,12.387319999999999,21.2528Q12.91733,21.7982,13.6829,21.7982L19.218600000000002,21.7982L19.218600000000002,27.3107Q19.218600000000002,28.0771,19.7486,28.6225Q20.2786,29.1678,21.0442,29.1678Q21.8097,29.1678,22.3545,28.6225Q22.8992,28.0771,22.8992,27.3107L22.8992,21.7982L28.4349,21.7982Z" fill="#FFFFFF" fill-opacity="1" /> </g> <g> <path d="M53.512,21.852C53.144,23.067999999999998,52.472,24.46,51.480000000000004,25.276L52.36,25.932C53.4,25.004,54.056,23.5,54.456,22.22L53.512,21.852ZM57.288,22.412C57.752,23.484,58.216,24.892,58.344,25.836L59.32,25.468C59.16,24.556,58.712,23.164,58.184,22.108L57.288,22.412ZM59.256,21.98C60.168,23.195999999999998,61.128,24.876,61.512,25.98L62.519999999999996,25.468C62.104,24.364,61.144,22.747999999999998,60.2,21.532L59.256,21.98ZM55.528,20.124000000000002L55.528,26.428C55.528,26.62,55.464,26.684,55.24,26.684C55.032,26.684,54.344,26.7,53.544,26.668C53.688,27.004,53.832,27.436,53.88,27.756C54.952,27.756,55.656,27.74,56.088,27.564C56.519999999999996,27.388,56.647999999999996,27.068,56.647999999999996,26.444L56.647999999999996,20.124000000000002L55.528,20.124000000000002ZM48.36,14.044C49.288,14.508,50.408,15.26025,50.936,15.80475L51.656,14.828C51.096000000000004,14.3,49.976,13.6105,49.064,13.17625L48.36,14.044ZM47.608,18.3823C48.568,18.7985,49.72,19.486800000000002,50.28,19.999299999999998L50.968,19.0225C50.392,18.5103,49.24,17.88575,48.264,17.50175L47.608,18.3823ZM47.96,26.8833L49.032,27.5555C49.736,26.1308,50.536,24.2578,51.144,22.6568L50.184,21.984299999999998C49.512,23.7133,48.6,25.6985,47.96,26.8833ZM52.232,13.948L52.232,15.068L55.768,15.068C55.592,15.804,55.352000000000004,16.524,55.048,17.212L51.496,17.212L51.496,18.348L54.456,18.348C53.656,19.6453,52.552,20.766,51.064,21.5028C51.288,21.7268,51.64,22.1593,51.8,22.4155C53.624,21.4708,54.903999999999996,20.0295,55.8,18.348L57.816,18.348C58.712,19.9495,60.216,21.4225,61.752,22.1593C61.928,21.871000000000002,62.296,21.4545,62.536,21.2305C61.208,20.67,59.912,19.5813,59.064,18.348L62.263999999999996,18.348L62.263999999999996,17.212L56.344,17.212C56.616,16.524,56.84,15.804,57.032,15.068L61.72,15.068L61.72,13.948L52.232,13.948ZM73.752,15.02L73.752,27.5208L74.904,27.5208L74.904,26.332L78.008,26.332L78.008,27.3923L79.208,27.3923L79.208,15.02L73.752,15.02ZM74.904,25.18L74.904,16.188000000000002L78.008,16.188000000000002L78.008,25.18L74.904,25.18ZM67.72,13.238L67.70400000000001,16.076L65.44800000000001,16.076L65.44800000000001,17.244L67.672,17.244C67.56,21.276,67.064,24.828,65.048,26.94C65.352,27.132,65.78399999999999,27.5,65.976,27.7745C68.136,25.42,68.696,21.58,68.84,17.244L71.27199999999999,17.244C71.144,23.404,71,25.596,70.664,26.06C70.52,26.268,70.36,26.332,70.12,26.316C69.832,26.316,69.144,26.316,68.392,26.252C68.6,26.588,68.712,27.1,68.744,27.452C69.464,27.5,70.2,27.5163,70.648,27.452C71.112,27.388,71.416,27.244,71.70400000000001,26.828C72.2,26.14,72.312,23.804000000000002,72.44,16.683999999999997C72.44,16.508,72.44,16.076,72.44,16.076L68.872,16.076L68.904,13.238L67.72,13.238ZM87.96000000000001,23.067999999999998C88.44,23.868000000000002,89.01599999999999,24.956,89.27199999999999,25.66L90.12,25.148C89.88,24.476,89.304,23.436,88.77600000000001,22.636L87.96000000000001,23.067999999999998ZM84.36,22.716C84.03999999999999,23.692,83.512,24.684,82.856,25.388C83.096,25.532,83.512,25.836,83.70400000000001,25.996C84.328,25.244,84.968,24.076,85.336,22.956L84.36,22.716ZM91.048,14.57175L91.048,20.076C91.048,22.204,90.92,24.956,89.56,26.876C89.816,27.02,90.29599999999999,27.388,90.488,27.6138C91.96000000000001,25.5375,92.168,22.3828,92.168,20.0768L92.168,19.564L94.6,19.564L94.6,27.6835L95.768,27.6835L95.768,19.564L97.52799999999999,19.564L97.52799999999999,18.444000000000003L92.168,18.444000000000003L92.168,15.368C93.864,15.11175,95.688,14.69525,97.032,14.1985L96.056,13.31725C94.904,13.801,92.84,14.28275,91.048,14.57175ZM85.624,13.239C85.88,13.688500000000001,86.136,14.2345,86.328,14.716000000000001L83.176,14.716000000000001L83.176,15.724L90.24799999999999,15.724L90.24799999999999,14.716000000000001L87.576,14.716000000000001C87.368,14.186250000000001,87.01599999999999,13.496,86.712,12.966000000000001L85.624,13.239ZM88.232,15.804C88.03999999999999,16.54,87.672,17.628,87.368,18.364L82.936,18.364L82.936,19.387999999999998L86.21600000000001,19.387999999999998L86.21600000000001,21.052L83,21.052L83,22.108L86.21600000000001,22.108L86.21600000000001,26.188C86.21600000000001,26.3 fill="#FFFFFF" fill-opacity="1" /> </g> </g> </g> </svg> <svg v-else xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="158" height="40" viewBox="0 0 158 40" > <g> <g> <g> <rect x="0" y="0" width="158" height="40" rx="20" fill="#A8A8A8" fill-opacity="1" /> </g> <g> <path d="M21.014699999999998,7Q23.694200000000002,7,26.0646,8.017009999999999Q28.4349,9.03401,30.2016,10.80272Q31.9683,12.57143,32.9841,14.94445Q34,17.317500000000003,34,20Q34,22.712,32.9841,25.0703Q31.9683,27.4286,30.2016,29.1973Q28.4349,30.966,26.0646,31.983Q23.694200000000002,33,21.014699999999998,33Q18.305799999999998,33,15.93545,31.983Q13.56512,30.966,11.79841,29.1973Q10.03171,27.4286,9.01585,25.0703Q7.999999670926,22.712,8,20Q8,17.317500000000003,9.01585,14.94445Q10.03171,12.57143,11.79841,10.80272Q13.56512,9.03401,15.93545,8.017009999999999Q18.305799999999998,6.999999231289,21.014699999999998,7ZM28.4349,21.7982Q29.2005,21.7982,29.7305,21.2528Q30.2605,20.7075,30.2605,19.941000000000003Q30.2605,19.174599999999998,29.7305,18.644Q29.2005,18.1134,28.4349,18.1134L22.8992,18.1134L22.8992,12.57143Q22.8992,11.80499,22.3545,11.259640000000001Q21.8097,10.71429,21.0442,10.71429Q20.2786,10.71429,19.7486,11.259640000000001Q19.218600000000002,11.80499,19.218600000000002,12.57143L19.218600000000002,18.1134L13.6829,18.1134Q12.91733,18.1134,12.387319999999999,18.644Q11.85731,19.174599999999998,11.85731,19.941000000000003Q11.85731,20.7075,12.387319999999999,21.2528Q12.91733,21.7982,13.6829,21.7982L19.218600000000002,21.7982L19.218600000000002,27.3107Q19.218600000000002,28.0771,19.7486,28.6225Q20.2786,29.1678,21.0442,29.1678Q21.8097,29.1678,22.3545,28.6225Q22.8992,28.0771,22.8992,27.3107L22.8992,21.7982L28.4349,21.7982Z" fill="#FFFFFF" fill-opacity="1" /> </g> <g> <path d="M53.512,21.852C53.144,23.067999999999998,52.472,24.46,51.480000000000004,25.276L52.36,25.932C53.4,25.004,54.056,23.5,54.456,22.22L53.512,21.852ZM57.288,22.412C57.752,23.484,58.216,24.892,58.344,25.836L59.32,25.468C59.16,24.556,58.712,23.164,58.184,22.108L57.288,22.412ZM59.256,21.98C60.168,23.195999999999998,61.128,24.876,61.512,25.98L62.519999999999996,25.468C62.104,24.364,61.144,22.747999999999998,60.2,21.532L59.256,21.98ZM55.528,20.124000000000002L55.528,26.428C55.528,26.62,55.464,26.684,55.24,26.684C55.032,26.684,54.344,26.7,53.544,26.668C53.688,27.004,53.832,27.436,53.88,27.756C54.952,27.756,55.656,27.74,56.088,27.564C56.519999999999996,27.388,56.647999999999996,27.068,56.647999999999996,26.444L56.647999999999996,20.124000000000002L55.528,20.124000000000002ZM48.36,14.044C49.288,14.508,50.408,15.26025,50.936,15.80475L51.656,14.828C51.096000000000004,14.3,49.976,13.6105,49.064,13.17625L48.36,14.044ZM47.608,18.3823C48.568,18.7985,49.72,19.486800000000002,50.28,19.999299999999998L50.968,19.0225C50.392,18.5103,49.24,17.88575,48.264,17.50175L47.608,18.3823ZM47.96,26.8833L49.032,27.5555C49.736,26.1308,50.536,24.2578,51.144,22.6568L50.184,21.984299999999998C49.512,23.7133,48.6,25.6985,47.96,26.8833ZM52.232,13.948L52.232,15.068L55.768,15.068C55.592,15.804,55.352000000000004,16.524,55.048,17.212L51.496,17.212L51.496,18.348L54.456,18.348C53.656,19.6453,52.552,20.766,51.064,21.5028C51.288,21.7268,51.64,22.1593,51.8,22.4155C53.624,21.4708,54.903999999999996,20.0295,55.8,18.348L57.816,18.348C58.712,19.9495,60.216,21.4225,61.752,22.1593C61.928,21.871000000000002,62.296,21.4545,62.536,21.2305C61.208,20.67,59.912,19.5813,59.064,18.348L62.263999999999996,18.348L62.263999999999996,17.212L56.344,17.212C56.616,16.524,56.84,15.804,57.032,15.068L61.72,15.068L61.72,13.948L52.232,13.948ZM73.752,15.02L73.752,27.5208L74.904,27.5208L74.904,26.332L78.008,26.332L78.008,27.3923L79.208,27.3923L79.208,15.02L73.752,15.02ZM74.904,25.18L74.904,16.188000000000002L78.008,16.188000000000002L78.008,25.18L74.904,25.18ZM67.72,13.238L67.70400000000001,16.076L65.44800000000001,16.076L65.44800000000001,17.244L67.672,17.244C67.56,21.276,67.064,24.828,65.048,26.94C65.352,27.132,65.78399999999999,27.5,65.976,27.7745C68.136,25.42,68.696,21.58,68.84,17.244L71.27199999999999,17.244C71.144,23.404,71,25.596,70.664,26.06C70.52,26.268,70.36,26.332,70.12,26.316C69.832,26.316,69.144,26.316,68.392,26.252C68.6,26.588,68.712,27.1,68.744,27.452C69.464,27.5,70.2,27.5163,70.648,27.452C71.112,27.388,71.416,27.244,71.70400000000001,26.828C72.2,26.14,72.312,23.804000000000002,72.44,16.683999999999997C72.44,16.508,72.44,16.076,72.44,16.076L68.872,16.076L68.904,13.238L67.72,13.238ZM87.96000000000001,23.067999999999998C88.44,23.868000000000002,89.01599999999999,24.956,89.27199999999999,25.66L90.12,25.148C89.88,24.476,89.304,23.436,88.77600000000001,22.636L87.96000000000001,23.067999999999998ZM84.36,22.716C84.03999999999999,23.692,83.512,24.684,82.856,25.388C83.096,25.532,83.512,25.836,83.70400000000001,25.996C84.328,25.244,84.968,24.076,85.336,22.956L84.36,22.716ZM91.048,14.57175L91.048,20.076C91.048,22.204,90.92,24.956,89.56,26.876C89.816,27.02,90.29599999999999,27.388,90.488,27.6138C91.96000000000001,25.5375,92.168,22.3828,92.168,20.0768L92.168,19.564L94.6,19.564L94.6,27.6835L95.768,27.6835L95.768,19.564L97.52799999999999,19.564L97.52799999999999,18.444000000000003L92.168,18.444000000000003L92.168,15.368C93.864,15.11175,95.688,14.69525,97.032,14.1985L96.056,13.31725C94.904,13.801,92.84,14.28275,91.048,14.57175ZM85.624,13.239C85.88,13.688500000000001,86.136,14.2345,86.328,14.716000000000001L83.176,14.716000000000001L83.176,15.724L90.24799999999999,15.724L90.24799999999999,14.716000000000001L87.576,14.716000000000001C87.368,14.186250000000001,87.01599999999999,13.496,86.712,12.966000000000001L85.624,13.239ZM88.232,15.804C88.03999999999999,16.54,87.672,17.628,87.368,18.364L82.936,18.364L82.936,19.387999999999998L86.21600000000001,19.387999999999998L86.21600000000001,21.052L83,21.052L83,22.108L86.21600000000001,22.108L86.21600000000001,26.188C86.21600000000001,26.3 fill="#FFFFFF" fill-opacity="1" /> </g> </g> </g> </svg> </div> </div> <DelPreModal v-if="delPreModalVisible" :hideDelModal="hideDelModal" /> </div> </template>
<script setup> import { ref, onMounted } from 'vue' import DelPreModal from 'cpns/dialogs/DelPreModal' import AddPreSetting from './AddPreSetting' import UpdatePreSetting from './UpdatePreSetting' import { getAllFormulaJSON } from '@/mock/command' import { useWebSocketStore, useFormulaStore } from '@/store' import { startFormulaJSON } from '@/mock/command' import Down from '@/assets/img/arrow/down.png' import Top from '@/assets/img/arrow/top.png'
const props = defineProps({ changeTab: { type: Function, }, changeShowOperator: { type: Function, }, })
const topContainer = () => { const ele = document.getElementById('set_device_container') ele.scrollTop = ele.scrollTop - 100 < 100 ? 0 : ele.scrollTop - 100 }
const bottomContainer = () => { const ele = document.getElementById('set_device_container') ele.scrollTop = ele.scrollTop + 100 }
const webSocketStore = useWebSocketStore() const formulaStore = useFormulaStore()
const delPreModalVisible = ref(false)
const delModalShow = item => { formulaStore.updateCurrentFormula(item) delPreModalVisible.value = true }
const hideDelModal = () => { delPreModalVisible.value = false }
const isAddPreSettingVisible = ref(false) const isUpdatePreSettingVisible = ref(false) const formulaInfo = ref({}) const showUpdateSetting = item => { formulaInfo.value = item formulaStore.updateCurrentFormula(item) isUpdatePreSettingVisible.value = true }
const hideUpdateSettingModal = () => { formulaInfo.value = {} isUpdatePreSettingVisible.value = false }
const hideAddSettingModal = () => { isAddPreSettingVisible.value = false }
// 执行配置
const runConfig = item => { formulaStore.updateCurrentFormula(item) webSocketStore.sendCommandMsg(startFormulaJSON(item.id)) props.changeTab(1) // 清空localstorage
localStorage.removeItem('bin') localStorage.removeItem('envir1') localStorage.removeItem('envir2') props.changeShowOperator(false) }
const addNewPre = () => { // 添加新预设
isAddPreSettingVisible.value = true }
onMounted(() => { webSocketStore.sendCommandMsg(getAllFormulaJSON) }) </script>
<style lang="scss" scoped> .formula_container { margin-bottom: 19px; height: 580px; box-sizing: border-box; border-radius: 16px; background: #fff; .header_wrap { display: flex; align-items: center; justify-content: space-between; height: 80.29px; background: #f6f6f6; border-radius: 16px 16px 0px 0px; padding: 0 130px; box-sizing: border-box; font-family: Source Han Sans CN; font-size: 18px; font-weight: normal; line-height: normal; letter-spacing: 0.07em; color: #999999; padding-right: 222px; } .content_wrap { height: 446px; overflow: scroll; box-sizing: border-box; position: relative; .top_arrow { width: 40px; height: 40px; position: fixed; right: 45px; top: 221px; z-index: 2; } .bottom_arrow { width: 40px; height: 40px; position: fixed; right: 45px; bottom: 159px; z-index: 2; } .line { padding: 12px; padding-left: 40px; padding-right: 90px; font-family: Source Han Sans CN; font-size: 18px; font-weight: normal; line-height: normal; letter-spacing: 0.07em; color: #191919; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #f6f6f6; box-sizing: border-box; .username { width: 251px; font-size: 22px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-align: center; } .btns { display: flex; align-items: center; .btn { width: 87px; height: 45px; border-radius: 23px; background: #06518b; display: flex; align-items: center; justify-content: center; font-family: Source Han Sans CN; font-size: 20px; font-weight: normal; line-height: normal; letter-spacing: 0.1em; color: #ffffff; } .mg { margin: 0 20px; } } } } .layout { display: flex; align-items: center; justify-content: center; } .bottom_btn { display: flex; align-items: center; justify-content: flex-end; padding-right: 89px; height: 54px; } } </style>
|