ListActivity show List<Obejct>

---------------------------------------------------------
listTitle<String>
setListAdapter(new ArrayAdapter(this, R.layout.rsslist_item,
listTitle));
-------------------------------------------------------------
list<items>
public class ItemAdapter extends BaseAdapter{
...
...
...
}

setListAdapter(new ItemAdapter(this,items));

----------------------------------------------------------------
mCursor = managedQuery(getIntent().getData(), PROJECTION, null, null);

SimpleCursorAdapter adapter = new SimpleCursorAdapter(this, R.layout.noteslist_item, cursor,
new String[] { Notes.TITLE }, new int[] { android.R.id.text1 });
setListAdapter(adapter);

----------------------------------------------------------------

list<map<String,Object>>
activity_main.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@android:color/white" android:orientation="vertical"> <RelativeLayout android:layout_width="match_parent" android:layout_height="50dp" android:layout_marginBottom="4dp" android:background="@color/gray" android:gravity="center_vertical"> <TextView android:id="@+id/tv_order" style="@style/tvNavigationBarStyle" android:text="点菜" android:textColor="@android:color/black" /> <TextView android:id="@+id/tv_discuss" style="@style/tvNavigationBarStyle" android:layout_toRightOf="@id/tv_order" android:text="评价" android:textColor="@color/dark_gray" /> <TextView android:id="@+id/tv_business" style="@style/tvNavigationBarStyle" android:layout_toRightOf="@id/tv_discuss" android:text="商家" android:textColor="@color/dark_gray" /> <TextView android:layout_width="70dp" android:layout_height="30dp" android:layout_alignParentRight="true" android:layout_marginRight="15dp" android:background="@drawable/friend_list" android:gravity="center" android:text="好友拼单" android:textColor="#ef842c" android:textSize="12sp" /> </RelativeLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal"> <fragment android:id="@+id/left" android:name="cn.itcast.menu.LeftFragment" android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" tools:layout="@layout/left_layout" /> <fragment android:id="@+id/right" android:name="cn.itcast.menu.RightFragment" android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="3" tools:layout="@layout/right_layout" /> </LinearLayout> </LinearLayout> left_layout.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#f7f8f9" android:gravity="center_horizontal" android:orientation="vertical"> <TextView android:id="@+id/tv_recommend" style="@style/tvLeftStyle" android:text="推荐" android:background="@android:color/white"/> <TextView android:id="@+id/tv_must_buy" style="@style/tvLeftStyle" android:text="进店必买" /> </LinearLayout> list_item.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal" android:padding="4dp"> <ImageView android:id="@+id/iv_img" android:layout_width="70dp" android:layout_height="70dp" /> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="8dp" android:layout_marginRight="8dp" android:orientation="vertical"> <TextView android:id="@+id/tv_name" android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="2dp" android:textColor="@android:color/black" android:textSize="14sp" /> <TextView android:id="@+id/tv_sale" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#868788" android:textSize="12sp" /> <TextView android:id="@+id/tv_price" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="2dp" android:textColor="#e85b4d" android:textSize="12sp" /> </LinearLayout> </LinearLayout> right_layout.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@android:color/white" android:orientation="vertical"> <ListView android:id="@+id/lv_list" android:layout_width="match_parent" android:layout_height="wrap_content" android:divider="@null"/> </LinearLayout> FoodBean.java package cn.itcast.menu; import java.io.Serializable; public class FoodBean implements Serializable { //序列化时保持FoodBean类版本的兼容性 private static final long serialVersionUID = 1L; private String name; //菜品名称 private String sales; //月售信息 private String price; //菜品价格 private int img; //菜品图片 public String getName() { return name; } public void setName(String name) { this.name = name; } public String getSales() { return sales; } public void setSales(String sales) { this.sales = sales; } public String getPrice() { return price; } public void setPrice(String price) { this.price = price; } public int getImg() { return img; } public void setImg(int img) { this.img = img; } } LeftFragment.java import android.app.Fragment; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; public class LeftFragment extends Fragment { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view =inflater.inflate(R.layout.left_layout,container,false); return view; } @Override public void onPause() { super.onPause(); } } RightAdapter.java import android.content.Context; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.ImageView; import android.widget.TextView; import java.util.List; public class RightAdapter extends BaseAdapter { private Context mContext; private List<FoodBean> list; public RightAdapter(Context context ,List<FoodBean> list) { this.mContext = context; this.list=list; } @Override public int getCount() { //获取列表条目的总数 return list.size(); //返回ListView 条目的总数 } @Override public Object getItem(int position) { return list.get(position); //返回列表条目的数据对象 } @Override public long getItemId(int position) { return position; //返回列表条目的id } @Override public View getView(int position, View convertView, ViewGroup parent) { ViewHolder holder = null; if (convertView == null) { convertView = View.inflate(mContext, R.layout.list_item, null); holder = new ViewHolder(); holder.tv_name = convertView.findViewById(R.id.tv_name); holder.tv_sale = convertView.findViewById(R.id.tv_sale); holder.tv_price = convertView.findViewById(R.id.tv_price); holder.iv_img = convertView.findViewById(R.id.iv_img); convertView.setTag(holder); } else { holder = (ViewHolder) convertView.getTag(); } FoodBean bean=list.get(position); holder.tv_name.setText(bean.getName()); holder.tv_sale.setText(bean.getSales()); holder.tv_price.setText(bean.getPrice()); holder.iv_img.setBackgroundResource(bean.getImg()); return convertView; } class ViewHolder { TextView tv_name, tv_sale,tv_price; ImageView iv_img; } } RightFragment.java import android.app.Fragment; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ListView; import java.io.Serializable; import java.util.List; public class RightFragment extends Fragment { private ListView lv_list; public RightFragment() { } public RightFragment getInstance(List<FoodBean> list) { RightFragment rightFragment = new RightFragment(); //通过Bundle对象传递数据可以保证在设备横竖屏切换时传递的数据不丢失 Bundle bundle = new Bundle(); //将需要传递的字符串以键值对的形式传入bundle对象 bundle.putSerializable("list", (Serializable) list); rightFragment.setArguments(bundle); return rightFragment; } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.right_layout, container, false); lv_list = view.findViewById(R.id.lv_list); if (getArguments() != null) { List<FoodBean> list = (List<FoodBean>) getArguments(). getSerializable("list"); RightAdapter adapter = new RightAdapter(getActivity(), list); lv_list.setAdapter(adapter); } return view; } } MainActivity.java import android.app.FragmentManager; import android.app.FragmentTransaction; import android.graphics.Color; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.TextView; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; public class MainActivity extends AppCompatActivity { private FragmentManager fragmentManager; private FragmentTransaction fragmentTransaction; private LeftFragment leftFragment; private TextView tv_recommend, tv_must_buy; private RightFragment rightFragment; //推荐菜单列表数据 private String[] names1 = {"爆款*肥牛鱼豆腐骨肉相连三荤五素一份米饭", "豪华双人套餐", "【热销】双人套餐(含两份米饭)"}; private String[] sales1 = {"月售520 好评度80%", "月售184 好评度68%", "月售114 好评度60%"}; private String[] prices1 = {"¥23", "¥41", "¥32"}; private int[] imgs1 = {R.drawable.recom_one, R.drawable.recom_two, R.drawable.recom_three}; //进店必买菜单列表数据 private String[] names2 = {"'蔬菜主义'1人套餐", "2人经典套餐", "3人经典套餐"}; private String[] sales2 = {"月售26 好评度70%", "月售12 好评度50%", "月售4 好评度40%"}; private String[] prices2 = {"¥44", "¥132", "¥180"}; private int[] imgs2 = {R.drawable.must_buy_one, R.drawable.must_buy_two, R.drawable.must_buy_three}; private Map<String,List<FoodBean>> map; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); setData(); init(); clickEvent(); } private void init() { fragmentManager = getFragmentManager();//获取fragmentManager //通过findFragmentById()方法获取leftFragment leftFragment = (LeftFragment) fragmentManager.findFragmentById(R.id.left); //获取左侧菜单栏中的控件 tv_recommend = leftFragment.getView().findViewById(R.id.tv_recommend); tv_must_buy = leftFragment.getView().findViewById(R.id.tv_must_buy); } private void setData(){ map=new HashMap<>(); List<FoodBean> list1=new ArrayList<>(); List<FoodBean> list2=new ArrayList<>(); for (int i=0;i<names1.length;i++){ FoodBean bean=new FoodBean(); bean.setName(names1[i]); bean.setSales(sales1[i]); bean.setPrice(prices1[i]); bean.setImg(imgs1[i]); list1.add(bean); } map.put("1",list1);//将推荐菜单列表的数据添加到map集合中 for (int i=0;i<names2.length;i++){ FoodBean bean=new FoodBean(); bean.setName(names2[i]); bean.setSales(sales2[i]); bean.setPrice(prices2[i]); bean.setImg(imgs2[i]); list2.add(bean); } map.put("2",list2); //将进店必买菜单列表的数据添加到map集合中 } private void clickEvent() { tv_recommend.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { //调用switchData()方法填充Rightfragment中的数据 switchData(map.get("1")); tv_recommend.setBackgroundColor(Color.WHITE); tv_must_buy.setBackgroundResource(R.color.gray); } }); tv_must_buy.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { switchData(map.get("2")); tv_must_buy.setBackgroundColor(Color.WHITE); tv_recommend.setBackgroundResource(R.color.gray); } }); //设置首次进入界面后,默认需要显示的数据 switchData(map.get("1")); } /** * 填充Activity右侧的Fragment,并传递列表数据list */ public void switchData(List<FoodBean> list) { fragmentManager = getFragmentManager(); fragmentTransaction = fragmentManager.beginTransaction();//开启一个事务 //通过调用getInstance()方法实例化RightFragment rightFragment = new RightFragment().getInstance(list); //调用replace()方法 fragmentTransaction.replace(R.id.right, rightFragment); fragmentTransaction.commit(); } } 说明如何编写列表显示的代码
11-08
为什么下面的数据有些在接口里面没有,但是通过搜索可以找到:<template> <div class="app-container"> <el-card class="box-card"> <div class="tab_box"> <div><a style="font-size: 15px;">状态选择:</a></div> <div v-for="(item, index) in tabList" :key="item.id" @click="toChangeTab(index)"> <div class="tab_item" :class="{ 'activ_tab': activeTab == index }">{{ item.name }}</div> </div> </div> <el-form :model="queryParams" size="small" :inline="true" v-show="showSearch"> <el-form-item label="团购名称" prop="name"> <el-input v-model="queryParams.name" placeholder="请填写" clearable @keyup.enter.native="handleQuery" /> </el-form-item> <el-form-item label="发布人" prop="username"> <el-input v-model="queryParams.username" filterable placeholder="请填写"> </el-input> </el-form-item> <el-form-item> <el-button type="primary" size="mini" @click="handleQuery">查询</el-button> <el-button size="mini" @click="resetQuery">重置</el-button> <el-button icon="el-icon-plus" size="mini" @click="addGroup" type="primary" plain v-hasPermi="['solitaire:list:add']">新增</el-button> </el-form-item> </el-form> </el-card> <el-card class="box-card"> <el-row :gutter="10" class="mb8"> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> </el-row> <el-table :data="dataList" @selection-change="handleSelectionChange"> <el-table-column type="selection" width="55" align="center" /> <el-table-column label="介绍图片" align="center" prop="cover"> <template slot-scope="scope"> <ImageSizeBox :data="scope.row.cover" size="sl" fit="fit" /> </template> </el-table-column> <el-table-column label="团购名称" align="center" prop="name"> <!-- <template slot-scope="scope"> {{ scope.row.name }} </template> --> <template slot-scope="scope"> <a href="javascript:;" @click="handleUpdate(scope.row, 'check')" style="color:#007bff;"> {{ scope.row.name }} </a></template> </el-table-column> <el-table-column label="发布人" align="center" prop="username"> <template slot-scope="scope"> {{ scope.row.username }} </template> </el-table-column> <el-table-column label="截止日期" align="center" prop="endTime" width="180"> <template slot-scope="scope"> <span>{{ scope.row.endTime }}</span> </template> </el-table-column> <el-table-column label="创建时间" align="center" prop="startTime" width="180"> <template slot-scope="scope"> <span>{{ scope.row.startTime }}</span> </template> </el-table-column> <el-table-column label="最大接龙人数" align="center" prop="maxJoinNum" width="180"> <template slot-scope="scope"> <span>{{ scope.row.maxJoinNum }}</span> </template> </el-table-column> <el-table-column label="参与人数" align="center" prop="joinNum" width="180"> <template slot-scope="scope"> <span>{{ scope.row.joinNum }}</span> </template> </el-table-column> <!-- <el-table-column label="接龙状态" align="center" prop="signEndDatetime" width="180"> <template slot-scope="scope"> <span>{{ scope.row.signEndDatetime }}</span> </template> </el-table-column> --> <el-table-column label="接龙状态" align="center" prop="status"> <template slot-scope="scope"> <el-tag v-if="scope.row.status == 0">未开始</el-tag> <el-tag v-if="scope.row.status == 1">进行中</el-tag> <el-tag v-if="scope.row.status == 2">已暂停</el-tag> <el-tag v-if="scope.row.status == 3">已结束</el-tag> </template> </el-table-column> <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <template slot-scope="scope"> <el-button size="mini" type="text" v-if="scope.row.status == '1'" icon="el-icon-upload2" @click="handleOrderExport(scope)" v-hasPermi="['solitaire:list:export']">数据导出 </el-button> <el-button size="mini" type="text" v-if="scope.row.status == '1'" icon="el-icon-edit" @click="handleend(scope.row.id, scope)" v-hasPermi="['solitaire:list:end']">结束接龙 </el-button> <el-button size="mini" type="text" v-if="[0, 2].includes(scope.row.status)" icon="el-icon-edit" @click="handlestart(scope.row.id, scope)" v-hasPermi="['solitaire:list:start']">开始接龙 </el-button> <el-button size="mini" type="text" v-if="scope.row.status == '1'" icon="el-icon-edit" @click="handlepause(scope.row.id, scope.row.status)" v-hasPermi="['solitaire:list:pause']">暂停接龙 </el-button> <el-button size="mini" type="text" v-if="scope.row.status == '2' || scope.row.status == '0'" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['solitaire:list:fix']">修改 </el-button> <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row, 'check')" v-hasPermi="['solitaire:list:fix']">详情 </el-button> <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row.id)" v-hasPermi="['solitaire:list:delete']">删除 </el-button> <el-button size="mini" type="text" v-if="scope.row.status != '4'" icon="el-icon-s-order" @click="orderMessage(scope)" v-hasPermi="['solitaire:list:order']">订单信息 </el-button> <el-button size="mini" type="text" v-if="scope.row.status != '4'" icon="el-icon-goods" @click="productMessage(scope)" v-hasPermi="['solitaire:list:shopmessage']">商品信息 </el-button> </template> </el-table-column> </el-table> <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" /> </el-card> </div> </template> <script> import { listActivity, getActivity, delActivity, addActivity, updateActivity, uploadPic, deljob, deny, pass, activitynormalList, checkActivity } from '@/api/activity/activity' import { imgUrl } from '@/utils/request' import { listUser, teamlist } from '@/api/user/user' import { addGroupShop, deleteGroupBuy, editStatusGroupBuy, exportGroupBuyOrderPage, listGroupShop } from '@/api/solitaire/solitaire'; import { orderPage } from '@/api/groupBuyApi'; export default { name: 'Solitaire', data() { return { // tabs tabLoading: false, // 添加此声明解决警告 activeTab: 0, tabList: [ { name: '全部', status: null }, { name: '未开始', status: 0 }, { name: '运行中', status: 1 }, { name: '已暂停', status: 2 }, { name: '已结束', status: 3 } ], // 图片前缀 imgUrl: imgUrl, // 遮罩层 loading: true, // 选中数组 ids: [], // 非单个禁用 single: true, // 非多个禁用 multiple: true, // 显示搜索条件 showSearch: true, // 总条数 total: 0, // 列表表格数据 dataList: [], // 弹出层标题 title: '', // 是否显示弹出层 open: false, // 查询参数 // for currten: { pageNum: 1, pageSize: 10 }, //分页 column: { pageSize: null, pageNum: null }, queryParams: { name: null, status: null, username: null, pageNum: 1, pageSize: 10 // activityName: null, // teamId: null, // status: 1, // type: 0 }, // 表单参数 form: { //封面 cover: imgUrl, //团购信息 detailInfo: "", //结束时间 endTime: "", //id id: 0, //参与人数 joinNum: 0, //最大参与人数 maxJoinNum: 0, //团购名称 name: "", //真实结束时间 realEndTime: "", //开始时间 startTime: "", //状态 status: 0, //发布人 username: 0, }, // 活动详情的类型(normal是正常活动的详情,supply是补录的活动详情) detailType: 'normal' } }, created() { this.getList() // this.gettemn() }, methods: { orderMessage(scope) { console.log(scope.row.id, '00') this.$router.push({ path: '/solitaire/ListOrder', query: { id: scope.row.id } }) }, productMessage(scope) { console.log(scope.row.id, '00') this.$router.push({ path: '/solitaire/ListShopMessage', query: { id: scope.row.id } }) }, // exportCardUseInfoHandle() { // exportCardUseInfo({ cardId: this.$route.query.id }).then(res => { // const blob = new Blob([res.data], { type: 'application/octet-stream;charset=UTF-8' }) // const contentDisposition = res.headers['content-disposition'] // const patt = new RegExp('filename=([^;]+\\.[^\\.;]+);*') // const result = patt.exec(contentDisposition) // const $link = document.createElement('a') // $link.href = URL.createObjectURL(blob) // $link.download = decodeURIComponent(result[1]) // $link.click() // document.body.appendChild($link) // document.body.removeChild($link) // 下载完成移除元素 // window.URL.revokeObjectURL($link.href) // 释放掉blob对象 // }) // }, handleOrderExport(scope) { console.log(scope, '00') let parmas = { // storeId: localStorage.getItem("shopId"), parentId: parseInt(scope.row.id), } console.log(parmas, 'parmasparmas') exportGroupBuyOrderPage(parmas).then(res => { console.log(res, '939') const blob = new Blob([res.data], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' }) // const contentDisposition =res.headers['content-disposition'] // const patt = new RegExp('filename=([^;]+\\.[^\\.;]+);*') // const result = patt.exec(contentDisposition) const $link = document.createElement('a') $link.href = URL.createObjectURL(blob) $link.download = "接龙团购.xlsx" $link.click() document.body.appendChild($link) document.body.removeChild($link) // 下载完成移除元素 window.URL.revokeObjectURL($link.href) // 释放掉blob对象 }) }, // toDetail(scope){ // console.log(scope,'47') // const params={ // parentId:parseInt(scope.row.id), // } // exportGroupBuyOrderPage(params).then(res=>{ // console.log(res,'000') // }) // }, handleQuery() { console.log(this.queryParams, '94') this.queryParams.username this.queryParams.name this.getList() }, /** 重置按钮操作 */ resetQuery() { this.queryParams.name = null this.queryParams.id = null this.handleQuery() }, getList() { this.loading = true; // 构建符合后端要求的参数 const params = { name: this.queryParams.name, username: this.queryParams.username, pageNum: this.queryParams.pageNum, pageSize: this.queryParams.pageSize, // 确保 status 是整数或 undefined status: this.queryParams.status !== null && this.queryParams.status !== undefined ? Number(this.queryParams.status) : undefined }; listGroupShop(params).then(res => { this.dataList = res.pageData || []; this.total = parseInt(res.total) || 0; // 同步分页参数 if (res.pageNum) this.queryParams.pageNum = res.pageNum; if (res.pageSize) this.queryParams.pageSize = res.pageSize; }).catch(error => { console.error("列表获取失败:", error); this.$modal.msgError("数据加载失败"); this.dataList = []; this.total = 0; }).finally(() => { this.loading = false; }); }, // tab栏切换 async toChangeTab(index) { // 当前已经是选中状态时跳过 if (this.activeTab === index) return; // 更新当前激活标签 this.activeTab = index; // 提取选中的状态值 const selectedStatus = this.tabList[index].status; // 设置查询参数 this.queryParams = { ...this.queryParams, status: selectedStatus, pageNum: 1 // 重置到第一页 }; // 添加加载状态反馈 this.$set(this, 'tabLoading', true); try { await this.getList(); } catch (error) { console.error("状态切换失败:", error); this.$modal.msgError("列表加载失败"); } finally { this.$set(this, 'tabLoading', false); } }, addGroup() { this.$router.push({ path: '/solitaire/form', query: { } }) }, checkList(e) { console.error(e) }, /** 搜索按钮操作 */ handleQuery() { this.queryParams.pageNum = 1 this.getList() }, /** 重置按钮操作 */ resetQuery() { this.queryParams.name = null this.queryParams.username = null this.handleQuery() }, handlestart(id, scope) { console.log('000', id, scope.row.status) const that = this this.$modal.confirm('是否确认修改团购状态?').then(function () { editStatusGroupBuy(id, 1).then(res => { that.getList() that.$modal.msgSuccess('修改成功') }) }) }, handleend(id, scope) { console.log('000', id, scope) const that = this this.$modal.confirm('是否确认修改团购状态?').then(function () { editStatusGroupBuy(id, 3).then(res => { that.getList() that.$modal.msgSuccess('修改成功') }) }) }, handlepause(id, scope) { console.log('000', id, scope) const that = this this.$modal.confirm('是否确认修改团购状态?').then(function () { editStatusGroupBuy(id, 2).then(res => { that.getList() that.$modal.msgSuccess('修改成功') }) }) }, // 多选框选中数据 handleSelectionChange(selection) { this.ids = selection.map(item => item.pkId) this.single = selection.length !== 1 this.multiple = !selection.length }, /** 修改按钮操作 */ handleUpdate(row, type) { this.$router.push({ path: '/solitaire/form', query: { id: row.id, type } }) }, openApproval() { console.log('00') this.$router.push({ path: '/solitaire/listordermessage' }) }, // 时长录入 /** 删除按钮操作 */ handleDelete(id) { console.log('000', id) this.$modal.confirm('是否确认删除该团购?').then(function () { return deleteGroupBuy(id) }).then(() => { this.getList() this.$modal.msgSuccess('删除成功') }).catch(() => { }) }, /** 导出按钮操作 */ handleExport() { this.title = '补录' this.open = true }, // 补录删除志愿者 deleteUser(e, p) { this.form.jobUserVOS[e].jobUsers.splice(p, 1) this.$modal.msgSuccess('删除成功') }, // 批量审批通过 handleApprovalPass() { if (this.ids.length == 0) { this.$modal.msgError('请选择批量审批通过的活动') } else { pass({ activityIds: this.ids.join(',') }).then(res => { console.log(res) this.$modal.msgSuccess('批量同意成功') this.getList() this.ids = [] }) } }, // 批量审批拒绝 handleApprovalDeny() { if (this.ids.length == 0) { this.$modal.msgError('请选择批量审批拒绝的活动') } else { this.$prompt('请填写拒绝原因', '提示', { confirmButtonText: '确定拒绝审批', cancelButtonText: '取消', }).then(({ value }) => { deny({ activityIds: this.ids.join(','), remark: value }).then(res => { this.$modal.msgSuccess('批量拒绝成功') this.getList() this.ids = [] }) }) } }, handleUpdatepass(e) { pass(e.pkId).then(res => { if (res.code === 200) { this.getList() this.$modal.msgSuccess('同意成功') } }) }, handleDeletedeny(e) { deny(e.pkId).then(res => { if (res.code === 200) { this.$modal.msgSuccess('拒绝成功') } }) }, // teamList(e) { // console.error(e) // this.userqueryParams.teamId = e // listUser(this.userqueryParams, this.column).then(response => { // this.userList = response.pageData // }) // } } } </script> <style lang="scss" scoped> .box-card+.box-card { margin-top: 15px; } </style> <style> .tab_box { display: flex; flex-direction: row; align-items: center; margin-bottom: 30px; } .tab_item { margin-right: 10px; padding: 10px 20px; background-color: #f3eded; font-size: 16px; border-radius: 5px; } .activ_tab { color: #fff; font-weight: 700; background-color: #409EFF; } .avatar-uploader .el-upload { border: 1px solid #f8f3f3; border-radius: 6px; cursor: pointer; position: relative; overflow: hidden; } .avatar-uploader .el-upload:hover { border-color: #409EFF; } .avatar-uploader-icon { font-size: 28px; color: #8c939d; width: 120px; height: 120px; line-height: 120px; text-align: center; } .avatar { width: 120px; height: 120px; display: block; } .input { width: 220px; } .dialog-custom-class { position: fixed; top: 0; right: 0; height: 100%; margin: 0; padding: 0; z-index: 9999; } </style>
11-07
本项目采用C++编程语言结合ROS框架构建了完整的双机械臂控制系统,实现了Gazebo仿真环境下的协同运动模拟,并完成了两台实体UR10工业机器人的联动控制。该毕业设计在答辩环节获得98分的优异成绩,所有程序代码均通过系统性调试验证,保证可直接部署运行。 系统架构包含三个核心模块:基于ROS通信架构的双臂协调控制器、Gazebo物理引擎下的动力学仿真环境、以及真实UR10机器人的硬件接口层。在仿真验证阶段,开发了双臂碰撞检测算法和轨迹规划模块,通过ROS控制包实现了末端执行器的同步轨迹跟踪。硬件集成方面,建立了基于TCP/IP协议的实时通信链路,解决了双机数据同步和运动指令分发等关键技术问题。 本资源适用于自动化、机械电子、人工智能等专业方向的课程实践,可作为高年级课程设计、毕业课题的重要参考案例。系统采用模块化设计理念,控制核心与硬件接口分离架构便于功能扩展,具备工程实践能力的学习者可在现有框架基础上进行二次开发,例如集成视觉感知模块或优化运动规划算法。 项目文档详细记录了环境配置流程、参数调试方法和实验验证数据,特别说明了双机协同作业时的时序同步解决方案。所有功能模块均提供完整的API接口说明,便于使用者快速理解系统架构并进行定制化修改。 资源来源于网络分享,仅用于学习交流使用,请勿用于商业,如有侵权请联系我删除!
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值